1 /* { dg-do compile } */
2 /* { dg-options "-fopenmp" } */
9 for (i
= 0; i
< 3; i
++)
11 #pragma omp for /* { dg-error "may not be closely nested" } */
12 for (j
= 0; j
< 3; j
++)
14 #pragma omp sections /* { dg-error "may not be closely nested" } */
20 #pragma omp single /* { dg-error "may not be closely nested" } */
22 #pragma omp master /* { dg-error "may not be closely nested" } */
24 #pragma omp barrier /* { dg-error "may not be closely nested" } */
28 #pragma omp for /* { dg-error "may not be closely nested" } */
29 for (j
= 0; j
< 3; j
++)
34 #pragma omp sections /* { dg-error "may not be closely nested" } */
43 #pragma omp single /* { dg-error "may not be closely nested" } */
48 #pragma omp master /* { dg-error "may not be closely nested" } */
59 #pragma omp for /* { dg-error "may not be closely nested" } */
60 for (j
= 0; j
< 3; j
++)
66 #pragma omp sections /* { dg-error "may not be closely nested" } */
76 #pragma omp single /* { dg-error "may not be closely nested" } */
82 #pragma omp master /* { dg-error "may not be closely nested" } */
87 #pragma omp for /* { dg-error "may not be closely nested" } */
88 for (j
= 0; j
< 3; j
++)
90 #pragma omp sections /* { dg-error "may not be closely nested" } */
96 #pragma omp single /* { dg-error "may not be closely nested" } */
98 #pragma omp master /* { dg-error "may not be closely nested" } */
100 #pragma omp barrier /* { dg-error "may not be closely nested" } */
104 #pragma omp for /* { dg-error "may not be closely nested" } */
105 for (j
= 0; j
< 3; j
++)
107 #pragma omp sections /* { dg-error "may not be closely nested" } */
113 #pragma omp single /* { dg-error "may not be closely nested" } */
117 #pragma omp barrier /* { dg-error "may not be closely nested" } */
121 #pragma omp for /* { dg-error "may not be closely nested" } */
122 for (j
= 0; j
< 3; j
++)
124 #pragma omp sections /* { dg-error "may not be closely nested" } */
130 #pragma omp single /* { dg-error "may not be closely nested" } */
132 #pragma omp master /* { dg-error "may not be closely nested" } */
134 #pragma omp barrier /* { dg-error "may not be closely nested" } */
139 for (j
= 0; j
< 3; j
++)
161 #pragma omp for /* { dg-error "may not be closely nested" } */
162 for (j
= 0; j
< 3; j
++)
164 #pragma omp sections /* { dg-error "may not be closely nested" } */
170 #pragma omp single /* { dg-error "may not be closely nested" } */
174 #pragma omp barrier /* { dg-error "may not be closely nested" } */
183 #pragma omp ordered /* { dg-error "may not be closely nested" } */
193 #pragma omp ordered /* { dg-error "may not be closely nested" } */
203 for (i
= 0; i
< 10; i
++)
205 #pragma omp ordered /* { dg-error "must be closely nested" } */
208 #pragma omp for ordered
209 for (i
= 0; i
< 10; i
++)
219 #pragma omp critical (foo)
220 #pragma omp critical (bar)
223 #pragma omp critical (baz)
230 #pragma omp critical (foo2)
233 #pragma omp critical (bar)
234 #pragma omp critical (bar) /* { dg-error "may not be nested" } */
237 #pragma omp critical /* { dg-error "may not be nested" } */