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 masked /* { dg-error "may not be closely nested" } */
26 #pragma omp barrier /* { dg-error "may not be closely nested" } */
27 #pragma omp scope /* { dg-error "may not be closely nested" } */
32 #pragma omp for /* { dg-error "may not be closely nested" } */
33 for (j
= 0; j
< 3; j
++)
38 #pragma omp sections /* { dg-error "may not be closely nested" } */
47 #pragma omp single /* { dg-error "may not be closely nested" } */
52 #pragma omp master /* { dg-error "may not be closely nested" } */
57 #pragma omp masked /* { dg-error "may not be closely nested" } */
62 #pragma omp scope /* { dg-error "may not be closely nested" } */
73 #pragma omp for /* { dg-error "may not be closely nested" } */
74 for (j
= 0; j
< 3; j
++)
80 #pragma omp sections /* { dg-error "may not be closely nested" } */
90 #pragma omp single /* { dg-error "may not be closely nested" } */
96 #pragma omp master /* { dg-error "may not be closely nested" } */
99 #pragma omp masked /* { dg-error "may not be closely nested" } */
105 #pragma omp scope /* { dg-error "may not be closely nested" } */
110 #pragma omp for /* { dg-error "may not be closely nested" } */
111 for (j
= 0; j
< 3; j
++)
113 #pragma omp sections /* { dg-error "may not be closely nested" } */
119 #pragma omp single /* { dg-error "may not be closely nested" } */
121 #pragma omp master /* { dg-error "may not be closely nested" } */
123 #pragma omp masked /* { dg-error "may not be closely nested" } */
125 #pragma omp barrier /* { dg-error "may not be closely nested" } */
126 #pragma omp scope /* { dg-error "may not be closely nested" } */
131 #pragma omp for /* { dg-error "may not be closely nested" } */
132 for (j
= 0; j
< 3; j
++)
134 #pragma omp sections /* { dg-error "may not be closely nested" } */
140 #pragma omp single /* { dg-error "may not be closely nested" } */
144 #pragma omp barrier /* { dg-error "may not be closely nested" } */
145 #pragma omp scope /* { dg-error "may not be closely nested" } */
148 #pragma omp masked filter (1)
150 #pragma omp for /* { dg-error "may not be closely nested" } */
151 for (j
= 0; j
< 3; j
++)
153 #pragma omp sections /* { dg-error "may not be closely nested" } */
159 #pragma omp single /* { dg-error "may not be closely nested" } */
163 #pragma omp barrier /* { dg-error "may not be closely nested" } */
164 #pragma omp scope /* { dg-error "may not be closely nested" } */
169 #pragma omp for /* { dg-error "may not be closely nested" } */
170 for (j
= 0; j
< 3; j
++)
172 #pragma omp sections /* { dg-error "may not be closely nested" } */
178 #pragma omp single /* { dg-error "may not be closely nested" } */
180 #pragma omp master /* { dg-error "may not be closely nested" } */
182 #pragma omp masked /* { dg-error "may not be closely nested" } */
184 #pragma omp barrier /* { dg-error "may not be closely nested" } */
185 #pragma omp scope /* { dg-error "may not be closely nested" } */
191 for (j
= 0; j
< 3; j
++)
217 for (j
= 0; j
< 3; j
++)
248 #pragma omp for /* { dg-error "may not be closely nested" } */
249 for (j
= 0; j
< 3; j
++)
251 #pragma omp sections /* { dg-error "may not be closely nested" } */
257 #pragma omp single /* { dg-error "may not be closely nested" } */
263 #pragma omp barrier /* { dg-error "may not be closely nested" } */
264 #pragma omp scope /* { dg-error "may not be closely nested" } */
274 #pragma omp ordered /* { dg-error "may not be closely nested" } */
276 #pragma omp scope /* { dg-error "may not be closely nested" } */
286 #pragma omp ordered /* { dg-error "may not be closely nested" } */
288 #pragma omp scope /* { dg-error "may not be closely nested" } */
298 for (i
= 0; i
< 10; i
++)
300 #pragma omp ordered /* { dg-error "must be closely nested" } */
303 #pragma omp for ordered
304 for (i
= 0; i
< 10; i
++)
314 #pragma omp critical (foo)
315 #pragma omp critical (bar)
318 #pragma omp critical (baz)
325 #pragma omp critical (foo2)
328 #pragma omp critical (bar)
329 #pragma omp critical (bar) /* { dg-error "may not be nested" } */
332 #pragma omp critical /* { dg-error "may not be nested" } */