1 // PR middle-end/27325 2 // { dg-do compile } 3 // { dg-options "-O2 -fopenmp" } 4 5 struct A { A(); ~A(); int i; }; 6 7 int foo()8foo () 9 { 10 A a; 11 #pragma omp parallel private (a) 12 for (int i = 0; i < 5; ++i) 13 a.i++; 14 return 0; 15 } 16 17 int bar()18bar () 19 { 20 A a; 21 #pragma omp for private (a) 22 for (int i = 0; i < 5; ++i) 23 a.i++; 24 return 0; 25 } 26