summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/copyin-1.C
blob: 117f82f8134f75d3ff67a8d53132f3769fbdb003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// { dg-do compile }
// { dg-require-effective-target tls }

int i, j;

#pragma omp threadprivate (i)

void bar(void);
void foo(void)
{
  int k;
  extern int l;
  extern int m;

#pragma omp threadprivate (m)

  #pragma omp parallel copyin(i)
    bar();
  #pragma omp parallel copyin(j)	// { dg-error "threadprivate" }
    bar();
  #pragma omp parallel copyin(k)	// { dg-error "threadprivate" }
    bar();
  #pragma omp parallel copyin(l)	// { dg-error "threadprivate" }
    bar();
  #pragma omp parallel copyin(m)
    bar();
}