platform.texi: Move LAM after LAHF64_SAHF64
[glibc.git] / elf / tst-tlsmod17a.c
blob24c84a1590f6ea11489ab1c0053dd709af5703d6
1 #include <stdio.h>
3 #ifndef N
4 #define N 0
5 #endif
6 #define CONCAT1(s, n) s##n
7 #define CONCAT(s, n) CONCAT1(s, n)
9 __thread int CONCAT (v, N) = 4;
11 int
12 CONCAT (tlsmod17a, N) (void)
14 int *p = &CONCAT (v, N);
15 /* GCC assumes &var is never NULL, add optimization barrier. */
16 asm volatile ("" : "+r" (p));
17 if (p == NULL || *p != 4)
19 printf ("fail %d %p\n", N, p);
20 return 1;
22 return 0;