blob: 05bc481d70fa016f52e272f46b27b91941fa6f18 (
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
|
// PR middle-end/27325
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
struct A { A(); ~A(); int i; };
int
foo ()
{
A a;
#pragma omp parallel private (a)
for (int i = 0; i < 5; ++i)
a.i++;
return 0;
}
int
bar ()
{
A a;
#pragma omp for private (a)
for (int i = 0; i < 5; ++i)
a.i++;
return 0;
}
|