Debian Codegraph @

gcc/testsuite/objc.dg/torture/tls/thr-init.m

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target tls_runtime } */
3 /* { dg-add-options tls } */
4
5 extern void _exit(int);
6
7 static __thread int fstat ;
8
9 static __thread int fstat = 1;
10
11 static __thread int fstat ;
12
13 int test_code(int b)
14 {
15 fstat += b ;
16 return fstat;
17 }
18
19 int main (int ac, char *av[])
20 {
21 int a = test_code(1);
22
23 if ( a != 2 || fstat != 2 ) _exit (-(__LINE__)) ;
24
25 return 0;
26 }