| 1 |
int v; |
| 2 |
extern void foo (int); |
| 3 |
|
| 4 |
void |
| 5 |
bar (void) |
| 6 |
{ |
| 7 |
int i; |
| 8 |
#pragma omp for reduction (task, +: v) nowait /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */ |
| 9 |
for (i = 0; i < 64; i++) |
| 10 |
foo (i); |
| 11 |
#pragma omp sections nowait reduction (task, +: v) /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */ |
| 12 |
{ |
| 13 |
foo (-2); |
| 14 |
#pragma omp section |
| 15 |
foo (-3); |
| 16 |
} |
| 17 |
#pragma omp scope reduction (task, +: v) nowait /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */ |
| 18 |
foo (-4); |
| 19 |
#pragma omp simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */ |
| 20 |
for (i = 0; i < 64; i++) |
| 21 |
v++; |
| 22 |
#pragma omp for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */ |
| 23 |
for (i = 0; i < 64; i++) |
| 24 |
v++; |
| 25 |
#pragma omp parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */ |
| 26 |
for (i = 0; i < 64; i++) |
| 27 |
v++; |
| 28 |
#pragma omp teams distribute parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */ |
| 29 |
for (i = 0; i < 64; i++) |
| 30 |
v++; |
| 31 |
#pragma omp taskloop reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */ |
| 32 |
for (i = 0; i < 64; i++) |
| 33 |
foo (i); |
| 34 |
#pragma omp taskloop simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */ |
| 35 |
for (i = 0; i < 64; i++) |
| 36 |
v++; |
| 37 |
#pragma omp teams reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */ |
| 38 |
foo (i); |
| 39 |
#pragma omp teams distribute reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct not combined with 'parallel', 'for' or 'sections'" } */ |
| 40 |
for (i = 0; i < 64; i++) |
| 41 |
foo (i); |
| 42 |
} |