Don't macro-expand failed assertion expression [BZ #18604]
[glibc.git] / elf / tst-tlsmod8.c
blob89772ac42f52090d46f6b76fb6b3b8ab317e5295
1 #include "tst-tls10.h"
3 __thread long long dummy __attribute__((visibility ("hidden"))) = 12;
4 __thread struct A a2 = { 22, 23, 24 };
5 __thread struct A a4 __attribute__((tls_model("initial-exec")))
6 = { 25, 26, 27 };
7 static __thread struct A local1 = { 28, 29, 30 };
8 static __thread struct A local2 __attribute__((tls_model("initial-exec")))
9 = { 31, 32, 33 };
11 void
12 check2 (void)
14 if (a2.a != 22 || a2.b != 23 || a2.c != 24)
15 abort ();
16 if (a4.a != 25 || a4.b != 26 || a4.c != 27)
17 abort ();
18 if (local1.a != 28 || local1.b != 29 || local1.c != 30)
19 abort ();
20 if (local2.a != 31 || local2.b != 32 || local2.c != 33)
21 abort ();
24 struct A *
25 f7a (void)
27 return &a2;
30 struct A *
31 f8a (void)
33 return &a4;
36 struct A *
37 f9a (void)
39 return &local1;
42 struct A *
43 f10a (void)
45 return &local2;
48 int
49 f7b (void)
51 return a2.b;
54 int
55 f8b (void)
57 return a4.a;
60 int
61 f9b (void)
63 return local1.b;
66 int
67 f10b (void)
69 return local2.c;