| 1 |
// PR middle-end/29965 |
| 2 |
// Test that OpenMP construct bodies which never return don't cause ICEs. |
| 3 |
// This is invalid code, but we don't emit diagnostics for it, nevertheless |
| 4 |
// we test that we don't ICE on it. |
| 5 |
// { dg-do compile } |
| 6 |
// { dg-options "-O2 -fopenmp" } |
| 7 |
|
| 8 |
void |
| 9 |
foo1 () |
| 10 |
{ |
| 11 |
int i; |
| 12 |
#pragma omp for schedule (static) |
| 13 |
for (i = 0; i < 2834; i++) |
| 14 |
throw 0; |
| 15 |
} |
| 16 |
|
| 17 |
void |
| 18 |
foo2 () |
| 19 |
{ |
| 20 |
int i; |
| 21 |
#pragma omp parallel for schedule (static) |
| 22 |
for (i = 0; i < 2834; i++) |
| 23 |
throw 0; |
| 24 |
} |