]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tlsmod14a.c
Fix testing with nss-crypt.
[thirdparty/glibc.git] / elf / tst-tlsmod14a.c
CommitLineData
99fe3b0e
UD
1#include <stdint.h>
2#include <stdio.h>
3
3ce1f295 4#define AL 4096
99fe3b0e
UD
5struct foo
6{
7 int i;
8} __attribute ((aligned (AL)));
9
10static __thread struct foo f;
11static struct foo g;
12
13
3ce1f295
UD
14#ifndef FCT
15# define FCT in_dso1
16#endif
99fe3b0e
UD
17
18
19int
20FCT (void)
21{
22 puts (__func__);
23
24 int result = 0;
25
26 int fail = (((uintptr_t) &f) & (AL - 1)) != 0;
27 printf ("&f = %p %s\n", &f, fail ? "FAIL" : "OK");
28 result |= fail;
29
30 fail = (((uintptr_t) &g) & (AL - 1)) != 0;
31 printf ("&g = %p %s\n", &g, fail ? "FAIL" : "OK");
32 result |= fail;
33
34 return result;
35}