PR target/24475
[official-gcc.git] / gcc / testsuite / g++.dg / tls / static-1a.cc
blob636f9352d4d446a8b1b0f1ebb49a1c5c78754f49
1 // { dg-do run }
2 // { dg-options "-O2" }
3 // { dg-additional-sources "static-1a.cc" }
4 // { dg-require-effective-target tls_runtime }
6 struct A
8 static __thread int i;
9 };
11 int
12 test ()
14 if (A::i != 8)
15 return 1;
17 A::i = 17;
18 return 0;