Debian Codegraph @

gcc/testsuite/g++.dg/gomp/pr35244.C

raw
1 // PR c++/35244
2 // { dg-do compile }
3 // { dg-require-effective-target tls }
4 // { dg-options "-fopenmp" }
5
6 int v1;
7 namespace N1
8 {
9 int v2;
10 }
11 namespace N2
12 {
13 int v3;
14 }
15 using N1::v2;
16 using namespace N2;
17 struct A;
18 typedef int i;
19 #pragma omp threadprivate (i) // { dg-error "is not file, namespace or block scope variable" }
20 #pragma omp threadprivate (A) // { dg-error "is not file, namespace or block scope variable" }
21 #pragma omp threadprivate (v1, v2, v3)
22
23 void foo ()
24 {
25 static int v4;
26 {
27 static int v5;
28 #pragma omp threadprivate (v4, v5)
29 }
30 }