Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / gomp / tls-3.C
blobc710b6d183582c8ff5f621b164c4b641ba9f94f0
1 // { dg-do compile }
2 // { dg-require-effective-target tls }
4 #define thr threadprivate
6 int i;
7 #pragma omp thr (i)
8 namespace N
10   int j;
11 #pragma omp thr (j)
13 struct S
15   static int s;
16 #pragma omp thr (s)
19 int S::s = 5;
21 int
22 foo ()
24   static int k;
25 #pragma omp thr (k)
26   return k++ + S::s;