re-enable tls and lto tests for ObjC/C++
[official-gcc/alias-decl.git] / gcc / testsuite / objc.dg / torture / tls / thr-init.m
blob663965180d20d00a7489d16decafdad3be99e0d1
1 /* { dg-do run } */
2 /* { dg-require-effective-target tls } */
3 /* { dg-add-options tls } */
5 extern void _exit(int);
7 static __thread int fstat ;
9 static __thread int fstat = 1;
11 static __thread int fstat ;
13 int test_code(int b)
15   fstat += b ;
16   return fstat;
19 int main (int ac, char *av[])
21   int a = test_code(1);
22   
23   if ( a != 2 || fstat != 2 ) _exit (-(__LINE__)) ;
24   
25   return 0;