diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-10-20 07:21:57 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-10-20 07:21:57 +0000 |
commit | 6d8225fe1a3277273c245ceb1b35fd536300f649 (patch) | |
tree | 2c0992e862046504ff1767f29601e35981ca4d47 /elf/tst-tlsmod17a.c | |
parent | 315a43aa949b25896c511fa6e2efd6be57e2e01d (diff) | |
download | glibc-6d8225fe1a3277273c245ceb1b35fd536300f649.tar glibc-6d8225fe1a3277273c245ceb1b35fd536300f649.tar.gz glibc-6d8225fe1a3277273c245ceb1b35fd536300f649.tar.bz2 glibc-6d8225fe1a3277273c245ceb1b35fd536300f649.zip |
Updated to fedora-glibc-20081019T1815cvs/fedora-glibc-2_8_90-14
Diffstat (limited to 'elf/tst-tlsmod17a.c')
-rw-r--r-- | elf/tst-tlsmod17a.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/elf/tst-tlsmod17a.c b/elf/tst-tlsmod17a.c new file mode 100644 index 0000000000..24c84a1590 --- /dev/null +++ b/elf/tst-tlsmod17a.c @@ -0,0 +1,23 @@ +#include <stdio.h> + +#ifndef N +#define N 0 +#endif +#define CONCAT1(s, n) s##n +#define CONCAT(s, n) CONCAT1(s, n) + +__thread int CONCAT (v, N) = 4; + +int +CONCAT (tlsmod17a, N) (void) +{ + int *p = &CONCAT (v, N); + /* GCC assumes &var is never NULL, add optimization barrier. */ + asm volatile ("" : "+r" (p)); + if (p == NULL || *p != 4) + { + printf ("fail %d %p\n", N, p); + return 1; + } + return 0; +} |