-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/rtdl: Add a regression test for #960
- Loading branch information
Showing
5 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_Thread_local __attribute__((aligned(8))) char bar_thread_local[8] = "Hello!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_Thread_local __attribute__((aligned(16))) char foo_thread_local[8] = "Hello!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
libfoo = shared_library('foo', 'libfoo.c') | ||
libbar = shared_library('bar', 'libbar.c') | ||
test_link_with = [libfoo, libbar] | ||
|
||
libfoo_native = shared_library('native-foo', 'libfoo.c', native: true) | ||
libbar_native = shared_library('native-bar', 'libbar.c', native: true) | ||
test_native_link_with = [libfoo_native, libbar_native] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <assert.h> | ||
#include <stdint.h> | ||
|
||
extern _Thread_local char foo_thread_local[]; | ||
extern _Thread_local char bar_thread_local[]; | ||
|
||
int main() { | ||
assert(!((uintptr_t)foo_thread_local & (16 - 1))); | ||
assert(!((uintptr_t)bar_thread_local & (8 - 1))); | ||
} |