1// PR c++/35244
2// { dg-do compile }
3// { dg-require-effective-target tls_native }
4// { dg-options "-fopenmp" }
5
6int v1;
7namespace N1
8{
9  int v2;
10}
11namespace N2
12{
13  int v3;
14}
15using N1::v2;
16using namespace N2;
17struct A;
18typedef 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
23void foo ()
24{
25  static int v4;
26  {
27    static int v5;
28#pragma omp threadprivate (v4, v5)
29  }
30}
31