Sort BZ # in NEWS
[glibc.git] / elf / tst-tlsmod14a.c
blob6806d3403c946928f19a8ca6326541f4a7e4e46b
1 #include <stdint.h>
2 #include <stdio.h>
4 #include <tls.h>
6 #define AL 4096
7 struct foo
9 int i;
10 } __attribute ((aligned (AL)));
12 static __thread struct foo f;
13 static struct foo g;
16 #ifndef FCT
17 # define FCT in_dso1
18 #endif
21 int
22 FCT (void)
24 puts (__func__);
26 int result = 0;
28 int fail = (((uintptr_t) &f) & (AL - 1)) != 0;
29 printf ("&f = %p %s\n", &f, fail ? "FAIL" : "OK");
30 result |= fail;
32 fail = (((uintptr_t) &g) & (AL - 1)) != 0;
33 printf ("&g = %p %s\n", &g, fail ? "FAIL" : "OK");
34 result |= fail;
36 return result;