blob: 58517be2feb4b2ca303e7e66e057b1a8a060ad9d [file] [log] [blame]
int r, r2, r3 = 1;
int bar (void);
void
foo (void)
{
int i = 0, j = 0, k = 0;
#pragma omp parallel
{
if (bar ())
{
#pragma omp cancel parallel
}
#pragma omp scope reduction (+:r) private (i)
{
#pragma omp scope reduction (+:r2) private (j)
{
#pragma omp single nowait
{
i = 1;
j = 2;
r++;
r2++;
}
}
}
}
#pragma omp parallel
{
if (bar ())
{
#pragma omp cancel parallel
}
#pragma omp scope reduction (task, +:r) private (i)
#pragma omp scope reduction (task, *:r3)
{
r++;
r3++;
}
}
}