| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fopenmp" } */ |
| 3 |
|
| 4 |
void bar (int); |
| 5 |
|
| 6 |
void |
| 7 |
foo () |
| 8 |
{ |
| 9 |
#pragma omp sections |
| 10 |
{ |
| 11 |
bar (1); |
| 12 |
#pragma omp section |
| 13 |
{ |
| 14 |
bar (2); |
| 15 |
} |
| 16 |
} |
| 17 |
#pragma omp sections |
| 18 |
{ |
| 19 |
#pragma omp section |
| 20 |
bar (3); |
| 21 |
#pragma omp section |
| 22 |
{ |
| 23 |
bar (4); |
| 24 |
bar (5); |
| 25 |
} |
| 26 |
} |
| 27 |
#pragma omp sections |
| 28 |
{ |
| 29 |
{ |
| 30 |
bar (6); |
| 31 |
bar (7); |
| 32 |
} |
| 33 |
#pragma omp section |
| 34 |
bar (8); |
| 35 |
} |
| 36 |
#pragma omp sections |
| 37 |
{ |
| 38 |
#pragma omp section |
| 39 |
{ |
| 40 |
bar (9); |
| 41 |
} |
| 42 |
#pragma omp section |
| 43 |
bar (10); |
| 44 |
#pragma omp section |
| 45 |
bar (11); |
| 46 |
} |
| 47 |
#pragma omp sections |
| 48 |
{ |
| 49 |
} /* { dg-error "expression before" } */ |
| 50 |
#pragma omp sections |
| 51 |
{ |
| 52 |
bar (12); |
| 53 |
bar (13); |
| 54 |
#pragma omp section |
| 55 |
bar (14); |
| 56 |
} |
| 57 |
#pragma omp sections |
| 58 |
{ |
| 59 |
#pragma omp section |
| 60 |
} /* { dg-error "expression before" } */ |
| 61 |
#pragma omp sections |
| 62 |
{ |
| 63 |
bar (15); |
| 64 |
#pragma omp section |
| 65 |
bar (16); |
| 66 |
bar (17); |
| 67 |
} |
| 68 |
#pragma omp sections |
| 69 |
{ |
| 70 |
bar (18); |
| 71 |
#pragma omp section |
| 72 |
} /* { dg-error "expression before" } */ |
| 73 |
#pragma omp sections |
| 74 |
{ |
| 75 |
#pragma omp section |
| 76 |
#pragma omp section /* { dg-error "may only be used in" } */ |
| 77 |
bar (19); |
| 78 |
} |
| 79 |
#pragma omp sections |
| 80 |
{ |
| 81 |
bar (20); |
| 82 |
#pragma omp section |
| 83 |
#pragma omp section /* { dg-error "may only be used in" } */ |
| 84 |
bar (21); |
| 85 |
} |
| 86 |
#pragma omp sections |
| 87 |
{ |
| 88 |
bar (22); |
| 89 |
#pragma omp section |
| 90 |
} /* { dg-error "expression before" } */ |
| 91 |
} |