1 // { dg-do compile } 2 3 struct T 4 { 5 int n; 6 7 void test(); 8 }; 9 test()10void T::test() 11 { 12 #pragma omp parallel private(n) 13 n = 1; 14 15 #pragma omp parallel shared(n) 16 #pragma omp single 17 n = 1; 18 19 #pragma omp parallel firstprivate(n) 20 n = 1; 21 22 #pragma omp sections lastprivate(n) 23 { n = 1; } 24 25 #pragma omp parallel reduction(+:n) 26 n = 1; 27 28 #pragma omp single copyprivate(n) 29 n = 1; 30 31 #pragma omp parallel copyin(n) // { dg-error "T::n" } 32 n = 1; 33 } 34