Debian Codegraph @

gcc/testsuite/gcc.dg/tls/opt-14.c

raw
1 /* This testcase generated invalid assembly on ARM Thumb-2. Two
2 PIC additions of pc were combined, but the deleted label was still
3 used. */
4 /* { dg-do assemble } */
5 /* { dg-options "-O2" } */
6 /* { dg-require-effective-target tls } */
7
8 struct __res_state
9 {
10 int options;
11 };
12 extern __thread struct __res_state *__resp
13 __attribute__ ((tls_model ("initial-exec")));
14
15 void foo (void);
16
17 int main(void)
18 {
19 int count, total = 0;
20
21 for (count = 0; count < 10; count++)
22 {
23 if (((*__resp).options & 0x00000001) == 0)
24 foo ();
25 (*__resp).options &= ~((0x00000002 | 0x00000200 | 0x00000080));
26 }
27 return 0;
28 }