| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
/* This test case is expected to fail due to errors. */ |
| 4 |
|
| 5 |
int f1 (int depth, int iter); |
| 6 |
int f2 (int depth, int iter); |
| 7 |
|
| 8 |
void s1 (int a1, int a2, int a3) |
| 9 |
{ |
| 10 |
int i, j, k; |
| 11 |
|
| 12 |
#pragma omp for collapse(4) |
| 13 |
for (i = 0; i < a1; i++) /* { dg-error "not enough nested loops" } */ |
| 14 |
{ |
| 15 |
f1 (0, i); |
| 16 |
for (j = 0; j < a2; j++) |
| 17 |
{ |
| 18 |
f1 (1, j); |
| 19 |
for (k = 0; k < a3; k++) |
| 20 |
{ |
| 21 |
/* According to the grammar, this is intervening code; we |
| 22 |
don't know that we are also missing a nested for loop |
| 23 |
until we have parsed this whole compound expression. */ |
| 24 |
#pragma omp barrier /* { dg-error "intervening code must not contain OpenMP directives" } */ |
| 25 |
f1 (2, k); |
| 26 |
f2 (2, k); |
| 27 |
} |
| 28 |
f2 (1, j); |
| 29 |
} |
| 30 |
f2 (0, i); |
| 31 |
} |
| 32 |
} |
| 33 |
|