| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
/* This test used to ICE after erroring on the metadirective in the |
| 4 |
loop nest. */ |
| 5 |
|
| 6 |
int main() |
| 7 |
{ |
| 8 |
int blksize = 15000; |
| 9 |
double *qq; |
| 10 |
int i, k, nq; |
| 11 |
|
| 12 |
#pragma omp metadirective when(user={condition(0)}: target teams distribute parallel for collapse(2) map(qq[:0]) private(i)) \ |
| 13 |
when(user={condition(0)}: target teams distribute parallel for map(qq[:0]) private(i)) \ |
| 14 |
when(user={condition(1)}: target teams loop collapse(2) map(qq[:0]) private(i)) |
| 15 |
for(k=0; k<blksize; k++) |
| 16 |
{ |
| 17 |
#pragma omp metadirective when(user={condition(0)}: simd) default() // { dg-error "intervening code must not contain OpenMP directives" } |
| 18 |
for (i=0; i<nq; i++) |
| 19 |
qq[k*nq + i] = 0.0; |
| 20 |
} |
| 21 |
return 0; |
| 22 |
} |