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++)
31 #pragma omp sections /* { dg-error "may not be closely nested" } */
37 #pragma omp single /* { dg-error "may not be closely nested" } */
39 #pragma omp master /* { dg-error "may not be closely nested" } */
46 #pragma omp for /* { dg-error "may not be closely nested" } */
47 for (j = 0; j < 3; j++)
49 #pragma omp sections /* { dg-error "may not be closely nested" } */
55 #pragma omp single /* { dg-error "may not be closely nested" } */
57 #pragma omp master /* { dg-error "may not be closely nested" } */
59 #pragma omp barrier /* { dg-error "may not be closely nested" } */
63 #pragma omp for /* { dg-error "may not be closely nested" } */
64 for (j = 0; j < 3; j++)
66 #pragma omp sections /* { dg-error "may not be closely nested" } */
72 #pragma omp single /* { dg-error "may not be closely nested" } */
76 #pragma omp barrier /* { dg-error "may not be closely nested" } */
80 #pragma omp for /* { dg-error "may not be closely nested" } */
81 for (j = 0; j < 3; j++)
83 #pragma omp sections /* { dg-error "may not be closely nested" } */
89 #pragma omp single /* { dg-error "may not be closely nested" } */
91 #pragma omp master /* { dg-error "may not be closely nested" } */
93 #pragma omp barrier /* { dg-error "may not be closely nested" } */
98 for (j = 0; j < 3; j++)
120 #pragma omp for /* { dg-error "may not be closely nested" } */
121 for (j = 0; j < 3; j++)
123 #pragma omp sections /* { dg-error "may not be closely nested" } */
129 #pragma omp single /* { dg-error "may not be closely nested" } */
133 #pragma omp barrier /* { dg-error "may not be closely nested" } */
142 #pragma omp ordered /* { dg-error "may not be closely nested" } */
152 #pragma omp ordered /* { dg-error "may not be closely nested" } */
162 for (i = 0; i < 10; i++)
164 #pragma omp ordered /* { dg-error "must be closely nested" } */
167 #pragma omp for ordered
168 for (i = 0; i < 10; i++)
178 #pragma omp critical (foo)
179 #pragma omp critical (bar)
182 #pragma omp critical (baz)
189 #pragma omp critical (foo2)
192 #pragma omp critical (bar)
193 #pragma omp critical (bar) /* { dg-error "may not be nested" } */
196 #pragma omp critical /* { dg-error "may not be nested" } */