FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / tls / diag-1.C
blob697d0b13106b5130e03bd0c6a250802d4680ac46
1 /* Valid __thread specifiers.  */
3 __thread int g1;
4 extern __thread int g2;
5 static __thread int g3;
7 void foo()
9   extern __thread int l1;
10   static __thread int l2;
13 struct A {
14   static __thread int i;
17 __thread int A::i = 42;
19 template <typename T> struct B {
20   static __thread T t;
23 template <typename T>
24 __thread T B<T>::t = 42;
26 void bar ()
28   int j = B<int>::t;
29   int k = B<const int>::t;