]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tls10.c
Fix jn precision
[thirdparty/glibc.git] / elf / tst-tls10.c
CommitLineData
94c24227
UD
1#include "tst-tls10.h"
2
3#ifdef USE_TLS__THREAD
63af556f 4__thread int dummy __attribute__((visibility ("hidden"))) = 12;
94c24227
UD
5__thread struct A local = { 1, 2, 3 };
6#endif
7
8#define CHECK(N, S) \
9 p = f##N##a (); \
10 if (p->a != S || p->b != S + 1 || p->c != S + 2) \
11 abort ()
12
13int
14main (void)
15{
16#ifdef USE_TLS__THREAD
17 struct A *p;
18 if (local.a != 1 || local.b != 2 || local.c != 3)
19 abort ();
20 if (a1.a != 4 || a1.b != 5 || a1.c != 6)
21 abort ();
22 if (a2.a != 22 || a2.b != 23 || a2.c != 24)
23 abort ();
24 if (a3.a != 10 || a3.b != 11 || a3.c != 12)
25 abort ();
26 if (a4.a != 25 || a4.b != 26 || a4.c != 27)
27 abort ();
28 check1 ();
29 check2 ();
30 if (f1a () != &a1 || f2a () != &a2 || f3a () != &a3 || f4a () != &a4)
31 abort ();
32 CHECK (5, 16);
33 CHECK (6, 19);
34 if (f7a () != &a2 || f8a () != &a4)
35 abort ();
36 CHECK (9, 28);
37 CHECK (10, 31);
38#endif
39 exit (0);
40}