[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / tls / static-1.C
blob506b0fcf7a0eecde254bb7b7643e0566467c990e
1 // { dg-do run }
2 // { dg-options "-O2" }
3 // { dg-require-effective-target tls_runtime }
4 // { dg-add-options tls }
5 // { dg-additional-sources "static-1a.cc" }
7 extern "C" void abort ();
8 extern int test ();
10 struct A
12   static __thread int i;
15 __thread int A::i = 8;
17 int
18 main ()
20   if (A::i != 8)
21     abort ();
23   if (test ())
24     abort ();
26   if (A::i != 17)
27     abort ();
29   return 0;