summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/clause-1.C
blob: 76683ecf6ee94c42d2785e322fe252a8be1e0410 (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
28
29
30
31
32
// { dg-do compile }

struct T
{
  int n;

  void test();
};

void T::test()
{
  #pragma omp parallel private(n)	// { dg-error "T::n" }
    n = 1;

  #pragma omp parallel shared(n)	// { dg-error "T::n" }
    n = 1;

  #pragma omp parallel firstprivate(n)	// { dg-error "T::n" }
    n = 1;

  #pragma omp sections lastprivate(n)	// { dg-error "T::n" }
    { n = 1; }

  #pragma omp parallel reduction(+:n)	// { dg-error "T::n" }
    n = 1;

  #pragma omp single copyprivate(n)	// { dg-error "T::n" }
    n = 1;

  #pragma omp parallel copyin(n)	// { dg-error "T::n" }
    n = 1;
}