Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / nesting_of_regions.cpp
blob9442fb20647d0fd627140ee1c904a087be6c0ce4
1 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
2 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fno-openmp-extensions -verify=expected,omp50,omp %s
3 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-extensions -verify=expected,omp50 %s
4 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45,omp -fno-openmp-extensions -Wno-openmp %s
5 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45,omp -fno-openmp-extensions -Wno-source-uses-openmp %s
6 // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions -Wno-source-uses-openmp %s
8 // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
9 // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify=expected,omp50,omp -fno-openmp-extensions %s
10 // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions %s
11 // SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
13 void bar();
15 template <class T>
16 void foo() {
17 T a = T();
18 // PARALLEL DIRECTIVE
19 #pragma omp parallel
20 #pragma omp for
21 for (int i = 0; i < 10; ++i)
23 #pragma omp parallel
24 #pragma omp simd
25 for (int i = 0; i < 10; ++i)
27 #pragma omp parallel
28 #pragma omp for simd
29 for (int i = 0; i < 10; ++i)
31 #pragma omp parallel
32 #pragma omp sections
34 bar();
36 #pragma omp parallel
37 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel region}}
39 bar();
41 #pragma omp parallel
42 #pragma omp single
43 bar();
45 #pragma omp parallel
46 #pragma omp master
48 bar();
50 #pragma omp parallel
51 #pragma omp critical
53 bar();
55 #pragma omp parallel
56 #pragma omp parallel for
57 for (int i = 0; i < 10; ++i)
59 #pragma omp parallel
60 #pragma omp parallel for simd
61 for (int i = 0; i < 10; ++i)
63 #pragma omp parallel
64 #pragma omp parallel sections
66 bar();
68 #pragma omp parallel
69 #pragma omp parallel master
71 bar();
73 #pragma omp parallel
74 #pragma omp parallel masked
76 bar();
78 #pragma omp parallel
79 #pragma omp task
81 bar();
83 #pragma omp parallel
85 #pragma omp taskyield
86 bar();
88 #pragma omp parallel
90 #pragma omp barrier
91 bar();
93 #pragma omp parallel
95 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
96 bar();
98 #pragma omp parallel
100 #pragma omp taskwait
101 bar();
103 #pragma omp parallel
105 #pragma omp flush
106 bar();
108 #pragma omp parallel
110 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
111 bar();
113 #pragma omp parallel
115 #pragma omp atomic
116 ++a;
118 #pragma omp parallel
120 #pragma omp target
121 ++a;
123 #pragma omp parallel
125 #pragma omp target parallel
126 ++a;
128 #pragma omp parallel
130 #pragma omp target parallel for
131 for (int i = 0; i < 10; ++i)
134 #pragma omp parallel
136 #pragma omp target enter data map(to: a)
137 ++a;
139 #pragma omp parallel
141 #pragma omp target exit data map(from: a)
142 ++a;
144 #pragma omp parallel
146 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
147 ++a;
149 #pragma omp parallel
151 #pragma omp taskloop
152 for (int i = 0; i < 10; ++i)
153 ++a;
155 #pragma omp parallel
157 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
158 for (int i = 0; i < 10; ++i)
161 #pragma omp parallel
163 #pragma omp target update to(a)
165 #pragma omp parallel
167 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
168 for (int i = 0; i < 10; ++i)
171 #pragma omp parallel
173 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
174 for (int i = 0; i < 10; ++i)
177 #pragma omp parallel
179 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
180 for (int i = 0; i < 10; ++i)
183 #pragma omp parallel
185 #pragma omp target simd // OK
186 for (int i = 0; i < 10; ++i)
189 #pragma omp parallel
191 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
192 for (int i = 0; i < 10; ++i)
195 #pragma omp parallel
197 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
198 for (int i = 0; i < 10; ++i)
201 #pragma omp parallel
203 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
204 for (int i = 0; i < 10; ++i)
207 #pragma omp parallel
209 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
210 for (int i = 0; i < 10; ++i)
213 #pragma omp parallel
215 #pragma omp target teams // OK
216 ++a;
218 #pragma omp parallel
220 #pragma omp target teams distribute // OK
221 for (int i = 0; i < 10; ++i)
224 #pragma omp parallel
226 #pragma omp target teams distribute parallel for // OK
227 for (int i = 0; i < 10; ++i)
230 #pragma omp parallel
232 #pragma omp target teams distribute parallel for simd // OK
233 for (int i = 0; i < 10; ++i)
236 #pragma omp parallel
238 #pragma omp target teams distribute simd // OK
239 for (int i = 0; i < 10; ++i)
243 // SIMD DIRECTIVE
244 #pragma omp simd
245 for (int i = 0; i < 10; ++i) {
246 #pragma omp for // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{OpenMP constructs may not be nested inside a simd region except for ordered simd, simd, scan, or atomic directive}} omp51-error {{OpenMP constructs may not be nested inside a simd region except for ordered simd, simd, scan, or atomic directive}}
247 for (int i = 0; i < 10; ++i)
250 #pragma omp simd
251 for (int i = 0; i < 10; ++i) {
252 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
253 for (int i = 0; i < 10; ++i)
256 #pragma omp simd
257 for (int i = 0; i < 10; ++i) {
258 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
259 for (int i = 0; i < 10; ++i)
262 #pragma omp simd
263 for (int i = 0; i < 10; ++i) {
264 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
265 for (int i = 0; i < 10; ++i)
268 #pragma omp simd
269 for (int i = 0; i < 10; ++i) {
270 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
272 bar();
275 #pragma omp simd
276 for (int i = 0; i < 10; ++i) {
277 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
279 bar();
282 #pragma omp simd
283 for (int i = 0; i < 10; ++i) {
284 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
286 bar();
289 #pragma omp simd
290 for (int i = 0; i < 10; ++i) {
291 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
293 bar();
296 #pragma omp simd
297 for (int i = 0; i < 10; ++i) {
298 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
300 bar();
303 #pragma omp simd
304 for (int i = 0; i < 10; ++i) {
305 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
306 for (int i = 0; i < 10; ++i)
309 #pragma omp simd
310 for (int i = 0; i < 10; ++i) {
311 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
312 for (int i = 0; i < 10; ++i)
315 #pragma omp simd
316 for (int i = 0; i < 10; ++i) {
317 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
319 bar();
322 #pragma omp simd
323 for (int i = 0; i < 10; ++i) {
324 #pragma omp parallel master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
326 bar();
329 #pragma omp simd
330 for (int i = 0; i < 10; ++i) {
331 #pragma omp parallel masked // expected-error {{OpenMP constructs may not be nested inside a simd region}}
333 bar();
336 #pragma omp simd
337 for (int i = 0; i < 10; ++i) {
338 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
340 bar();
343 #pragma omp simd
344 for (int i = 0; i < 10; ++i) {
345 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
346 bar();
348 #pragma omp simd
349 for (int i = 0; i < 10; ++i) {
350 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
351 bar();
353 #pragma omp simd
354 for (int i = 0; i < 10; ++i) {
355 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
356 bar();
358 #pragma omp simd
359 for (int i = 0; i < 10; ++i) {
360 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
361 bar();
363 #pragma omp simd
364 for (int i = 0; i < 10; ++i) {
365 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
366 bar();
368 #pragma omp simd
369 for (int i = 0; i < 10; ++i) {
370 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
371 bar();
373 #pragma omp simd
374 for (int i = 0; i < 10; ++i) {
375 #pragma omp ordered simd // OK
376 bar();
378 #pragma omp simd
379 for (int i = 0; i < 10; ++i) {
380 #pragma omp ordered threads // expected-error {{OpenMP constructs may not be nested inside a simd region}}
381 bar();
383 #pragma omp simd
384 for (int i = 0; i < 10; ++i) {
385 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
386 ++a;
388 #pragma omp simd
389 for (int i = 0; i < 10; ++i) {
390 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
391 ++a;
393 #pragma omp simd
394 for (int i = 0; i < 10; ++i) {
395 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
396 ++a;
398 #pragma omp simd
399 for (int i = 0; i < 10; ++i) {
400 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
401 for (int i = 0; i < 10; ++i)
404 #pragma omp simd
405 for (int i = 0; i < 10; ++i) {
406 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
407 ++a;
409 #pragma omp simd
410 for (int i = 0; i < 10; ++i) {
411 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
412 ++a;
414 #pragma omp simd
415 for (int i = 0; i < 10; ++i) {
416 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
417 ++a;
419 #pragma omp simd
420 for (int i = 0; i < 10; ++i) {
421 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
422 for (int i = 0; i < 10; ++i)
423 ++a;
425 #pragma omp simd
426 for (int i = 0; i < 10; ++i) {
427 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
428 for (int j = 0; j < 10; ++j)
431 #pragma omp simd
432 for (int i = 0; i < 10; ++i) {
433 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
435 #pragma omp simd
436 for (int i = 0; i < 10; ++i) {
437 #pragma omp distribute parallel for// expected-error {{OpenMP constructs may not be nested inside a simd region}}
438 for (int j = 0; j < 10; ++j)
441 #pragma omp simd
442 for (int i = 0; i < 10; ++i) {
443 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
444 for (int j = 0; j < 10; ++j)
447 #pragma omp simd
448 for (int i = 0; i < 10; ++i) {
449 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
450 for (int j = 0; j < 10; ++j)
453 #pragma omp simd
454 for (int i = 0; i < 10; ++i) {
455 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
456 for (int j = 0; j < 10; ++j)
459 #pragma omp simd
460 for (int i = 0; i < 10; ++i) {
461 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
462 for (int j = 0; j < 10; ++j)
465 #pragma omp simd
466 for (int i = 0; i < 10; ++i) {
467 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
468 for (int j = 0; j < 10; ++j)
471 #pragma omp simd
472 for (int i = 0; i < 10; ++i) {
473 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
474 for (int j = 0; j < 10; ++j)
477 #pragma omp simd
478 for (int i = 0; i < 10; ++i) {
479 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
480 for (int j = 0; j < 10; ++j)
483 #pragma omp simd
484 for (int i = 0; i < 10; ++i) {
485 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
486 ++a;
488 #pragma omp simd
489 for (int i = 0; i < 10; ++i) {
490 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
491 for (int j = 0; j < 10; ++j)
494 #pragma omp simd
495 for (int i = 0; i < 10; ++i) {
496 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
497 for (int j = 0; j < 10; ++j)
500 #pragma omp simd
501 for (int i = 0; i < 10; ++i) {
502 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
503 for (int j = 0; j < 10; ++j)
506 #pragma omp simd
507 for (int i = 0; i < 10; ++i) {
508 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
509 for (int j = 0; j < 10; ++j)
513 // FOR DIRECTIVE
514 #pragma omp for
515 for (int i = 0; i < 10; ++i) {
516 #pragma omp for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
517 for (int i = 0; i < 10; ++i)
520 #pragma omp for
521 for (int i = 0; i < 10; ++i) {
522 #pragma omp simd
523 for (int i = 0; i < 10; ++i)
526 #pragma omp for
527 for (int i = 0; i < 10; ++i) {
528 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
529 for (int i = 0; i < 10; ++i)
532 #pragma omp for
533 for (int i = 0; i < 10; ++i) {
534 #pragma omp parallel
535 for (int i = 0; i < 10; ++i)
538 #pragma omp for
539 for (int i = 0; i < 10; ++i) {
540 #pragma omp sections // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
542 bar();
545 #pragma omp for
546 for (int i = 0; i < 10; ++i) {
547 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a for region}}
549 bar();
552 #pragma omp for
553 for (int i = 0; i < 10; ++i) {
554 #pragma omp single // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
556 bar();
560 #pragma omp for
561 for (int i = 0; i < 10; ++i) {
562 #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
564 bar();
567 #pragma omp for
568 for (int i = 0; i < 10; ++i) {
569 #pragma omp critical
571 bar();
574 #pragma omp for
575 for (int i = 0; i < 10; ++i) {
576 #pragma omp parallel
578 #pragma omp single // OK
580 bar();
582 #pragma omp for // OK
583 for (int i = 0; i < 10; ++i)
585 #pragma omp sections // OK
587 bar();
591 #pragma omp for
592 for (int i = 0; i < 10; ++i) {
593 #pragma omp parallel for
594 for (int i = 0; i < 10; ++i)
597 #pragma omp for
598 for (int i = 0; i < 10; ++i) {
599 #pragma omp parallel for simd
600 for (int i = 0; i < 10; ++i)
603 #pragma omp for
604 for (int i = 0; i < 10; ++i) {
605 #pragma omp parallel master
607 bar();
610 #pragma omp for
611 for (int i = 0; i < 10; ++i) {
612 #pragma omp parallel masked
614 bar();
617 #pragma omp for
618 for (int i = 0; i < 10; ++i) {
619 #pragma omp parallel sections
621 bar();
624 #pragma omp for
625 for (int i = 0; i < 10; ++i) {
626 #pragma omp task
628 bar();
631 #pragma omp for
632 for (int i = 0; i < 10; ++i) {
633 #pragma omp taskyield
634 bar();
636 #pragma omp for
637 for (int i = 0; i < 10; ++i) {
638 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'for' region}}
639 bar();
641 #pragma omp for
642 for (int i = 0; i < 10; ++i) {
643 #pragma omp scan // omp45-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
644 bar();
646 #pragma omp for
647 for (int i = 0; i < 10; ++i) {
648 #pragma omp taskwait
649 bar();
651 #pragma omp for
652 for (int i = 0; i < 10; ++i) {
653 #pragma omp flush
654 bar();
656 #pragma omp for
657 for (int i = 0; i < 10; ++i) {
658 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
659 bar();
661 #pragma omp for ordered
662 for (int i = 0; i < 10; ++i) {
663 #pragma omp ordered // OK
664 bar();
666 #pragma omp for
667 for (int i = 0; i < 10; ++i) {
668 #pragma omp atomic
669 ++a;
671 #pragma omp for
672 for (int i = 0; i < 10; ++i) {
673 #pragma omp target
674 ++a;
676 #pragma omp for
677 for (int i = 0; i < 10; ++i) {
678 #pragma omp target parallel
679 ++a;
681 #pragma omp for
682 for (int i = 0; i < 10; ++i) {
683 #pragma omp target parallel for
684 for (int i = 0; i < 10; ++i)
687 #pragma omp for
688 for (int i = 0; i < 10; ++i) {
689 #pragma omp target enter data map(to: a)
690 ++a;
692 #pragma omp for
693 for (int i = 0; i < 10; ++i) {
694 #pragma omp target exit data map(from: a)
695 ++a;
697 #pragma omp for
698 for (int i = 0; i < 10; ++i) {
699 #pragma omp teams // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
700 ++a;
702 #pragma omp for
703 for (int i = 0; i < 10; ++i) {
704 #pragma omp taskloop
705 for (int i = 0; i < 10; ++i)
706 ++a;
708 #pragma omp for
709 for (int i = 0; i < 10; ++i) {
710 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
711 for (int j = 0; j < 10; ++j)
714 #pragma omp for
715 for (int i = 0; i < 10; ++i) {
716 #pragma omp target update to(a)
718 #pragma omp for
719 for (int i = 0; i < 10; ++i) {
720 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
721 for (int j = 0; j < 10; ++j)
724 #pragma omp for
725 for (int i = 0; i < 10; ++i) {
726 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
727 for (int j = 0; j < 10; ++j)
730 #pragma omp for
731 for (int i = 0; i < 10; ++i) {
732 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
733 for (int j = 0; j < 10; ++j)
736 #pragma omp for
737 for (int i = 0; i < 10; ++i) {
738 #pragma omp target simd // OK
739 for (int j = 0; j < 10; ++j)
742 #pragma omp for
743 for (int i = 0; i < 10; ++i) {
744 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
745 for (int j = 0; j < 10; ++j)
748 #pragma omp for
749 for (int i = 0; i < 10; ++i) {
750 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
751 for (int j = 0; j < 10; ++j)
754 #pragma omp for
755 for (int i = 0; i < 10; ++i) {
756 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
757 for (int j = 0; j < 10; ++j)
760 #pragma omp for
761 for (int i = 0; i < 10; ++i) {
762 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
763 for (int j = 0; j < 10; ++j)
766 #pragma omp for
767 for (int i = 0; i < 10; ++i) {
768 #pragma omp target teams // OK
769 ++a;
771 #pragma omp for
772 for (int i = 0; i < 10; ++i) {
773 #pragma omp target teams distribute // OK
774 for (int j = 0; j < 10; ++j)
777 #pragma omp for
778 for (int i = 0; i < 10; ++i) {
779 #pragma omp target teams distribute parallel for // OK
780 for (int j = 0; j < 10; ++j)
783 #pragma omp for
784 for (int i = 0; i < 10; ++i) {
785 #pragma omp target teams distribute parallel for simd // OK
786 for (int j = 0; j < 10; ++j)
789 #pragma omp for
790 for (int i = 0; i < 10; ++i) {
791 #pragma omp target teams distribute simd // OK
792 for (int j = 0; j < 10; ++j)
796 // FOR SIMD DIRECTIVE
797 #pragma omp for simd
798 for (int i = 0; i < 10; ++i) {
799 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
800 for (int i = 0; i < 10; ++i)
803 #pragma omp for simd
804 for (int i = 0; i < 10; ++i) {
805 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
806 for (int i = 0; i < 10; ++i)
809 #pragma omp for simd
810 for (int i = 0; i < 10; ++i) {
811 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
812 for (int i = 0; i < 10; ++i)
815 #pragma omp for simd
816 for (int i = 0; i < 10; ++i) {
817 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
818 for (int i = 0; i < 10; ++i)
821 #pragma omp for simd
822 for (int i = 0; i < 10; ++i) {
823 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
825 bar();
828 #pragma omp for simd
829 for (int i = 0; i < 10; ++i) {
830 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
832 bar();
835 #pragma omp for simd
836 for (int i = 0; i < 10; ++i) {
837 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
839 bar();
842 #pragma omp for simd
843 for (int i = 0; i < 10; ++i) {
844 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
846 bar();
849 #pragma omp for simd
850 for (int i = 0; i < 10; ++i) {
851 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
853 bar();
856 #pragma omp for simd
857 for (int i = 0; i < 10; ++i) {
858 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
859 for (int i = 0; i < 10; ++i)
862 #pragma omp for simd
863 for (int i = 0; i < 10; ++i) {
864 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
865 for (int i = 0; i < 10; ++i)
868 #pragma omp for simd
869 for (int i = 0; i < 10; ++i) {
870 #pragma omp parallel master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
872 bar();
875 #pragma omp for simd
876 for (int i = 0; i < 10; ++i) {
877 #pragma omp parallel masked // expected-error {{OpenMP constructs may not be nested inside a simd region}}
879 bar();
882 #pragma omp for simd
883 for (int i = 0; i < 10; ++i) {
884 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
886 bar();
889 #pragma omp for simd
890 for (int i = 0; i < 10; ++i) {
891 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
893 bar();
896 #pragma omp for simd
897 for (int i = 0; i < 10; ++i) {
898 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
899 bar();
901 #pragma omp for simd
902 for (int i = 0; i < 10; ++i) {
903 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
904 bar();
906 #pragma omp for simd
907 for (int i = 0; i < 10; ++i) {
908 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
909 bar();
911 #pragma omp for simd
912 for (int i = 0; i < 10; ++i) {
913 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
914 bar();
916 #pragma omp for simd
917 for (int i = 0; i < 10; ++i) {
918 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
919 bar();
921 #pragma omp for simd
922 for (int i = 0; i < 10; ++i) {
923 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
924 bar();
926 #pragma omp for simd
927 for (int i = 0; i < 10; ++i) {
928 #pragma omp ordered simd // OK
929 bar();
931 #pragma omp for simd
932 for (int i = 0; i < 10; ++i) {
933 #pragma omp ordered threads // expected-error {{OpenMP constructs may not be nested inside a simd region}}
934 bar();
936 #pragma omp for simd
937 for (int i = 0; i < 10; ++i) {
938 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
939 ++a;
941 #pragma omp for simd
942 for (int i = 0; i < 10; ++i) {
943 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
944 ++a;
946 #pragma omp for simd
947 for (int i = 0; i < 10; ++i) {
948 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
949 ++a;
951 #pragma omp for simd
952 for (int i = 0; i < 10; ++i) {
953 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
954 for (int i = 0; i < 10; ++i)
957 #pragma omp for simd
958 for (int i = 0; i < 10; ++i) {
959 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
960 ++a;
962 #pragma omp for simd
963 for (int i = 0; i < 10; ++i) {
964 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
965 ++a;
967 #pragma omp for simd
968 for (int i = 0; i < 10; ++i) {
969 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
970 ++a;
972 #pragma omp for simd
973 for (int i = 0; i < 10; ++i) {
974 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
975 for (int i = 0; i < 10; ++i)
976 ++a;
978 #pragma omp for simd
979 for (int i = 0; i < 10; ++i) {
980 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
981 for (int j = 0; j < 10; ++j)
984 #pragma omp for simd
985 for (int i = 0; i < 10; ++i) {
986 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
987 bar();
989 #pragma omp for simd
990 for (int i = 0; i < 10; ++i) {
991 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
992 for (int j = 0; j < 10; ++j)
995 #pragma omp for simd
996 for (int i = 0; i < 10; ++i) {
997 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
998 for (int j = 0; j < 10; ++j)
1001 #pragma omp for simd
1002 for (int i = 0; i < 10; ++i) {
1003 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1004 for (int j = 0; j < 10; ++j)
1007 #pragma omp for simd
1008 for (int i = 0; i < 10; ++i) {
1009 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1010 for (int j = 0; j < 10; ++j)
1013 #pragma omp for simd
1014 for (int i = 0; i < 10; ++i) {
1015 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1016 for (int j = 0; j < 10; ++j)
1019 #pragma omp for simd
1020 for (int i = 0; i < 10; ++i) {
1021 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1022 for (int j = 0; j < 10; ++j)
1025 #pragma omp for simd
1026 for (int i = 0; i < 10; ++i) {
1027 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1028 for (int j = 0; j < 10; ++j)
1031 #pragma omp for simd
1032 for (int i = 0; i < 10; ++i) {
1033 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1034 for (int j = 0; j < 10; ++j)
1037 #pragma omp for simd
1038 for (int i = 0; i < 10; ++i) {
1039 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1040 a++;
1042 #pragma omp for simd
1043 for (int i = 0; i < 10; ++i) {
1044 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1045 for (int j = 0; j < 10; ++j)
1048 #pragma omp for simd
1049 for (int i = 0; i < 10; ++i) {
1050 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1051 for (int j = 0; j < 10; ++j)
1054 #pragma omp for simd
1055 for (int i = 0; i < 10; ++i) {
1056 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1057 for (int j = 0; j < 10; ++j)
1060 #pragma omp for simd
1061 for (int i = 0; i < 10; ++i) {
1062 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
1063 for (int j = 0; j < 10; ++j)
1067 // SECTIONS DIRECTIVE
1068 #pragma omp sections
1070 #pragma omp for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
1071 for (int i = 0; i < 10; ++i)
1074 #pragma omp sections
1076 #pragma omp simd
1077 for (int i = 0; i < 10; ++i)
1080 #pragma omp sections
1082 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
1083 for (int i = 0; i < 10; ++i)
1086 #pragma omp sections
1088 #pragma omp parallel
1089 for (int i = 0; i < 10; ++i)
1092 #pragma omp sections
1094 #pragma omp sections // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
1096 bar();
1099 #pragma omp sections
1101 #pragma omp section
1103 bar();
1106 #pragma omp sections
1108 #pragma omp parallel
1110 #pragma omp single // OK
1112 bar();
1114 #pragma omp for // OK
1115 for (int i = 0; i < 10; ++i)
1117 #pragma omp sections // OK
1119 bar();
1123 #pragma omp sections
1125 #pragma omp parallel master
1127 bar();
1130 #pragma omp sections
1132 #pragma omp parallel masked
1134 bar();
1137 #pragma omp sections
1139 #pragma omp parallel
1141 #pragma omp master // OK
1143 bar();
1145 #pragma omp for // OK
1146 for (int i = 0; i < 10; ++i)
1148 #pragma omp master // OK
1150 bar();
1153 #pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
1154 bar();
1156 #pragma omp sections
1158 #pragma omp parallel
1160 #pragma omp critical(A) // OK
1162 bar();
1164 #pragma omp for // OK
1165 for (int i = 0; i < 10; ++i)
1167 #pragma omp critical // OK
1169 bar();
1172 #pragma omp critical(A) // expected-error {{statement in 'omp sections' directive must be enclosed into a section region}}
1173 bar();
1175 #pragma omp sections
1177 #pragma omp parallel for
1178 for (int i = 0; i < 10; ++i)
1181 #pragma omp sections
1183 #pragma omp parallel for simd
1184 for (int i = 0; i < 10; ++i)
1187 #pragma omp sections
1189 #pragma omp parallel sections
1191 bar();
1194 #pragma omp sections
1196 #pragma omp task
1198 bar();
1201 #pragma omp sections
1203 #pragma omp taskyield
1205 #pragma omp sections
1207 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'sections' region}}
1209 #pragma omp sections
1211 #pragma omp scan // expected-error {{region cannot be closely nested inside 'sections' region}}
1213 #pragma omp sections
1215 #pragma omp taskwait
1217 #pragma omp sections
1219 #pragma omp flush
1221 #pragma omp sections
1223 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
1224 bar();
1226 #pragma omp sections
1228 #pragma omp atomic
1229 ++a;
1231 #pragma omp sections
1233 #pragma omp target
1234 ++a;
1236 #pragma omp sections
1238 #pragma omp target parallel
1239 ++a;
1241 #pragma omp sections
1243 #pragma omp target parallel for
1244 for (int i = 0; i < 10; ++i)
1247 #pragma omp sections
1249 #pragma omp target enter data map(to: a)
1251 #pragma omp sections
1253 #pragma omp target exit data map(from: a)
1255 #pragma omp sections
1257 #pragma omp teams // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
1258 ++a;
1260 #pragma omp sections
1262 #pragma omp taskloop
1263 for (int i = 0; i < 10; ++i)
1264 ++a;
1266 #pragma omp sections
1268 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
1269 for (int i = 0; i < 10; ++i)
1272 #pragma omp sections
1274 #pragma omp target update to(a)
1276 #pragma omp sections
1278 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
1279 for (int i = 0; i < 10; ++i)
1282 #pragma omp sections
1284 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
1285 for (int i = 0; i < 10; ++i)
1288 #pragma omp sections
1290 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
1291 for (int i = 0; i < 10; ++i)
1294 #pragma omp sections
1296 #pragma omp target simd // OK
1297 for (int i = 0; i < 10; ++i)
1300 #pragma omp sections
1302 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
1303 for (int i = 0; i < 10; ++i)
1306 #pragma omp sections
1308 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
1309 for (int i = 0; i < 10; ++i)
1312 #pragma omp sections
1314 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
1315 for (int i = 0; i < 10; ++i)
1318 #pragma omp sections
1320 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
1321 for (int i = 0; i < 10; ++i)
1324 #pragma omp sections
1326 #pragma omp target teams // OK
1327 ++a;
1329 #pragma omp sections
1331 #pragma omp target teams distribute // OK
1332 for (int i = 0; i < 10; ++i)
1335 #pragma omp sections
1337 #pragma omp target teams distribute parallel for // OK
1338 for (int i = 0; i < 10; ++i)
1341 #pragma omp sections
1343 #pragma omp target teams distribute parallel for simd // OK
1344 for (int i = 0; i < 10; ++i)
1347 #pragma omp sections
1349 #pragma omp target teams distribute simd // OK
1350 for (int i = 0; i < 10; ++i)
1354 // SECTION DIRECTIVE
1355 #pragma omp section // expected-error {{orphaned 'omp section' directives are prohibited, it must be closely nested to a sections region}}
1357 bar();
1359 #pragma omp sections
1361 #pragma omp section
1363 #pragma omp for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
1364 for (int i = 0; i < 10; ++i)
1368 #pragma omp sections
1370 #pragma omp section
1372 #pragma omp simd
1373 for (int i = 0; i < 10; ++i)
1377 #pragma omp sections
1379 #pragma omp section
1381 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
1382 for (int i = 0; i < 10; ++i)
1386 #pragma omp sections
1388 #pragma omp section
1390 #pragma omp parallel
1391 for (int i = 0; i < 10; ++i)
1395 #pragma omp sections
1397 #pragma omp section
1399 #pragma omp sections // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
1401 bar();
1405 #pragma omp sections
1407 #pragma omp section
1409 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a section region}}
1411 bar();
1415 #pragma omp sections
1417 #pragma omp section
1419 #pragma omp parallel master
1420 bar();
1421 #pragma omp critical
1422 bar();
1425 #pragma omp sections
1427 #pragma omp section
1429 #pragma omp parallel masked
1430 bar();
1431 #pragma omp critical
1432 bar();
1435 #pragma omp sections
1437 #pragma omp section
1439 #pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
1440 bar();
1441 #pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
1442 bar();
1443 #pragma omp critical
1444 bar();
1447 #pragma omp sections
1449 #pragma omp section
1451 #pragma omp parallel
1453 #pragma omp single // OK
1455 bar();
1457 #pragma omp for // OK
1458 for (int i = 0; i < 10; ++i)
1460 #pragma omp for simd // OK
1461 for (int i = 0; i < 10; ++i)
1463 #pragma omp sections // OK
1465 bar();
1470 #pragma omp sections
1472 #pragma omp section
1474 #pragma omp parallel for
1475 for (int i = 0; i < 10; ++i)
1479 #pragma omp sections
1481 #pragma omp section
1483 #pragma omp parallel for simd
1484 for (int i = 0; i < 10; ++i)
1488 #pragma omp sections
1490 #pragma omp section
1492 #pragma omp parallel sections
1494 bar();
1498 #pragma omp sections
1500 #pragma omp section
1502 #pragma omp task
1504 bar();
1508 #pragma omp sections
1510 #pragma omp section
1512 #pragma omp taskyield
1513 bar();
1516 #pragma omp sections
1518 #pragma omp section
1520 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'section' region}}
1521 bar();
1524 #pragma omp sections
1526 #pragma omp section
1528 #pragma omp scan // expected-error {{region cannot be closely nested inside 'section' region}}
1529 bar();
1532 #pragma omp sections
1534 #pragma omp section
1536 #pragma omp taskwait
1537 bar();
1540 #pragma omp sections
1542 #pragma omp section
1544 #pragma omp flush
1545 bar();
1548 #pragma omp sections
1550 #pragma omp section
1552 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
1553 bar();
1556 #pragma omp sections
1558 #pragma omp section
1559 #pragma omp atomic
1560 ++a;
1562 #pragma omp sections
1564 #pragma omp section
1565 #pragma omp target
1566 ++a;
1568 #pragma omp sections
1570 #pragma omp section
1571 #pragma omp target parallel
1572 ++a;
1574 #pragma omp sections
1576 #pragma omp section
1578 #pragma omp target parallel for
1579 for (int i = 0; i < 10; ++i)
1583 #pragma omp sections
1585 #pragma omp section
1587 #pragma omp target enter data map(to: a)
1588 ++a;
1591 #pragma omp sections
1593 #pragma omp section
1595 #pragma omp target exit data map(from: a)
1596 ++a;
1599 #pragma omp sections
1601 #pragma omp section
1602 #pragma omp teams // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
1603 ++a;
1605 #pragma omp sections
1607 #pragma omp section
1608 #pragma omp taskloop
1609 for (int i = 0; i < 10; ++i)
1610 ++a;
1612 #pragma omp sections
1614 #pragma omp section
1615 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
1616 for (int i = 0; i < 10; ++i)
1619 #pragma omp sections
1621 #pragma omp section
1623 bar();
1624 #pragma omp target update to(a)
1627 #pragma omp sections
1629 #pragma omp section
1630 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
1631 for (int i = 0; i < 10; ++i)
1634 #pragma omp sections
1636 #pragma omp section
1637 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
1638 for (int i = 0; i < 10; ++i)
1641 #pragma omp sections
1643 #pragma omp section
1644 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
1645 for (int i = 0; i < 10; ++i)
1648 #pragma omp sections
1650 #pragma omp section
1651 #pragma omp target simd // OK
1652 for (int i = 0; i < 10; ++i)
1655 #pragma omp sections
1657 #pragma omp section
1658 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
1659 for (int i = 0; i < 10; ++i)
1662 #pragma omp sections
1664 #pragma omp section
1665 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
1666 for (int i = 0; i < 10; ++i)
1669 #pragma omp sections
1671 #pragma omp section
1672 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
1673 for (int i = 0; i < 10; ++i)
1676 #pragma omp sections
1678 #pragma omp section
1679 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
1680 for (int i = 0; i < 10; ++i)
1683 #pragma omp sections
1685 #pragma omp section
1686 #pragma omp target teams // OK
1687 ++a;
1689 #pragma omp sections
1691 #pragma omp section
1692 #pragma omp target teams distribute // OK
1693 for (int i = 0; i < 10; ++i)
1696 #pragma omp sections
1698 #pragma omp section
1699 #pragma omp target teams distribute parallel for // OK
1700 for (int i = 0; i < 10; ++i)
1703 #pragma omp sections
1705 #pragma omp section
1706 #pragma omp target teams distribute parallel for simd // OK
1707 for (int i = 0; i < 10; ++i)
1710 #pragma omp sections
1712 #pragma omp section
1713 #pragma omp target teams distribute simd // OK
1714 for (int i = 0; i < 10; ++i)
1718 // SINGLE DIRECTIVE
1719 #pragma omp single
1721 #pragma omp for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
1722 for (int i = 0; i < 10; ++i)
1725 #pragma omp single
1727 #pragma omp simd
1728 for (int i = 0; i < 10; ++i)
1731 #pragma omp single
1733 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
1734 for (int i = 0; i < 10; ++i)
1737 #pragma omp single
1739 #pragma omp parallel
1740 for (int i = 0; i < 10; ++i)
1743 #pragma omp single
1745 #pragma omp single // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
1747 bar();
1750 #pragma omp single
1752 #pragma omp master // expected-error {{region cannot be closely nested inside 'single' region}}
1754 bar();
1757 #pragma omp single
1759 #pragma omp parallel master
1761 bar();
1764 #pragma omp single
1766 #pragma omp parallel masked
1768 bar();
1771 #pragma omp single
1773 #pragma omp critical
1775 bar();
1778 #pragma omp single
1780 #pragma omp sections // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
1782 bar();
1785 #pragma omp single
1787 #pragma omp parallel
1789 #pragma omp single // OK
1791 bar();
1793 #pragma omp for // OK
1794 for (int i = 0; i < 10; ++i)
1796 #pragma omp for simd // OK
1797 for (int i = 0; i < 10; ++i)
1799 #pragma omp sections // OK
1801 bar();
1805 #pragma omp single
1807 #pragma omp parallel for
1808 for (int i = 0; i < 10; ++i)
1811 #pragma omp single
1813 #pragma omp parallel for simd
1814 for (int i = 0; i < 10; ++i)
1817 #pragma omp single
1819 #pragma omp parallel sections
1821 bar();
1824 #pragma omp single
1826 #pragma omp task
1828 bar();
1831 #pragma omp single
1833 #pragma omp taskyield
1834 bar();
1836 #pragma omp single
1838 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'single' region}}
1839 bar();
1841 #pragma omp single
1843 #pragma omp scan // expected-error {{region cannot be closely nested inside 'single' region}}
1844 bar();
1846 #pragma omp single
1848 #pragma omp taskwait
1849 bar();
1851 #pragma omp single
1853 #pragma omp flush
1854 bar();
1856 #pragma omp single
1858 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
1859 bar();
1861 #pragma omp single
1863 #pragma omp atomic
1864 ++a;
1866 #pragma omp single
1868 #pragma omp target
1869 ++a;
1871 #pragma omp single
1873 #pragma omp target parallel
1874 ++a;
1876 #pragma omp single
1878 #pragma omp target parallel for
1879 for (int i = 0; i < 10; ++i)
1882 #pragma omp single
1884 #pragma omp target enter data map(to: a)
1885 ++a;
1887 #pragma omp single
1889 #pragma omp target exit data map(from: a)
1890 ++a;
1892 #pragma omp single
1894 #pragma omp teams // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
1895 ++a;
1897 #pragma omp single
1899 #pragma omp taskloop
1900 for (int i = 0; i < 10; ++i)
1901 ++a;
1903 #pragma omp single
1905 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
1906 for (int i = 0; i < 10; ++i)
1909 #pragma omp single
1911 #pragma omp target update to(a)
1912 bar();
1914 #pragma omp single
1916 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
1917 for (int i = 0; i < 10; ++i)
1920 #pragma omp single
1922 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
1923 for (int i = 0; i < 10; ++i)
1926 #pragma omp single
1928 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
1929 for (int i = 0; i < 10; ++i)
1932 #pragma omp single
1934 #pragma omp target simd // OK
1935 for (int i = 0; i < 10; ++i)
1938 #pragma omp single
1940 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
1941 for (int i = 0; i < 10; ++i)
1944 #pragma omp single
1946 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
1947 for (int i = 0; i < 10; ++i)
1950 #pragma omp single
1952 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
1953 for (int i = 0; i < 10; ++i)
1956 #pragma omp single
1958 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
1959 for (int i = 0; i < 10; ++i)
1962 #pragma omp single
1964 #pragma omp target teams // OK
1965 ++a;
1967 #pragma omp single
1969 #pragma omp target teams distribute // OK
1970 for (int i = 0; i < 10; ++i)
1973 #pragma omp single
1975 #pragma omp target teams distribute parallel for // OK
1976 for (int i = 0; i < 10; ++i)
1979 #pragma omp single
1981 #pragma omp target teams distribute parallel for simd // OK
1982 for (int i = 0; i < 10; ++i)
1985 #pragma omp single
1987 #pragma omp target teams distribute simd // OK
1988 for (int i = 0; i < 10; ++i)
1992 // MASTER DIRECTIVE
1993 #pragma omp master
1995 #pragma omp for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
1996 for (int i = 0; i < 10; ++i)
1999 #pragma omp master
2001 #pragma omp simd
2002 for (int i = 0; i < 10; ++i)
2005 #pragma omp master
2007 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
2008 for (int i = 0; i < 10; ++i)
2011 #pragma omp master
2013 #pragma omp parallel
2014 for (int i = 0; i < 10; ++i)
2017 #pragma omp master
2019 #pragma omp single // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
2021 bar();
2024 #pragma omp master
2026 #pragma omp master // OK, though second 'master' is redundant
2028 bar();
2031 #pragma omp master
2033 #pragma omp critical
2035 bar();
2038 #pragma omp master
2040 #pragma omp sections // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
2042 bar();
2045 #pragma omp master
2047 #pragma omp parallel
2049 #pragma omp master // OK
2051 bar();
2053 #pragma omp for // OK
2054 for (int i = 0; i < 10; ++i)
2056 #pragma omp for simd // OK
2057 for (int i = 0; i < 10; ++i)
2059 #pragma omp sections // OK
2061 bar();
2065 #pragma omp master
2067 #pragma omp parallel master // OK
2069 bar();
2071 #pragma omp parallel
2073 #pragma omp for // OK
2074 for (int i = 0; i < 10; ++i)
2076 #pragma omp for simd // OK
2077 for (int i = 0; i < 10; ++i)
2079 #pragma omp sections // OK
2081 bar();
2085 #pragma omp master
2087 #pragma omp parallel for
2088 for (int i = 0; i < 10; ++i)
2091 #pragma omp master
2093 #pragma omp parallel for simd
2094 for (int i = 0; i < 10; ++i)
2097 #pragma omp master
2099 #pragma omp parallel sections
2101 bar();
2104 #pragma omp master
2106 #pragma omp task
2108 bar();
2111 #pragma omp master
2113 #pragma omp taskyield
2114 bar();
2116 #pragma omp master
2118 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'master' region}}
2119 bar();
2121 #pragma omp master
2123 #pragma omp scan // expected-error {{region cannot be closely nested inside 'master' region}}
2124 bar();
2126 #pragma omp master
2128 #pragma omp taskwait
2129 bar();
2131 #pragma omp master
2133 #pragma omp flush
2134 bar();
2136 #pragma omp master
2138 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
2139 bar();
2141 #pragma omp master
2143 #pragma omp atomic
2144 ++a;
2146 #pragma omp master
2148 #pragma omp target
2149 ++a;
2151 #pragma omp master
2153 #pragma omp target parallel
2154 ++a;
2156 #pragma omp master
2158 #pragma omp target parallel for
2159 for (int i = 0; i < 10; ++i)
2162 #pragma omp master
2164 #pragma omp target enter data map(to: a)
2165 ++a;
2167 #pragma omp master
2169 #pragma omp target exit data map(from: a)
2170 ++a;
2172 #pragma omp master
2174 #pragma omp teams // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
2175 ++a;
2177 #pragma omp master
2179 #pragma omp taskloop
2180 for (int i = 0; i < 10; ++i)
2181 ++a;
2183 #pragma omp master
2185 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
2186 for (int i = 0; i < 10; ++i)
2189 #pragma omp master
2191 #pragma omp target update to(a)
2192 bar();
2194 #pragma omp master
2196 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
2197 for (int i = 0; i < 10; ++i)
2200 #pragma omp master
2202 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
2203 for (int i = 0; i < 10; ++i)
2206 #pragma omp master
2208 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
2209 for (int i = 0; i < 10; ++i)
2212 #pragma omp master
2214 #pragma omp target simd // OK
2215 for (int i = 0; i < 10; ++i)
2218 #pragma omp master
2220 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
2221 for (int i = 0; i < 10; ++i)
2224 #pragma omp master
2226 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
2227 for (int i = 0; i < 10; ++i)
2230 #pragma omp master
2232 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
2233 for (int i = 0; i < 10; ++i)
2236 #pragma omp master
2238 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
2239 for (int i = 0; i < 10; ++i)
2242 #pragma omp master
2244 #pragma omp target teams // OK
2245 a++;
2247 #pragma omp master
2249 #pragma omp target teams distribute // OK
2250 for (int i = 0; i < 10; ++i)
2253 #pragma omp master
2255 #pragma omp target teams distribute parallel for // OK
2256 for (int i = 0; i < 10; ++i)
2259 #pragma omp master
2261 #pragma omp target teams distribute parallel for simd // OK
2262 for (int i = 0; i < 10; ++i)
2265 #pragma omp master
2267 #pragma omp target teams distribute simd // OK
2268 for (int i = 0; i < 10; ++i)
2272 // CRITICAL DIRECTIVE
2273 #pragma omp critical
2275 #pragma omp for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
2276 for (int i = 0; i < 10; ++i)
2279 #pragma omp critical
2281 #pragma omp simd
2282 for (int i = 0; i < 10; ++i)
2285 #pragma omp critical
2287 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
2288 for (int i = 0; i < 10; ++i)
2291 #pragma omp critical
2293 #pragma omp parallel
2294 for (int i = 0; i < 10; ++i)
2297 #pragma omp critical
2299 #pragma omp single // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
2301 bar();
2304 #pragma omp critical
2306 #pragma omp master // OK, though second 'master' is redundant
2308 bar();
2311 #pragma omp critical
2313 #pragma omp critical
2315 bar();
2318 #pragma omp critical
2320 #pragma omp sections // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
2322 bar();
2325 #pragma omp critical
2327 #pragma omp parallel
2329 #pragma omp master // OK
2331 bar();
2333 #pragma omp for // OK
2334 for (int i = 0; i < 10; ++i)
2336 #pragma omp for simd // OK
2337 for (int i = 0; i < 10; ++i)
2339 #pragma omp sections // OK
2341 bar();
2345 #pragma omp critical
2347 #pragma omp parallel master
2349 bar();
2352 #pragma omp critical
2354 #pragma omp parallel masked
2356 bar();
2359 #pragma omp critical
2361 #pragma omp parallel for
2362 for (int i = 0; i < 10; ++i)
2365 #pragma omp critical
2367 #pragma omp parallel for simd
2368 for (int i = 0; i < 10; ++i)
2371 #pragma omp critical
2373 #pragma omp parallel sections
2375 bar();
2378 #pragma omp critical
2380 #pragma omp task
2382 bar();
2385 #pragma omp critical
2387 #pragma omp taskyield
2388 bar();
2390 #pragma omp critical
2392 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'critical' region}}
2393 bar();
2395 #pragma omp critical
2397 #pragma omp scan // expected-error {{region cannot be closely nested inside 'critical' region}}
2398 bar();
2400 #pragma omp critical
2402 #pragma omp taskwait
2403 bar();
2405 #pragma omp critical(Tuzik)
2407 #pragma omp critical(grelka)
2408 bar();
2410 #pragma omp critical(Belka) // expected-note {{previous 'critical' region starts here}}
2412 #pragma omp critical(Belka) // expected-error {{cannot nest 'critical' regions having the same name 'Belka'}}
2414 #pragma omp critical(Tuzik)
2416 #pragma omp parallel
2417 #pragma omp critical(grelka)
2419 bar();
2424 #pragma omp critical
2426 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
2427 bar();
2429 #pragma omp critical
2431 #pragma omp atomic
2432 ++a;
2434 #pragma omp critical
2436 #pragma omp target
2437 ++a;
2439 #pragma omp critical
2441 #pragma omp target parallel
2442 ++a;
2444 #pragma omp critical
2446 #pragma omp target parallel for
2447 for (int i = 0; i < 10; ++i)
2450 #pragma omp critical
2452 #pragma omp target enter data map(to: a)
2453 ++a;
2455 #pragma omp critical
2457 #pragma omp target exit data map(from: a)
2458 ++a;
2460 #pragma omp critical
2462 #pragma omp teams // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
2463 ++a;
2465 #pragma omp critical
2467 #pragma omp taskloop
2468 for (int i = 0; i < 10; ++i)
2469 ++a;
2471 #pragma omp critical
2473 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
2474 for (int i = 0; i < 10; ++i)
2477 #pragma omp critical
2479 #pragma omp target update to(a)
2480 bar();
2482 #pragma omp critical
2484 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
2485 for (int i = 0; i < 10; ++i)
2488 #pragma omp critical
2490 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
2491 for (int i = 0; i < 10; ++i)
2494 #pragma omp critical
2496 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
2497 for (int i = 0; i < 10; ++i)
2500 #pragma omp critical
2502 #pragma omp target simd // OK
2503 for (int i = 0; i < 10; ++i)
2506 #pragma omp critical
2508 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
2509 for (int i = 0; i < 10; ++i)
2512 #pragma omp critical
2514 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
2515 for (int i = 0; i < 10; ++i)
2518 #pragma omp critical
2520 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
2521 for (int i = 0; i < 10; ++i)
2524 #pragma omp critical
2526 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
2527 for (int i = 0; i < 10; ++i)
2530 #pragma omp critical
2532 #pragma omp target teams // OK
2533 a++;
2535 #pragma omp critical
2537 #pragma omp target teams distribute // OK
2538 for (int i = 0; i < 10; ++i)
2541 #pragma omp critical
2543 #pragma omp target teams distribute parallel for // OK
2544 for (int i = 0; i < 10; ++i)
2547 #pragma omp critical
2549 #pragma omp target teams distribute parallel for simd // OK
2550 for (int i = 0; i < 10; ++i)
2553 #pragma omp critical
2555 #pragma omp target teams distribute simd // OK
2556 for (int i = 0; i < 10; ++i)
2560 // PARALLEL FOR DIRECTIVE
2561 #pragma omp parallel for
2562 for (int i = 0; i < 10; ++i) {
2563 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
2564 for (int i = 0; i < 10; ++i)
2567 #pragma omp parallel for
2568 for (int i = 0; i < 10; ++i) {
2569 #pragma omp simd
2570 for (int i = 0; i < 10; ++i)
2573 #pragma omp parallel for
2574 for (int i = 0; i < 10; ++i) {
2575 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
2576 for (int i = 0; i < 10; ++i)
2579 #pragma omp parallel for
2580 for (int i = 0; i < 10; ++i) {
2581 #pragma omp parallel
2582 for (int i = 0; i < 10; ++i)
2585 #pragma omp parallel for
2586 for (int i = 0; i < 10; ++i) {
2587 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
2589 bar();
2592 #pragma omp parallel for
2593 for (int i = 0; i < 10; ++i) {
2594 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel for region}}
2596 bar();
2599 #pragma omp parallel for
2600 for (int i = 0; i < 10; ++i) {
2601 #pragma omp single // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
2603 bar();
2607 #pragma omp parallel for
2608 for (int i = 0; i < 10; ++i) {
2609 #pragma omp master // expected-error {{region cannot be closely nested inside 'parallel for' region}}
2611 bar();
2615 #pragma omp parallel for
2616 for (int i = 0; i < 10; ++i) {
2617 #pragma omp critical
2619 bar();
2623 #pragma omp parallel for
2624 for (int i = 0; i < 10; ++i) {
2625 #pragma omp parallel
2627 #pragma omp single // OK
2629 bar();
2631 #pragma omp for // OK
2632 for (int i = 0; i < 10; ++i)
2634 #pragma omp for simd // OK
2635 for (int i = 0; i < 10; ++i)
2637 #pragma omp sections // OK
2639 bar();
2643 #pragma omp parallel for
2644 for (int i = 0; i < 10; ++i) {
2645 #pragma omp parallel for
2646 for (int i = 0; i < 10; ++i)
2649 #pragma omp parallel for
2650 for (int i = 0; i < 10; ++i) {
2651 #pragma omp parallel for simd
2652 for (int i = 0; i < 10; ++i)
2655 #pragma omp parallel for
2656 for (int i = 0; i < 10; ++i) {
2657 #pragma omp parallel sections
2659 bar();
2662 #pragma omp parallel for
2663 for (int i = 0; i < 10; ++i) {
2664 #pragma omp task
2666 bar();
2669 #pragma omp parallel for
2670 for (int i = 0; i < 10; ++i) {
2671 #pragma omp taskyield
2672 bar();
2674 #pragma omp parallel for
2675 for (int i = 0; i < 10; ++i) {
2676 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel for' region}}
2677 bar();
2679 #pragma omp parallel for
2680 for (int i = 0; i < 10; ++i) {
2681 #pragma omp scan // omp45-error {{region cannot be closely nested inside 'parallel for' region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
2682 bar();
2684 #pragma omp parallel for
2685 for (int i = 0; i < 10; ++i) {
2686 #pragma omp taskwait
2687 bar();
2689 #pragma omp parallel for
2690 for (int i = 0; i < 10; ++i) {
2691 #pragma omp flush
2692 bar();
2694 #pragma omp parallel for
2695 for (int i = 0; i < 10; ++i) {
2696 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
2697 bar();
2699 #pragma omp parallel for ordered
2700 for (int i = 0; i < 10; ++i) {
2701 #pragma omp ordered // OK
2702 bar();
2704 #pragma omp parallel for
2705 for (int i = 0; i < 10; ++i) {
2706 #pragma omp atomic
2707 ++a;
2709 #pragma omp parallel for
2710 for (int i = 0; i < 10; ++i) {
2711 #pragma omp target
2712 ++a;
2714 #pragma omp parallel for
2715 for (int i = 0; i < 10; ++i) {
2716 #pragma omp target parallel
2717 ++a;
2719 #pragma omp parallel for
2720 for (int i = 0; i < 10; ++i) {
2721 #pragma omp target parallel for
2722 for (int i = 0; i < 10; ++i)
2725 #pragma omp parallel for
2726 for (int i = 0; i < 10; ++i) {
2727 #pragma omp target enter data map(to: a)
2728 ++a;
2730 #pragma omp parallel for
2731 for (int i = 0; i < 10; ++i) {
2732 #pragma omp target exit data map(from: a)
2733 ++a;
2735 #pragma omp parallel for
2736 for (int i = 0; i < 10; ++i) {
2737 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
2738 ++a;
2740 #pragma omp parallel for
2741 for (int i = 0; i < 10; ++i) {
2742 #pragma omp taskloop
2743 for (int i = 0; i < 10; ++i)
2744 ++a;
2746 #pragma omp parallel for
2747 for (int i = 0; i < 10; ++i) {
2748 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
2749 for (int j = 0; j < 10; ++j)
2752 #pragma omp parallel for
2753 for (int i = 0; i < 10; ++i) {
2754 #pragma omp target update to(a)
2756 #pragma omp parallel for
2757 for (int i = 0; i < 10; ++i) {
2758 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
2759 for (int j = 0; j < 10; ++j)
2762 #pragma omp parallel for
2763 for (int i = 0; i < 10; ++i) {
2764 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
2765 for (int j = 0; j < 10; ++j)
2768 #pragma omp parallel for
2769 for (int i = 0; i < 10; ++i) {
2770 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
2771 for (int j = 0; j < 10; ++j)
2774 #pragma omp parallel for
2775 for (int i = 0; i < 10; ++i) {
2776 #pragma omp target simd // OK
2777 for (int j = 0; j < 10; ++j)
2780 #pragma omp parallel for
2781 for (int i = 0; i < 10; ++i) {
2782 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
2783 for (int j = 0; j < 10; ++j)
2786 #pragma omp parallel for
2787 for (int i = 0; i < 10; ++i) {
2788 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
2789 for (int j = 0; j < 10; ++j)
2792 #pragma omp parallel for
2793 for (int i = 0; i < 10; ++i) {
2794 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
2795 for (int j = 0; j < 10; ++j)
2798 #pragma omp parallel for
2799 for (int i = 0; i < 10; ++i) {
2800 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
2801 for (int j = 0; j < 10; ++j)
2804 #pragma omp parallel for
2805 for (int i = 0; i < 10; ++i) {
2806 #pragma omp target teams // OK
2807 a++;
2809 #pragma omp parallel for
2810 for (int i = 0; i < 10; ++i) {
2811 #pragma omp target teams distribute // OK
2812 for (int j = 0; j < 10; ++j)
2815 #pragma omp parallel for
2816 for (int i = 0; i < 10; ++i) {
2817 #pragma omp target teams distribute parallel for // OK
2818 for (int j = 0; j < 10; ++j)
2821 #pragma omp parallel for
2822 for (int i = 0; i < 10; ++i) {
2823 #pragma omp target teams distribute parallel for simd // OK
2824 for (int j = 0; j < 10; ++j)
2827 #pragma omp parallel for
2828 for (int i = 0; i < 10; ++i) {
2829 #pragma omp target teams distribute simd // OK
2830 for (int j = 0; j < 10; ++j)
2834 // PARALLEL FOR SIMD DIRECTIVE
2835 #pragma omp parallel for simd
2836 for (int i = 0; i < 10; ++i) {
2837 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2838 for (int i = 0; i < 10; ++i)
2841 #pragma omp parallel for simd
2842 for (int i = 0; i < 10; ++i) {
2843 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
2844 for (int i = 0; i < 10; ++i)
2847 #pragma omp parallel for simd
2848 for (int i = 0; i < 10; ++i) {
2849 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2850 for (int i = 0; i < 10; ++i)
2853 #pragma omp parallel for simd
2854 for (int i = 0; i < 10; ++i) {
2855 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2856 for (int i = 0; i < 10; ++i)
2859 #pragma omp parallel for simd
2860 for (int i = 0; i < 10; ++i) {
2861 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2863 bar();
2866 #pragma omp parallel for simd
2867 for (int i = 0; i < 10; ++i) {
2868 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2870 bar();
2873 #pragma omp parallel for simd
2874 for (int i = 0; i < 10; ++i) {
2875 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2877 bar();
2881 #pragma omp parallel for simd
2882 for (int i = 0; i < 10; ++i) {
2883 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2885 bar();
2889 #pragma omp parallel for simd
2890 for (int i = 0; i < 10; ++i) {
2891 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2893 bar();
2897 #pragma omp parallel for simd
2898 for (int i = 0; i < 10; ++i) {
2899 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2901 #pragma omp single
2903 bar();
2905 #pragma omp for
2906 for (int i = 0; i < 10; ++i)
2908 #pragma omp for simd
2909 for (int i = 0; i < 10; ++i)
2911 #pragma omp sections
2913 bar();
2917 #pragma omp parallel for simd
2918 for (int i = 0; i < 10; ++i) {
2919 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2920 for (int i = 0; i < 10; ++i)
2923 #pragma omp parallel for simd
2924 for (int i = 0; i < 10; ++i) {
2925 #pragma omp parallel for simd// expected-error {{OpenMP constructs may not be nested inside a simd region}}
2926 for (int i = 0; i < 10; ++i)
2929 #pragma omp parallel for simd
2930 for (int i = 0; i < 10; ++i) {
2931 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2933 bar();
2936 #pragma omp parallel for simd
2937 for (int i = 0; i < 10; ++i) {
2938 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2940 bar();
2943 #pragma omp parallel for simd
2944 for (int i = 0; i < 10; ++i) {
2945 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2946 bar();
2948 #pragma omp parallel for simd
2949 for (int i = 0; i < 10; ++i) {
2950 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2951 bar();
2953 #pragma omp parallel for simd
2954 for (int i = 0; i < 10; ++i) {
2955 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
2956 bar();
2958 #pragma omp parallel for simd
2959 for (int i = 0; i < 10; ++i) {
2960 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2961 bar();
2963 #pragma omp parallel for simd
2964 for (int i = 0; i < 10; ++i) {
2965 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2966 bar();
2968 #pragma omp parallel for simd
2969 for (int i = 0; i < 10; ++i) {
2970 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2971 bar();
2973 #pragma omp parallel for simd
2974 for (int i = 0; i < 10; ++i) {
2975 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2976 bar();
2978 #pragma omp parallel for simd
2979 for (int i = 0; i < 10; ++i) {
2980 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
2981 ++a;
2983 #pragma omp parallel for simd
2984 for (int i = 0; i < 10; ++i) {
2985 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2986 ++a;
2988 #pragma omp parallel for simd
2989 for (int i = 0; i < 10; ++i) {
2990 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2991 ++a;
2993 #pragma omp parallel for simd
2994 for (int i = 0; i < 10; ++i) {
2995 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
2996 for (int i = 0; i < 10; ++i)
2999 #pragma omp parallel for simd
3000 for (int i = 0; i < 10; ++i) {
3001 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3002 ++a;
3004 #pragma omp parallel for simd
3005 for (int i = 0; i < 10; ++i) {
3006 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3007 ++a;
3009 #pragma omp parallel for simd
3010 for (int i = 0; i < 10; ++i) {
3011 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3012 ++a;
3014 #pragma omp parallel for simd
3015 for (int i = 0; i < 10; ++i) {
3016 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3017 for (int i = 0; i < 10; ++i)
3018 ++a;
3020 #pragma omp parallel for simd
3021 for (int i = 0; i < 10; ++i) {
3022 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3023 for (int j = 0; j < 10; ++j)
3026 #pragma omp parallel for simd
3027 for (int i = 0; i < 10; ++i) {
3028 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3029 bar();
3031 #pragma omp parallel for simd
3032 for (int i = 0; i < 10; ++i) {
3033 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3034 for (int j = 0; j < 10; ++j)
3037 #pragma omp parallel for simd
3038 for (int i = 0; i < 10; ++i) {
3039 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3040 for (int j = 0; j < 10; ++j)
3043 #pragma omp parallel for simd
3044 for (int i = 0; i < 10; ++i) {
3045 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3046 for (int j = 0; j < 10; ++j)
3049 #pragma omp parallel for simd
3050 for (int i = 0; i < 10; ++i) {
3051 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3052 for (int j = 0; j < 10; ++j)
3055 #pragma omp parallel for simd
3056 for (int i = 0; i < 10; ++i) {
3057 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3058 for (int j = 0; j < 10; ++j)
3061 #pragma omp parallel for simd
3062 for (int i = 0; i < 10; ++i) {
3063 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3064 for (int j = 0; j < 10; ++j)
3067 #pragma omp parallel for simd
3068 for (int i = 0; i < 10; ++i) {
3069 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3070 for (int j = 0; j < 10; ++j)
3073 #pragma omp parallel for simd
3074 for (int i = 0; i < 10; ++i) {
3075 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3076 for (int j = 0; j < 10; ++j)
3079 #pragma omp parallel for simd
3080 for (int i = 0; i < 10; ++i) {
3081 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3082 a++;
3084 #pragma omp parallel for simd
3085 for (int i = 0; i < 10; ++i) {
3086 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3087 for (int j = 0; j < 10; ++j)
3090 #pragma omp parallel for simd
3091 for (int i = 0; i < 10; ++i) {
3092 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3093 for (int j = 0; j < 10; ++j)
3096 #pragma omp parallel for simd
3097 for (int i = 0; i < 10; ++i) {
3098 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3099 for (int j = 0; j < 10; ++j)
3102 #pragma omp parallel for simd
3103 for (int i = 0; i < 10; ++i) {
3104 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
3105 for (int j = 0; j < 10; ++j)
3109 // PARALLEL MASTER DIRECTIVE
3110 #pragma omp parallel master
3112 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
3113 for (int i = 0; i < 10; ++i)
3116 #pragma omp parallel master
3118 #pragma omp simd
3119 for (int i = 0; i < 10; ++i)
3122 #pragma omp parallel master
3124 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
3125 for (int i = 0; i < 10; ++i)
3128 #pragma omp parallel master
3130 #pragma omp parallel
3131 for (int i = 0; i < 10; ++i)
3134 #pragma omp parallel master
3136 #pragma omp single // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
3138 bar();
3141 #pragma omp parallel master
3143 #pragma omp master // OK, though second 'master' is redundant
3145 bar();
3148 #pragma omp parallel master
3150 #pragma omp critical
3152 bar();
3155 #pragma omp parallel master
3157 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
3159 bar();
3162 #pragma omp parallel master
3164 #pragma omp parallel
3166 #pragma omp parallel master // OK
3168 bar();
3170 #pragma omp for // OK
3171 for (int i = 0; i < 10; ++i)
3173 #pragma omp for simd // OK
3174 for (int i = 0; i < 10; ++i)
3176 #pragma omp sections // OK
3178 bar();
3182 #pragma omp parallel master
3184 #pragma omp parallel master // OK
3186 bar();
3188 #pragma omp parallel
3190 #pragma omp for // OK
3191 for (int i = 0; i < 10; ++i)
3193 #pragma omp for simd // OK
3194 for (int i = 0; i < 10; ++i)
3196 #pragma omp sections // OK
3198 bar();
3202 #pragma omp parallel master
3204 #pragma omp parallel for
3205 for (int i = 0; i < 10; ++i)
3208 #pragma omp parallel master
3210 #pragma omp parallel for simd
3211 for (int i = 0; i < 10; ++i)
3214 #pragma omp parallel master
3216 #pragma omp parallel sections
3218 bar();
3221 #pragma omp parallel master
3223 #pragma omp task
3225 bar();
3228 #pragma omp parallel master
3230 #pragma omp taskyield
3231 bar();
3233 #pragma omp parallel master
3235 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel master' region}}
3236 bar();
3238 #pragma omp parallel master
3240 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel master' region}}
3241 bar();
3243 #pragma omp parallel master
3245 #pragma omp taskwait
3246 bar();
3248 #pragma omp parallel master
3250 #pragma omp flush
3251 bar();
3253 #pragma omp parallel master
3255 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
3256 bar();
3258 #pragma omp parallel master
3260 #pragma omp atomic
3261 ++a;
3263 #pragma omp parallel master
3265 #pragma omp target
3266 ++a;
3268 #pragma omp parallel master
3270 #pragma omp target parallel
3271 ++a;
3273 #pragma omp parallel master
3275 #pragma omp target parallel for
3276 for (int i = 0; i < 10; ++i)
3279 #pragma omp parallel master
3281 #pragma omp target enter data map(to: a)
3282 ++a;
3284 #pragma omp parallel master
3286 #pragma omp target exit data map(from: a)
3287 ++a;
3289 #pragma omp parallel master
3291 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
3292 ++a;
3294 #pragma omp parallel master
3296 #pragma omp taskloop
3297 for (int i = 0; i < 10; ++i)
3298 ++a;
3300 #pragma omp parallel master
3302 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
3303 for (int i = 0; i < 10; ++i)
3306 #pragma omp parallel master
3308 #pragma omp target update to(a)
3309 bar();
3311 #pragma omp parallel master
3313 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
3314 for (int i = 0; i < 10; ++i)
3317 #pragma omp parallel master
3319 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
3320 for (int i = 0; i < 10; ++i)
3323 #pragma omp parallel master
3325 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
3326 for (int i = 0; i < 10; ++i)
3329 #pragma omp parallel master
3331 #pragma omp target simd // OK
3332 for (int i = 0; i < 10; ++i)
3335 #pragma omp parallel master
3337 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
3338 for (int i = 0; i < 10; ++i)
3341 #pragma omp parallel master
3343 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
3344 for (int i = 0; i < 10; ++i)
3347 #pragma omp parallel master
3349 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
3350 for (int i = 0; i < 10; ++i)
3353 #pragma omp parallel master
3355 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
3356 for (int i = 0; i < 10; ++i)
3359 #pragma omp parallel master
3361 #pragma omp target teams // OK
3362 a++;
3364 #pragma omp parallel master
3366 #pragma omp target teams distribute // OK
3367 for (int i = 0; i < 10; ++i)
3370 #pragma omp parallel master
3372 #pragma omp target teams distribute parallel for // OK
3373 for (int i = 0; i < 10; ++i)
3376 #pragma omp parallel master
3378 #pragma omp target teams distribute parallel for simd // OK
3379 for (int i = 0; i < 10; ++i)
3382 #pragma omp parallel master
3384 #pragma omp target teams distribute simd // OK
3385 for (int i = 0; i < 10; ++i)
3389 // PARALLEL MASKED DIRECTIVE
3390 #pragma omp parallel masked
3392 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel masked' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
3393 for (int i = 0; i < 10; ++i)
3396 #pragma omp parallel masked
3398 #pragma omp simd
3399 for (int i = 0; i < 10; ++i)
3402 #pragma omp parallel masked
3404 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel masked' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
3405 for (int i = 0; i < 10; ++i)
3408 #pragma omp parallel masked
3410 #pragma omp parallel
3411 for (int i = 0; i < 10; ++i)
3414 #pragma omp parallel masked
3416 #pragma omp single // expected-error {{region cannot be closely nested inside 'parallel masked' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
3418 bar();
3421 #pragma omp parallel masked
3423 #pragma omp master // OK, though second 'master' is redundant
3425 bar();
3428 #pragma omp parallel masked
3430 #pragma omp critical
3432 bar();
3435 #pragma omp parallel masked
3437 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel masked' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
3439 bar();
3442 #pragma omp parallel master
3444 #pragma omp parallel
3446 #pragma omp parallel master // OK
3448 bar();
3450 #pragma omp for // OK
3451 for (int i = 0; i < 10; ++i)
3453 #pragma omp for simd // OK
3454 for (int i = 0; i < 10; ++i)
3456 #pragma omp sections // OK
3458 bar();
3462 #pragma omp parallel master
3464 #pragma omp parallel master // OK
3466 bar();
3468 #pragma omp parallel
3470 #pragma omp for // OK
3471 for (int i = 0; i < 10; ++i)
3473 #pragma omp for simd // OK
3474 for (int i = 0; i < 10; ++i)
3476 #pragma omp sections // OK
3478 bar();
3482 #pragma omp parallel master
3484 #pragma omp parallel for
3485 for (int i = 0; i < 10; ++i)
3488 #pragma omp parallel master
3490 #pragma omp parallel for simd
3491 for (int i = 0; i < 10; ++i)
3494 #pragma omp parallel master
3496 #pragma omp parallel sections
3498 bar();
3501 #pragma omp parallel master
3503 #pragma omp task
3505 bar();
3508 #pragma omp parallel master
3510 #pragma omp taskyield
3511 bar();
3513 #pragma omp parallel master
3515 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel master' region}}
3516 bar();
3518 #pragma omp parallel master
3520 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel master' region}}
3521 bar();
3523 #pragma omp parallel master
3525 #pragma omp taskwait
3526 bar();
3528 #pragma omp parallel master
3530 #pragma omp flush
3531 bar();
3533 #pragma omp parallel master
3535 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
3536 bar();
3538 #pragma omp parallel master
3540 #pragma omp atomic
3541 ++a;
3543 #pragma omp parallel master
3545 #pragma omp target
3546 ++a;
3548 #pragma omp parallel master
3550 #pragma omp target parallel
3551 ++a;
3553 #pragma omp parallel master
3555 #pragma omp target parallel for
3556 for (int i = 0; i < 10; ++i)
3559 #pragma omp parallel master
3561 #pragma omp target enter data map(to: a)
3562 ++a;
3564 #pragma omp parallel master
3566 #pragma omp target exit data map(from: a)
3567 ++a;
3569 #pragma omp parallel master
3571 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
3572 ++a;
3574 #pragma omp parallel master
3576 #pragma omp taskloop
3577 for (int i = 0; i < 10; ++i)
3578 ++a;
3580 #pragma omp parallel master
3582 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
3583 for (int i = 0; i < 10; ++i)
3586 #pragma omp parallel master
3588 #pragma omp target update to(a)
3589 bar();
3591 #pragma omp parallel master
3593 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
3594 for (int i = 0; i < 10; ++i)
3597 #pragma omp parallel master
3599 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
3600 for (int i = 0; i < 10; ++i)
3603 #pragma omp parallel master
3605 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
3606 for (int i = 0; i < 10; ++i)
3609 #pragma omp parallel master
3611 #pragma omp target simd // OK
3612 for (int i = 0; i < 10; ++i)
3615 #pragma omp parallel master
3617 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
3618 for (int i = 0; i < 10; ++i)
3621 #pragma omp parallel master
3623 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
3624 for (int i = 0; i < 10; ++i)
3627 #pragma omp parallel master
3629 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
3630 for (int i = 0; i < 10; ++i)
3633 #pragma omp parallel master
3635 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel master' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
3636 for (int i = 0; i < 10; ++i)
3639 #pragma omp parallel master
3641 #pragma omp target teams // OK
3642 a++;
3644 #pragma omp parallel master
3646 #pragma omp target teams distribute // OK
3647 for (int i = 0; i < 10; ++i)
3650 #pragma omp parallel master
3652 #pragma omp target teams distribute parallel for // OK
3653 for (int i = 0; i < 10; ++i)
3656 #pragma omp parallel master
3658 #pragma omp target teams distribute parallel for simd // OK
3659 for (int i = 0; i < 10; ++i)
3662 #pragma omp parallel master
3664 #pragma omp target teams distribute simd // OK
3665 for (int i = 0; i < 10; ++i)
3668 // PARALLEL SECTIONS DIRECTIVE
3669 #pragma omp parallel sections
3671 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
3672 for (int i = 0; i < 10; ++i)
3675 #pragma omp parallel sections
3677 #pragma omp simd
3678 for (int i = 0; i < 10; ++i)
3681 #pragma omp parallel sections
3683 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
3684 for (int i = 0; i < 10; ++i)
3687 #pragma omp parallel sections
3689 #pragma omp parallel
3690 for (int i = 0; i < 10; ++i)
3693 #pragma omp parallel sections
3695 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
3697 bar();
3700 #pragma omp parallel sections
3702 #pragma omp section
3704 bar();
3707 #pragma omp parallel sections
3709 #pragma omp section
3711 #pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
3712 bar();
3715 #pragma omp parallel sections
3717 #pragma omp section
3719 #pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
3720 bar();
3723 #pragma omp parallel sections
3725 #pragma omp section
3727 #pragma omp critical
3728 bar();
3731 #pragma omp parallel sections
3733 #pragma omp parallel
3735 #pragma omp single // OK
3737 bar();
3739 #pragma omp for // OK
3740 for (int i = 0; i < 10; ++i)
3742 #pragma omp for simd // OK
3743 for (int i = 0; i < 10; ++i)
3745 #pragma omp sections // OK
3747 bar();
3751 #pragma omp parallel sections
3753 #pragma omp parallel for
3754 for (int i = 0; i < 10; ++i)
3757 #pragma omp parallel sections
3759 #pragma omp parallel for simd
3760 for (int i = 0; i < 10; ++i)
3763 #pragma omp parallel sections
3765 #pragma omp parallel sections
3767 bar();
3770 #pragma omp parallel sections
3772 #pragma omp task
3774 bar();
3777 #pragma omp parallel sections
3779 #pragma omp taskyield
3781 #pragma omp parallel sections
3783 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
3785 #pragma omp parallel sections
3787 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
3789 #pragma omp parallel sections
3791 #pragma omp taskwait
3793 #pragma omp parallel sections
3795 #pragma omp flush
3797 #pragma omp parallel sections
3799 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
3800 bar();
3802 #pragma omp parallel sections
3804 #pragma omp atomic
3805 ++a;
3807 #pragma omp parallel sections
3809 #pragma omp target
3810 ++a;
3812 #pragma omp parallel sections
3814 #pragma omp target parallel
3815 ++a;
3817 #pragma omp parallel sections
3819 #pragma omp target parallel for
3820 for (int i = 0; i < 10; ++i)
3823 #pragma omp parallel sections
3825 #pragma omp target enter data map(to: a)
3827 #pragma omp parallel sections
3829 #pragma omp target exit data map(from: a)
3831 #pragma omp parallel sections
3833 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
3834 ++a;
3836 #pragma omp parallel sections
3838 #pragma omp taskloop
3839 for (int i = 0; i < 10; ++i)
3840 ++a;
3842 #pragma omp parallel sections
3844 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
3845 for (int i = 0; i < 10; ++i)
3848 #pragma omp parallel sections
3850 #pragma omp target update to(a)
3852 #pragma omp parallel sections
3854 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
3855 for (int i = 0; i < 10; ++i)
3858 #pragma omp parallel sections
3860 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
3861 for (int i = 0; i < 10; ++i)
3864 #pragma omp parallel sections
3866 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
3867 for (int i = 0; i < 10; ++i)
3870 #pragma omp parallel sections
3872 #pragma omp target simd // OK
3873 for (int i = 0; i < 10; ++i)
3876 #pragma omp parallel sections
3878 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
3879 for (int i = 0; i < 10; ++i)
3882 #pragma omp parallel sections
3884 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
3885 for (int i = 0; i < 10; ++i)
3888 #pragma omp parallel sections
3890 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
3891 for (int i = 0; i < 10; ++i)
3894 #pragma omp parallel sections
3896 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
3897 for (int i = 0; i < 10; ++i)
3900 #pragma omp parallel sections
3902 #pragma omp target teams // OK
3903 a++;
3905 #pragma omp parallel sections
3907 #pragma omp target teams distribute // OK
3908 for (int i = 0; i < 10; ++i)
3911 #pragma omp parallel sections
3913 #pragma omp target teams distribute parallel for // OK
3914 for (int i = 0; i < 10; ++i)
3917 #pragma omp parallel sections
3919 #pragma omp target teams distribute parallel for simd // OK
3920 for (int i = 0; i < 10; ++i)
3923 #pragma omp parallel sections
3925 #pragma omp target teams distribute simd // OK
3926 for (int i = 0; i < 10; ++i)
3930 // TASK DIRECTIVE
3931 #pragma omp task
3932 #pragma omp for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
3933 for (int i = 0; i < 10; ++i)
3935 #pragma omp task
3936 #pragma omp simd
3937 for (int i = 0; i < 10; ++i)
3939 #pragma omp task
3940 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
3941 for (int i = 0; i < 10; ++i)
3943 #pragma omp task
3944 #pragma omp sections // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
3946 bar();
3948 #pragma omp task
3949 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a task region}}
3951 bar();
3953 #pragma omp task
3954 #pragma omp single // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
3955 bar();
3956 #pragma omp task
3957 #pragma omp master // expected-error {{region cannot be closely nested inside 'task' region}}
3958 bar();
3959 #pragma omp task
3960 #pragma omp critical
3961 bar();
3963 #pragma omp task
3964 #pragma omp parallel for
3965 for (int i = 0; i < 10; ++i)
3967 #pragma omp task
3968 #pragma omp parallel for simd
3969 for (int i = 0; i < 10; ++i)
3971 #pragma omp task
3972 #pragma omp parallel sections
3974 bar();
3976 #pragma omp task
3977 #pragma omp task
3979 bar();
3981 #pragma omp task
3983 #pragma omp taskyield
3984 bar();
3986 #pragma omp task
3988 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'task' region}}
3989 bar();
3991 #pragma omp task
3993 #pragma omp scan // expected-error {{region cannot be closely nested inside 'task' region}}
3994 bar();
3996 #pragma omp task
3998 #pragma omp taskwait
3999 bar();
4001 #pragma omp task
4003 #pragma omp flush
4004 bar();
4006 #pragma omp task
4008 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
4009 bar();
4011 #pragma omp task
4013 #pragma omp atomic
4014 ++a;
4016 #pragma omp task
4018 #pragma omp target
4019 ++a;
4021 #pragma omp task
4023 #pragma omp target parallel
4024 ++a;
4026 #pragma omp task
4027 #pragma omp target parallel for
4028 for (int i = 0; i < 10; ++i)
4030 #pragma omp task
4032 #pragma omp target enter data map(to: a)
4033 ++a;
4035 #pragma omp task
4037 #pragma omp target exit data map(from: a)
4038 ++a;
4040 #pragma omp task
4042 #pragma omp teams // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
4043 ++a;
4045 #pragma omp task
4047 #pragma omp taskloop
4048 for (int i = 0; i < 10; ++i)
4049 ++a;
4051 #pragma omp task
4053 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
4054 for (int i = 0; i < 10; ++i)
4057 #pragma omp task
4059 #pragma omp target update to(a)
4060 bar();
4062 #pragma omp task
4064 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
4065 for (int i = 0; i < 10; ++i)
4068 #pragma omp task
4070 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
4071 for (int i = 0; i < 10; ++i)
4074 #pragma omp task
4076 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
4077 for (int i = 0; i < 10; ++i)
4080 #pragma omp task
4082 #pragma omp target simd // OK
4083 for (int i = 0; i < 10; ++i)
4086 #pragma omp task
4088 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
4089 for (int i = 0; i < 10; ++i)
4092 #pragma omp task
4094 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
4095 for (int i = 0; i < 10; ++i)
4098 #pragma omp task
4100 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
4101 for (int i = 0; i < 10; ++i)
4104 #pragma omp task
4106 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
4107 for (int i = 0; i < 10; ++i)
4110 #pragma omp task
4112 #pragma omp target teams // OK
4113 a++;
4115 #pragma omp task
4117 #pragma omp target teams distribute // OK
4118 for (int i = 0; i < 10; ++i)
4121 #pragma omp task
4123 #pragma omp target teams distribute parallel for // OK
4124 for (int i = 0; i < 10; ++i)
4127 #pragma omp task
4129 #pragma omp target teams distribute parallel for simd // OK
4130 for (int i = 0; i < 10; ++i)
4133 #pragma omp task
4135 #pragma omp target teams distribute simd // OK
4136 for (int i = 0; i < 10; ++i)
4140 // ORDERED DIRECTIVE
4141 #pragma omp ordered
4143 #pragma omp for // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
4144 for (int i = 0; i < 10; ++i)
4147 #pragma omp ordered
4149 #pragma omp simd
4150 for (int i = 0; i < 10; ++i)
4153 #pragma omp ordered
4155 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
4156 for (int i = 0; i < 10; ++i)
4159 #pragma omp ordered
4161 #pragma omp parallel
4162 for (int i = 0; i < 10; ++i)
4165 #pragma omp ordered
4167 #pragma omp single // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
4169 bar();
4172 #pragma omp ordered
4174 #pragma omp master // OK, though second 'ordered' is redundant
4176 bar();
4179 #pragma omp ordered
4181 #pragma omp critical
4183 bar();
4186 #pragma omp ordered
4188 #pragma omp sections // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
4190 bar();
4193 #pragma omp ordered
4195 #pragma omp parallel for ordered
4196 for (int j = 0; j < 10; ++j) {
4197 #pragma omp ordered // OK
4199 bar();
4203 #pragma omp ordered
4205 #pragma omp parallel for simd ordered
4206 for (int j = 0; j < 10; ++j) {
4207 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
4209 bar();
4213 #pragma omp ordered
4215 #pragma omp parallel for simd ordered
4216 for (int j = 0; j < 10; ++j) {
4217 #pragma omp ordered simd
4219 bar();
4223 #pragma omp ordered
4225 #pragma omp parallel for
4226 for (int i = 0; i < 10; ++i)
4229 #pragma omp ordered
4231 #pragma omp parallel for simd
4232 for (int i = 0; i < 10; ++i)
4235 #pragma omp ordered
4237 #pragma omp parallel sections
4239 bar();
4242 #pragma omp ordered
4244 #pragma omp task
4246 bar();
4249 #pragma omp ordered
4251 #pragma omp taskyield
4252 bar();
4254 #pragma omp ordered
4256 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'ordered' region}}
4257 bar();
4259 #pragma omp ordered
4261 #pragma omp scan // expected-error {{region cannot be closely nested inside 'ordered' region}}
4262 bar();
4264 #pragma omp ordered
4266 #pragma omp taskwait
4267 bar();
4269 #pragma omp ordered
4271 #pragma omp flush
4272 bar();
4274 #pragma omp ordered
4276 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
4277 bar();
4279 #pragma omp ordered
4281 #pragma omp atomic
4282 ++a;
4284 #pragma omp ordered
4286 #pragma omp target
4287 ++a;
4289 #pragma omp ordered
4291 #pragma omp target parallel
4292 ++a;
4294 #pragma omp ordered
4296 #pragma omp target parallel for ordered
4297 for (int j = 0; j < 10; ++j) {
4298 #pragma omp ordered // OK
4300 bar();
4304 #pragma omp ordered
4306 #pragma omp target parallel for
4307 for (int i = 0; i < 10; ++i)
4310 #pragma omp ordered
4312 #pragma omp target enter data map(to: a)
4313 ++a;
4315 #pragma omp ordered
4317 #pragma omp target exit data map(from: a)
4318 ++a;
4320 #pragma omp ordered
4322 #pragma omp teams // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
4323 ++a;
4325 #pragma omp ordered
4327 #pragma omp taskloop
4328 for (int i = 0; i < 10; ++i)
4329 ++a;
4331 #pragma omp ordered
4333 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
4334 for (int i = 0; i < 10; ++i)
4337 #pragma omp ordered
4339 bar();
4340 #pragma omp target update to(a)
4341 bar();
4343 #pragma omp ordered
4345 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
4346 for (int i = 0; i < 10; ++i)
4349 #pragma omp ordered
4351 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
4352 for (int i = 0; i < 10; ++i)
4355 #pragma omp ordered
4357 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
4358 for (int i = 0; i < 10; ++i)
4361 #pragma omp ordered
4363 #pragma omp target simd // OK
4364 for (int i = 0; i < 10; ++i)
4367 #pragma omp ordered
4369 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
4370 for (int i = 0; i < 10; ++i)
4373 #pragma omp ordered
4375 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
4376 for (int i = 0; i < 10; ++i)
4379 #pragma omp ordered
4381 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
4382 for (int i = 0; i < 10; ++i)
4385 #pragma omp ordered
4387 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'ordered' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
4388 for (int i = 0; i < 10; ++i)
4391 #pragma omp ordered
4393 #pragma omp target teams // OK
4394 a++;
4396 #pragma omp ordered
4398 #pragma omp target teams distribute // OK
4399 for (int i = 0; i < 10; ++i)
4402 #pragma omp ordered
4404 #pragma omp target teams distribute parallel for // OK
4405 for (int i = 0; i < 10; ++i)
4408 #pragma omp ordered
4410 #pragma omp target teams distribute parallel for simd // OK
4411 for (int i = 0; i < 10; ++i)
4414 #pragma omp ordered
4416 #pragma omp target teams distribute simd // OK
4417 for (int i = 0; i < 10; ++i)
4421 // ATOMIC DIRECTIVE
4422 #pragma omp atomic
4423 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4424 // expected-note@+1 {{expected an expression statement}}
4426 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4427 for (int i = 0; i < 10; ++i)
4430 #pragma omp atomic
4431 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4432 // expected-note@+1 {{expected an expression statement}}
4434 #pragma omp simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4435 for (int i = 0; i < 10; ++i)
4438 #pragma omp atomic
4439 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4440 // expected-note@+1 {{expected an expression statement}}
4442 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4443 for (int i = 0; i < 10; ++i)
4446 #pragma omp atomic
4447 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4448 // expected-note@+1 {{expected an expression statement}}
4450 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4451 for (int i = 0; i < 10; ++i)
4454 #pragma omp atomic
4455 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4456 // expected-note@+1 {{expected an expression statement}}
4458 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4460 bar();
4463 #pragma omp atomic
4464 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4465 // expected-note@+1 {{expected an expression statement}}
4467 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4469 bar();
4472 #pragma omp atomic
4473 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4474 // expected-note@+1 {{expected an expression statement}}
4476 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4478 bar();
4481 #pragma omp atomic
4482 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4483 // expected-note@+1 {{expected an expression statement}}
4485 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4487 bar();
4490 #pragma omp atomic
4491 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4492 // expected-note@+1 {{expected an expression statement}}
4494 #pragma omp parallel master // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4496 bar();
4499 #pragma omp atomic
4500 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4501 // expected-note@+1 {{expected an expression statement}}
4503 #pragma omp parallel masked // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4505 bar();
4508 #pragma omp atomic
4509 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4510 // expected-note@+1 {{expected an expression statement}}
4512 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4514 bar();
4517 #pragma omp atomic
4518 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4519 // expected-note@+1 {{expected an expression statement}}
4521 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4522 for (int i = 0; i < 10; ++i)
4525 #pragma omp atomic
4526 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4527 // expected-note@+1 {{expected an expression statement}}
4529 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4530 for (int i = 0; i < 10; ++i)
4533 #pragma omp atomic
4534 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4535 // expected-note@+1 {{expected an expression statement}}
4537 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4539 bar();
4542 #pragma omp atomic
4543 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4544 // expected-note@+1 {{expected an expression statement}}
4546 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4548 bar();
4551 #pragma omp atomic
4552 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4553 // expected-note@+1 {{expected an expression statement}}
4555 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4556 bar();
4558 #pragma omp atomic
4559 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4560 // expected-note@+1 {{expected an expression statement}}
4562 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4563 bar();
4565 #pragma omp atomic
4566 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4567 // expected-note@+1 {{expected an expression statement}}
4569 #pragma omp scan // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4570 bar();
4572 #pragma omp atomic
4573 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4574 // expected-note@+1 {{expected an expression statement}}
4576 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4577 bar();
4579 #pragma omp atomic
4580 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4581 // expected-note@+1 {{expected an expression statement}}
4583 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4584 bar();
4586 #pragma omp atomic
4587 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4588 // expected-note@+1 {{expected an expression statement}}
4590 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4591 bar();
4593 #pragma omp atomic
4594 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4595 // expected-note@+1 {{expected an expression statement}}
4597 #pragma omp atomic // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4598 ++a;
4600 #pragma omp atomic
4601 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4602 // expected-note@+1 {{expected an expression statement}}
4604 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4605 ++a;
4607 #pragma omp atomic
4608 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4609 // expected-note@+1 {{expected an expression statement}}
4611 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4612 ++a;
4614 #pragma omp atomic
4615 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4616 // expected-note@+1 {{expected an expression statement}}
4618 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4619 for (int i = 0; i < 10; ++i)
4622 #pragma omp atomic
4623 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4624 // expected-note@+1 {{expected an expression statement}}
4626 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4627 ++a;
4629 #pragma omp atomic
4630 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4631 // expected-note@+1 {{expected an expression statement}}
4633 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4634 ++a;
4636 #pragma omp atomic
4637 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4638 // expected-note@+1 {{expected an expression statement}}
4640 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4641 ++a;
4643 #pragma omp atomic
4644 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4645 // expected-note@+1 {{expected an expression statement}}
4647 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4648 for (int i = 0; i < 10; ++i)
4649 ++a;
4651 #pragma omp atomic
4652 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4653 // expected-note@+1 {{expected an expression statement}}
4655 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4656 for (int i = 0; i < 10; ++i)
4659 #pragma omp atomic
4660 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4661 // expected-note@+1 {{expected an expression statement}}
4663 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4664 bar();
4666 #pragma omp atomic
4667 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4668 // expected-note@+1 {{expected an expression statement}}
4670 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4671 for (int i = 0; i < 10; ++i)
4674 #pragma omp atomic
4675 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4676 // expected-note@+1 {{expected an expression statement}}
4678 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4679 for (int i = 0; i < 10; ++i)
4682 #pragma omp atomic
4683 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4684 // expected-note@+1 {{expected an expression statement}}
4686 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4687 for (int i = 0; i < 10; ++i)
4690 #pragma omp atomic
4691 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4692 // expected-note@+1 {{expected an expression statement}}
4694 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4695 for (int i = 0; i < 10; ++i)
4698 #pragma omp atomic
4699 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4700 // expected-note@+1 {{expected an expression statement}}
4702 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4703 for (int i = 0; i < 10; ++i)
4706 #pragma omp atomic
4707 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4708 // expected-note@+1 {{expected an expression statement}}
4710 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4711 for (int i = 0; i < 10; ++i)
4714 #pragma omp atomic
4715 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4716 // expected-note@+1 {{expected an expression statement}}
4718 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4719 for (int i = 0; i < 10; ++i)
4722 #pragma omp atomic
4723 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4724 // expected-note@+1 {{expected an expression statement}}
4726 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4727 for (int i = 0; i < 10; ++i)
4730 #pragma omp atomic
4731 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4732 // expected-note@+1 {{expected an expression statement}}
4734 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4735 a++;
4737 #pragma omp atomic
4738 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4739 // expected-note@+1 {{expected an expression statement}}
4741 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4742 for (int i = 0; i < 10; ++i)
4745 #pragma omp atomic
4746 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4747 // expected-note@+1 {{expected an expression statement}}
4749 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4750 for (int i = 0; i < 10; ++i)
4753 #pragma omp atomic
4754 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4755 // expected-note@+1 {{expected an expression statement}}
4757 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4758 for (int i = 0; i < 10; ++i)
4761 #pragma omp atomic
4762 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
4763 // expected-note@+1 {{expected an expression statement}}
4765 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
4766 for (int i = 0; i < 10; ++i)
4770 // TARGET DIRECTIVE
4771 #pragma omp target
4772 #pragma omp parallel
4773 bar();
4774 #pragma omp target
4775 #pragma omp for
4776 for (int i = 0; i < 10; ++i)
4778 #pragma omp target
4779 #pragma omp simd
4780 for (int i = 0; i < 10; ++i)
4782 #pragma omp target
4783 #pragma omp for simd
4784 for (int i = 0; i < 10; ++i)
4786 #pragma omp target
4787 #pragma omp sections
4789 bar();
4791 #pragma omp target
4792 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target region}}
4794 bar();
4796 #pragma omp target
4797 #pragma omp single
4798 bar();
4800 #pragma omp target
4801 #pragma omp master
4803 bar();
4805 #pragma omp target
4806 #pragma omp critical
4808 bar();
4810 #pragma omp target
4811 #pragma omp parallel for
4812 for (int i = 0; i < 10; ++i)
4814 #pragma omp target
4815 #pragma omp parallel for simd
4816 for (int i = 0; i < 10; ++i)
4818 #pragma omp target
4819 #pragma omp parallel sections
4821 bar();
4823 #pragma omp target
4824 #pragma omp task
4826 bar();
4828 #pragma omp target
4830 #pragma omp taskyield
4831 bar();
4833 #pragma omp target
4835 #pragma omp barrier
4836 bar();
4838 #pragma omp target
4840 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
4841 bar();
4843 #pragma omp target
4845 #pragma omp taskwait
4846 bar();
4848 #pragma omp target
4850 #pragma omp flush
4851 bar();
4853 #pragma omp target
4855 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
4856 bar();
4858 #pragma omp target
4860 #pragma omp atomic
4861 ++a;
4863 #pragma omp target
4865 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
4866 ++a;
4868 #pragma omp target
4870 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
4871 ++a;
4873 #pragma omp target
4874 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
4875 for (int i = 0; i < 10; ++i)
4877 #pragma omp target
4879 #pragma omp teams
4880 ++a;
4882 #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}}
4884 #pragma omp teams // expected-note {{directive outside teams construct here}}
4885 ++a;
4886 #pragma omp teams // expected-note {{nested teams construct here}}
4887 ++a;
4889 #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}}
4891 ++a; // expected-note {{statement outside teams construct here}}
4892 #pragma omp teams // expected-note {{nested teams construct here}}
4893 ++a;
4895 #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}}
4897 while (0) // expected-note {{statement outside teams construct here}}
4898 #pragma omp teams // expected-note {{nested teams construct here}}
4899 ++a;
4901 #pragma omp target
4903 #pragma omp taskloop
4904 for (int i = 0; i < 10; ++i)
4905 ++a;
4907 #pragma omp target
4909 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
4910 for (int i = 0; i < 10; ++i)
4913 #pragma omp target
4915 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
4917 #pragma omp target
4919 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
4921 #pragma omp target
4923 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
4925 #pragma omp target
4927 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
4928 for (int i = 0; i < 10; ++i)
4931 #pragma omp target
4933 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
4934 for (int i = 0; i < 10; ++i)
4937 #pragma omp target
4939 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
4940 for (int i = 0; i < 10; ++i)
4943 #pragma omp target
4945 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
4946 for (int i = 0; i < 10; ++i)
4949 #pragma omp target
4951 #pragma omp teams distribute // OK
4952 for (int i = 0; i < 10; ++i)
4955 #pragma omp target
4957 #pragma omp teams distribute simd // OK
4958 for (int i = 0; i < 10; ++i)
4961 #pragma omp target
4963 #pragma omp teams distribute parallel for simd // OK
4964 for (int i = 0; i < 10; ++i)
4967 #pragma omp target
4969 #pragma omp teams distribute parallel for // OK
4970 for (int i = 0; i < 10; ++i)
4973 #pragma omp target
4975 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
4976 for (int i = 0; i < 10; ++i)
4979 #pragma omp target
4981 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
4982 for (int i = 0; i < 10; ++i)
4985 #pragma omp target
4987 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
4988 for (int i = 0; i < 10; ++i)
4991 #pragma omp target
4993 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
4994 for (int i = 0; i < 10; ++i)
4997 #pragma omp target
4999 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
5000 for (int i = 0; i < 10; ++i)
5004 // TARGET PARALLEL DIRECTIVE
5005 #pragma omp target parallel
5006 #pragma omp parallel
5007 bar();
5008 #pragma omp target parallel
5009 #pragma omp for
5010 for (int i = 0; i < 10; ++i)
5012 #pragma omp target parallel
5013 #pragma omp simd
5014 for (int i = 0; i < 10; ++i)
5016 #pragma omp target parallel
5017 #pragma omp for simd
5018 for (int i = 0; i < 10; ++i)
5020 #pragma omp target parallel
5021 #pragma omp sections
5023 bar();
5025 #pragma omp target parallel
5026 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target parallel region}}
5028 bar();
5030 #pragma omp target parallel
5031 #pragma omp single
5032 bar();
5034 #pragma omp target parallel
5035 #pragma omp master
5037 bar();
5039 #pragma omp target
5040 #pragma omp parallel master
5042 bar();
5044 #pragma omp target
5045 #pragma omp parallel masked
5047 bar();
5049 #pragma omp target parallel
5050 #pragma omp critical
5052 bar();
5054 #pragma omp target parallel
5055 #pragma omp parallel for
5056 for (int i = 0; i < 10; ++i)
5058 #pragma omp target parallel
5059 #pragma omp parallel for simd
5060 for (int i = 0; i < 10; ++i)
5062 #pragma omp target parallel
5063 #pragma omp parallel sections
5065 bar();
5067 #pragma omp target parallel
5068 #pragma omp task
5070 bar();
5072 #pragma omp target parallel
5074 #pragma omp taskyield
5075 bar();
5077 #pragma omp target parallel
5079 #pragma omp barrier
5080 bar();
5082 #pragma omp target parallel
5084 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
5085 bar();
5087 #pragma omp target parallel
5089 #pragma omp taskwait
5090 bar();
5092 #pragma omp target parallel
5094 #pragma omp flush
5095 bar();
5097 #pragma omp target parallel
5099 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
5100 bar();
5102 #pragma omp target parallel
5104 #pragma omp atomic
5105 ++a;
5107 #pragma omp target parallel
5109 #pragma omp target // expected-error {{region cannot be nested inside 'target parallel' region}}
5110 ++a;
5112 #pragma omp target parallel
5114 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel' region}}
5115 ++a;
5117 #pragma omp target parallel
5118 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target parallel' region}}
5119 for (int i = 0; i < 10; ++i)
5121 #pragma omp target parallel
5123 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
5124 ++a;
5126 #pragma omp target parallel
5128 ++a;
5129 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
5130 ++a;
5132 #pragma omp target parallel
5134 #pragma omp taskloop
5135 for (int i = 0; i < 10; ++i)
5136 ++a;
5138 #pragma omp target parallel
5140 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
5141 for (int i = 0; i < 10; ++i)
5144 #pragma omp target parallel
5146 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel' region}}
5148 #pragma omp target parallel
5150 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel' region}}
5152 #pragma omp target parallel
5154 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target parallel' region}}
5156 #pragma omp target parallel
5158 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
5159 for (int i = 0; i < 10; ++i)
5162 #pragma omp target parallel
5164 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
5165 for (int i = 0; i < 10; ++i)
5168 #pragma omp target parallel
5170 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
5171 for (int i = 0; i < 10; ++i)
5174 #pragma omp target parallel
5176 #pragma omp target simd // expected-error {{region cannot be nested inside 'target parallel' region}}
5177 for (int i = 0; i < 10; ++i)
5180 #pragma omp target parallel
5182 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
5183 for (int i = 0; i < 10; ++i)
5186 #pragma omp target parallel
5188 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
5189 for (int i = 0; i < 10; ++i)
5192 #pragma omp target parallel
5194 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
5195 for (int i = 0; i < 10; ++i)
5198 #pragma omp target parallel
5200 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
5201 for (int i = 0; i < 10; ++i)
5204 #pragma omp target parallel
5206 #pragma omp target teams // expected-error {{region cannot be nested inside 'target parallel' region}}
5207 a++;
5209 #pragma omp target parallel
5211 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target parallel' region}}
5212 for (int i = 0; i < 10; ++i)
5215 #pragma omp target parallel
5217 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target parallel' region}}
5218 for (int i = 0; i < 10; ++i)
5221 #pragma omp target parallel
5223 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target parallel' region}}
5224 for (int i = 0; i < 10; ++i)
5227 #pragma omp target parallel
5229 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target parallel' region}}
5230 for (int i = 0; i < 10; ++i)
5234 // TARGET PARALLEL FOR DIRECTIVE
5235 #pragma omp target parallel for
5236 for (int i = 0; i < 10; ++i) {
5237 #pragma omp for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
5238 for (int i = 0; i < 10; ++i)
5241 #pragma omp target parallel for
5242 for (int i = 0; i < 10; ++i) {
5243 #pragma omp simd
5244 for (int i = 0; i < 10; ++i)
5247 #pragma omp target parallel for
5248 for (int i = 0; i < 10; ++i) {
5249 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
5250 for (int i = 0; i < 10; ++i)
5253 #pragma omp target parallel for
5254 for (int i = 0; i < 10; ++i) {
5255 #pragma omp parallel
5256 for (int i = 0; i < 10; ++i)
5259 #pragma omp target parallel for
5260 for (int i = 0; i < 10; ++i) {
5261 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
5263 bar();
5266 #pragma omp target parallel for
5267 for (int i = 0; i < 10; ++i) {
5268 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target parallel for region}}
5270 bar();
5273 #pragma omp target parallel for
5274 for (int i = 0; i < 10; ++i) {
5275 #pragma omp single // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
5277 bar();
5281 #pragma omp target parallel for
5282 for (int i = 0; i < 10; ++i) {
5283 #pragma omp master // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
5285 bar();
5289 #pragma omp target parallel for
5290 for (int i = 0; i < 10; ++i) {
5291 #pragma omp critical
5293 bar();
5297 #pragma omp target parallel for
5298 for (int i = 0; i < 10; ++i) {
5299 #pragma omp parallel
5301 #pragma omp single // OK
5303 bar();
5305 #pragma omp for // OK
5306 for (int i = 0; i < 10; ++i)
5308 #pragma omp for simd // OK
5309 for (int i = 0; i < 10; ++i)
5311 #pragma omp sections // OK
5313 bar();
5317 #pragma omp target parallel for
5318 for (int i = 0; i < 10; ++i) {
5319 #pragma omp parallel for
5320 for (int i = 0; i < 10; ++i)
5323 #pragma omp target parallel for
5324 for (int i = 0; i < 10; ++i) {
5325 #pragma omp parallel for simd
5326 for (int i = 0; i < 10; ++i)
5329 #pragma omp target parallel for
5330 for (int i = 0; i < 10; ++i) {
5331 #pragma omp parallel sections
5333 bar();
5336 #pragma omp target parallel for
5337 for (int i = 0; i < 10; ++i) {
5338 #pragma omp task
5340 bar();
5343 #pragma omp target parallel for
5344 for (int i = 0; i < 10; ++i) {
5345 #pragma omp taskyield
5346 bar();
5348 #pragma omp target parallel for
5349 for (int i = 0; i < 10; ++i) {
5350 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
5351 bar();
5353 #pragma omp target parallel for
5354 for (int i = 0; i < 10; ++i) {
5355 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
5356 bar();
5358 #pragma omp target parallel for
5359 for (int i = 0; i < 10; ++i) {
5360 #pragma omp taskwait
5361 bar();
5363 #pragma omp target parallel for
5364 for (int i = 0; i < 10; ++i) {
5365 #pragma omp flush
5366 bar();
5368 #pragma omp target parallel for
5369 for (int i = 0; i < 10; ++i) {
5370 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
5371 bar();
5373 #pragma omp target parallel for ordered
5374 for (int i = 0; i < 10; ++i) {
5375 #pragma omp ordered // OK
5376 bar();
5378 #pragma omp target parallel for
5379 for (int i = 0; i < 10; ++i) {
5380 #pragma omp atomic
5381 ++a;
5383 #pragma omp target parallel for
5384 for (int i = 0; i < 10; ++i) {
5385 #pragma omp target // expected-error {{region cannot be nested inside 'target parallel for' region}}
5386 ++a;
5388 #pragma omp target parallel for
5389 for (int i = 0; i < 10; ++i) {
5390 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel for' region}}
5391 ++a;
5393 #pragma omp target parallel for
5394 for (int i = 0; i < 10; ++i) {
5395 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target parallel for' region}}
5396 for (int i = 0; i < 10; ++i)
5399 #pragma omp target parallel for
5400 for (int i = 0; i < 10; ++i) {
5401 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
5402 ++a;
5404 #pragma omp target parallel for
5405 for (int i = 0; i < 10; ++i) {
5406 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
5407 ++a;
5409 #pragma omp target parallel for
5410 for (int i = 0; i < 10; ++i) {
5411 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
5412 ++a;
5414 #pragma omp target parallel for
5415 for (int i = 0; i < 10; ++i) {
5416 #pragma omp taskloop
5417 for (int i = 0; i < 10; ++i)
5418 ++a;
5420 #pragma omp target parallel for
5421 for (int i = 0; i < 10; ++i) {
5422 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
5423 for (int j = 0; j < 10; ++j)
5426 #pragma omp target parallel for
5427 for (int i = 0; i < 10; ++i) {
5428 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
5430 #pragma omp target parallel for
5431 for (int i = 0; i < 10; ++i) {
5432 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
5433 for (int j = 0; j < 10; ++j)
5436 #pragma omp target parallel for
5437 for (int i = 0; i < 10; ++i) {
5438 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
5439 for (int j = 0; j < 10; ++j)
5442 #pragma omp target parallel for
5443 for (int i = 0; i < 10; ++i) {
5444 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
5445 for (int j = 0; j < 10; ++j)
5448 #pragma omp target parallel for
5449 for (int i = 0; i < 10; ++i) {
5450 #pragma omp target simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
5451 for (int j = 0; j < 10; ++j)
5454 #pragma omp target parallel for
5455 for (int i = 0; i < 10; ++i) {
5456 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
5457 for (int j = 0; j < 10; ++j)
5460 #pragma omp target parallel for
5461 for (int i = 0; i < 10; ++i) {
5462 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
5463 for (int j = 0; j < 10; ++j)
5466 #pragma omp target parallel for
5467 for (int i = 0; i < 10; ++i) {
5468 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
5469 for (int j = 0; j < 10; ++j)
5472 #pragma omp target parallel for
5473 for (int i = 0; i < 10; ++i) {
5474 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
5475 for (int j = 0; j < 10; ++j)
5478 #pragma omp target parallel for
5479 for (int i = 0; i < 10; ++i) {
5480 #pragma omp target teams // expected-error {{region cannot be nested inside 'target parallel for' region}}
5481 a++;
5483 #pragma omp target parallel for
5484 for (int i = 0; i < 10; ++i) {
5485 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target parallel for' region}}
5486 for (int j = 0; j < 10; ++j)
5489 #pragma omp target parallel for
5490 for (int i = 0; i < 10; ++i) {
5491 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target parallel for' region}}
5492 for (int j = 0; j < 10; ++j)
5495 #pragma omp target parallel for
5496 for (int i = 0; i < 10; ++i) {
5497 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
5498 for (int j = 0; j < 10; ++j)
5501 #pragma omp target parallel for
5502 for (int i = 0; i < 10; ++i) {
5503 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
5504 for (int j = 0; j < 10; ++j)
5508 // TEAMS DIRECTIVE
5509 #pragma omp teams // omp45-error {{orphaned 'omp teams' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
5510 bar();
5511 #pragma omp target
5512 #pragma omp teams
5513 #pragma omp parallel
5514 bar();
5515 #pragma omp target
5516 #pragma omp teams
5517 #pragma omp for // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
5518 for (int i = 0; i < 10; ++i)
5520 #pragma omp target
5521 #pragma omp teams
5522 #pragma omp simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp simd' directive into a parallel region?}}
5523 for (int i = 0; i < 10; ++i)
5525 #pragma omp target
5526 #pragma omp teams
5527 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
5528 for (int i = 0; i < 10; ++i)
5530 #pragma omp target
5531 #pragma omp teams
5532 #pragma omp sections // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
5534 bar();
5536 #pragma omp target
5537 #pragma omp teams
5538 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams region}}
5540 bar();
5542 #pragma omp target
5543 #pragma omp teams
5544 #pragma omp single // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
5545 bar();
5547 #pragma omp target
5548 #pragma omp teams
5549 #pragma omp master // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp master' directive into a parallel region?}}
5551 bar();
5553 #pragma omp target
5554 #pragma omp teams
5555 #pragma omp critical // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp critical' directive into a parallel region?}}
5557 bar();
5559 #pragma omp target
5560 #pragma omp teams
5561 #pragma omp parallel for
5562 for (int i = 0; i < 10; ++i)
5564 #pragma omp target
5565 #pragma omp teams
5566 #pragma omp parallel for simd
5567 for (int i = 0; i < 10; ++i)
5569 #pragma omp target
5570 #pragma omp teams
5571 #pragma omp parallel sections
5573 bar();
5575 #pragma omp target
5576 #pragma omp teams
5577 #pragma omp task // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp task' directive into a parallel region?}}
5579 bar();
5581 #pragma omp target
5582 #pragma omp teams
5584 #pragma omp taskyield // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskyield' directive into a parallel region?}}
5585 bar();
5587 #pragma omp target
5588 #pragma omp teams
5590 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp barrier' directive into a parallel region?}}
5591 bar();
5593 #pragma omp target
5594 #pragma omp teams
5596 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
5597 bar();
5599 #pragma omp target
5600 #pragma omp teams
5602 #pragma omp taskwait // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskwait' directive into a parallel region?}}
5603 bar();
5605 #pragma omp target
5606 #pragma omp teams
5608 #pragma omp flush // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp flush' directive into a parallel region?}}
5609 bar();
5611 #pragma omp target
5612 #pragma omp teams
5614 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
5615 bar();
5617 #pragma omp target
5618 #pragma omp teams
5620 #pragma omp atomic // omp-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp atomic' directive into a parallel region?}}
5621 ++a;
5623 #pragma omp target
5624 #pragma omp teams
5626 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
5627 ++a;
5629 #pragma omp target
5630 #pragma omp teams
5632 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
5633 ++a;
5635 #pragma omp target
5636 #pragma omp teams
5637 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
5638 for (int i = 0; i < 10; ++i)
5640 #pragma omp target
5641 #pragma omp teams
5643 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
5644 ++a;
5646 #pragma omp target
5647 #pragma omp teams
5649 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
5650 ++a;
5652 #pragma omp target
5653 #pragma omp teams
5655 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
5656 ++a;
5658 #pragma omp target
5659 #pragma omp teams
5661 #pragma omp taskloop // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskloop' directive into a parallel region?}}
5662 for (int i = 0; i < 10; ++i)
5663 ++a;
5665 #pragma omp target
5666 #pragma omp teams
5667 #pragma omp distribute
5668 for (int i = 0; i < 10; ++i)
5670 #pragma omp target
5671 #pragma omp teams
5672 #pragma omp distribute
5673 for (int i = 0; i < 10; ++i)
5675 #pragma omp distribute
5676 for (int j = 0; j < 10; ++j)
5678 #pragma omp target
5679 #pragma omp teams
5681 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
5683 #pragma omp target
5684 #pragma omp teams
5686 #pragma omp distribute parallel for
5687 for (int i = 0; i < 10; ++i)
5689 #pragma omp distribute parallel for
5690 for (int j = 0; j < 10; ++j)
5693 #pragma omp target
5694 #pragma omp teams
5696 #pragma omp distribute parallel for simd
5697 for (int i = 0; i < 10; ++i)
5699 #pragma omp distribute parallel for simd
5700 for (int j = 0; j < 10; ++j)
5703 #pragma omp target
5704 #pragma omp teams
5706 #pragma omp distribute simd
5707 for (int i = 0; i < 10; ++i)
5709 #pragma omp distribute simd
5710 for (int j = 0; j < 10; ++j)
5713 #pragma omp target
5714 #pragma omp teams
5716 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
5717 for (int i = 0; i < 10; ++i)
5720 #pragma omp target
5721 #pragma omp teams
5723 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
5724 for (int i = 0; i < 10; ++i)
5727 #pragma omp target
5728 #pragma omp teams
5730 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
5731 for (int i = 0; i < 10; ++i)
5734 #pragma omp target
5735 #pragma omp teams
5737 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
5738 for (int i = 0; i < 10; ++i)
5741 #pragma omp target
5742 #pragma omp teams
5744 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
5745 for (int i = 0; i < 10; ++i)
5748 #pragma omp target
5749 #pragma omp teams
5751 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
5752 a++;
5754 #pragma omp target
5755 #pragma omp teams
5757 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
5758 for (int i = 0; i < 10; ++i)
5761 #pragma omp target
5762 #pragma omp teams
5764 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
5765 for (int i = 0; i < 10; ++i)
5768 #pragma omp target
5769 #pragma omp teams
5771 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
5772 for (int i = 0; i < 10; ++i)
5775 #pragma omp target
5776 #pragma omp teams
5778 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
5779 for (int i = 0; i < 10; ++i)
5783 // TASKLOOP DIRECTIVE
5784 #pragma omp taskloop
5785 for (int i = 0; i < 10; ++i) {
5786 #pragma omp for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
5787 for (int i = 0; i < 10; ++i)
5790 #pragma omp taskloop
5791 for (int i = 0; i < 10; ++i) {
5792 #pragma omp simd
5793 for (int i = 0; i < 10; ++i)
5796 #pragma omp taskloop
5797 for (int i = 0; i < 10; ++i) {
5798 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
5799 for (int i = 0; i < 10; ++i)
5802 #pragma omp taskloop
5803 for (int i = 0; i < 10; ++i) {
5804 #pragma omp parallel
5805 for (int i = 0; i < 10; ++i)
5808 #pragma omp taskloop
5809 for (int i = 0; i < 10; ++i) {
5810 #pragma omp sections // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
5812 bar();
5815 #pragma omp taskloop
5816 for (int i = 0; i < 10; ++i) {
5817 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a taskloop region}}
5819 bar();
5822 #pragma omp taskloop
5823 for (int i = 0; i < 10; ++i) {
5824 #pragma omp single // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
5826 bar();
5830 #pragma omp taskloop
5831 for (int i = 0; i < 10; ++i) {
5832 #pragma omp master // expected-error {{region cannot be closely nested inside 'taskloop' region}}
5834 bar();
5837 #pragma omp taskloop
5838 for (int i = 0; i < 10; ++i) {
5839 #pragma omp critical
5841 bar();
5844 #pragma omp taskloop
5845 for (int i = 0; i < 10; ++i) {
5846 #pragma omp parallel
5848 #pragma omp single // OK
5850 bar();
5852 #pragma omp for // OK
5853 for (int i = 0; i < 10; ++i)
5855 #pragma omp sections // OK
5857 bar();
5861 #pragma omp taskloop
5862 for (int i = 0; i < 10; ++i) {
5863 #pragma omp parallel for
5864 for (int i = 0; i < 10; ++i)
5867 #pragma omp taskloop
5868 for (int i = 0; i < 10; ++i) {
5869 #pragma omp parallel for simd
5870 for (int i = 0; i < 10; ++i)
5873 #pragma omp taskloop
5874 for (int i = 0; i < 10; ++i) {
5875 #pragma omp parallel sections
5877 bar();
5880 #pragma omp taskloop
5881 for (int i = 0; i < 10; ++i) {
5882 #pragma omp task
5884 bar();
5887 #pragma omp taskloop
5888 for (int i = 0; i < 10; ++i) {
5889 #pragma omp taskyield
5890 bar();
5892 #pragma omp taskloop
5893 for (int i = 0; i < 10; ++i) {
5894 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'taskloop' region}}
5895 bar();
5897 #pragma omp taskloop
5898 for (int i = 0; i < 10; ++i) {
5899 #pragma omp scan // expected-error {{region cannot be closely nested inside 'taskloop' region}}
5900 bar();
5902 #pragma omp taskloop
5903 for (int i = 0; i < 10; ++i) {
5904 #pragma omp taskwait
5905 bar();
5907 #pragma omp taskloop
5908 for (int i = 0; i < 10; ++i) {
5909 #pragma omp flush
5910 bar();
5912 #pragma omp taskloop
5913 for (int i = 0; i < 10; ++i) {
5914 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
5915 bar();
5917 #pragma omp taskloop
5918 for (int i = 0; i < 10; ++i) {
5919 #pragma omp atomic
5920 ++a;
5922 #pragma omp taskloop
5923 for (int i = 0; i < 10; ++i) {
5924 #pragma omp target
5925 ++a;
5927 #pragma omp taskloop
5928 for (int i = 0; i < 10; ++i) {
5929 #pragma omp target parallel
5930 ++a;
5932 #pragma omp taskloop
5933 for (int i = 0; i < 10; ++i) {
5934 #pragma omp target parallel for
5935 for (int i = 0; i < 10; ++i)
5938 #pragma omp taskloop
5939 for (int i = 0; i < 10; ++i) {
5940 #pragma omp target enter data map(to: a)
5941 ++a;
5943 #pragma omp taskloop
5944 for (int i = 0; i < 10; ++i) {
5945 #pragma omp target exit data map(from: a)
5946 ++a;
5948 #pragma omp taskloop
5949 for (int i = 0; i < 10; ++i) {
5950 #pragma omp teams // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
5951 ++a;
5953 #pragma omp taskloop
5954 for (int i = 0; i < 10; ++i) {
5955 #pragma omp taskloop
5956 for (int i = 0; i < 10; ++i)
5957 ++a;
5959 #pragma omp taskloop
5960 for (int i = 0; i < 10; ++i) {
5961 #pragma omp target update to(a)
5962 bar();
5964 #pragma omp taskloop
5965 for (int i = 0; i < 10; ++i) {
5966 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
5967 for (int j = 0; j < 10; ++j)
5968 ++a;
5970 #pragma omp taskloop
5971 for (int i = 0; i < 10; ++i) {
5972 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
5973 for (int j = 0; j < 10; ++j)
5974 ++a;
5976 #pragma omp taskloop
5977 for (int i = 0; i < 10; ++i) {
5978 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
5979 for (int j = 0; j < 10; ++j)
5980 ++a;
5982 #pragma omp taskloop
5983 for (int i = 0; i < 10; ++i) {
5984 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
5985 for (int j = 0; j < 10; ++j)
5986 ++a;
5988 #pragma omp taskloop
5989 for (int i = 0; i < 10; ++i) {
5990 #pragma omp target simd // OK
5991 for (int j = 0; j < 10; ++j)
5992 ++a;
5994 #pragma omp taskloop
5995 for (int i = 0; i < 10; ++i) {
5996 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
5997 for (int j = 0; j < 10; ++j)
5998 ++a;
6000 #pragma omp taskloop
6001 for (int i = 0; i < 10; ++i) {
6002 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
6003 for (int j = 0; j < 10; ++j)
6004 ++a;
6006 #pragma omp taskloop
6007 for (int i = 0; i < 10; ++i) {
6008 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
6009 for (int j = 0; j < 10; ++j)
6010 ++a;
6012 #pragma omp taskloop
6013 for (int i = 0; i < 10; ++i) {
6014 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
6015 for (int j = 0; j < 10; ++j)
6016 ++a;
6018 #pragma omp taskloop
6019 for (int i = 0; i < 10; ++i) {
6020 #pragma omp target teams // OK
6021 ++a;
6023 #pragma omp taskloop
6024 for (int i = 0; i < 10; ++i) {
6025 #pragma omp target teams distribute // OK
6026 for (int j = 0; j < 10; ++j)
6027 ++a;
6029 #pragma omp taskloop
6030 for (int i = 0; i < 10; ++i) {
6031 #pragma omp target teams distribute parallel for // OK
6032 for (int j = 0; j < 10; ++j)
6033 ++a;
6035 #pragma omp taskloop
6036 for (int i = 0; i < 10; ++i) {
6037 #pragma omp target teams distribute parallel for simd // OK
6038 for (int j = 0; j < 10; ++j)
6039 ++a;
6041 #pragma omp taskloop
6042 for (int i = 0; i < 10; ++i) {
6043 #pragma omp target teams distribute simd // OK
6044 for (int j = 0; j < 10; ++j)
6045 ++a;
6047 #pragma omp taskloop
6048 for (int i = 0; i < 10; ++i) {
6049 #pragma omp cancel taskgroup // omp45-error {{region cannot be closely nested inside 'taskloop' region}}
6050 #pragma omp cancellation point taskgroup // omp45-error {{region cannot be closely nested inside 'taskloop' region}}
6052 #pragma omp taskloop
6053 for (int i = 0; i < 10; ++i) {
6054 #pragma omp cancel parallel // expected-error {{region cannot be closely nested inside 'taskloop' region}}
6055 #pragma omp cancellation point parallel // expected-error {{region cannot be closely nested inside 'taskloop' region}}
6057 #pragma omp master taskloop
6058 for (int i = 0; i < 10; ++i) {
6059 #pragma omp cancel taskgroup // omp45-error {{region cannot be closely nested inside 'master taskloop' region}}
6060 #pragma omp cancellation point taskgroup // omp45-error {{region cannot be closely nested inside 'master taskloop' region}}
6062 #pragma omp master taskloop
6063 for (int i = 0; i < 10; ++i) {
6064 #pragma omp cancel parallel // expected-error {{region cannot be closely nested inside 'master taskloop' region}}
6065 #pragma omp cancellation point parallel // expected-error {{region cannot be closely nested inside 'master taskloop' region}}
6067 #pragma omp parallel master taskloop
6068 for (int i = 0; i < 10; ++i) {
6069 #pragma omp cancel taskgroup // omp45-error {{region cannot be closely nested inside 'parallel master taskloop' region}}
6070 #pragma omp cancellation point taskgroup // omp45-error {{region cannot be closely nested inside 'parallel master taskloop' region}}
6072 #pragma omp parallel master taskloop
6073 for (int i = 0; i < 10; ++i) {
6074 #pragma omp cancel parallel // expected-error {{region cannot be closely nested inside 'parallel master taskloop' region}}
6075 #pragma omp cancellation point parallel // expected-error {{region cannot be closely nested inside 'parallel master taskloop' region}}
6078 // DISTRIBUTE DIRECTIVE
6079 #pragma omp target
6080 #pragma omp teams
6081 #pragma omp distribute
6082 for (int i = 0; i < 10; ++i) {
6083 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
6084 for (int i = 0; i < 10; ++i)
6087 #pragma omp target
6088 #pragma omp teams
6089 #pragma omp distribute
6090 for (int i = 0; i < 10; ++i) {
6091 #pragma omp for
6092 for (int i = 0; i < 10; ++i)
6095 #pragma omp target
6096 #pragma omp teams
6097 #pragma omp distribute
6098 for (int i = 0; i < 10; ++i) {
6099 #pragma omp simd
6100 for (int i = 0; i < 10; ++i)
6103 #pragma omp target
6104 #pragma omp teams
6105 #pragma omp distribute
6106 for (int i = 0; i < 10; ++i) {
6107 #pragma omp for simd
6108 for (int i = 0; i < 10; ++i)
6111 #pragma omp target
6112 #pragma omp teams
6113 #pragma omp distribute
6114 for (int i = 0; i < 10; ++i) {
6115 #pragma omp parallel
6116 for (int i = 0; i < 10; ++i)
6119 #pragma omp target
6120 #pragma omp teams
6121 #pragma omp distribute
6122 for (int i = 0; i < 10; ++i) {
6123 #pragma omp sections
6125 bar();
6128 #pragma omp target
6129 #pragma omp teams
6130 #pragma omp distribute
6131 for (int i = 0; i < 10; ++i) {
6132 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a distribute region}}
6134 bar();
6137 #pragma omp target
6138 #pragma omp teams
6139 #pragma omp distribute
6140 for (int i = 0; i < 10; ++i) {
6141 #pragma omp single
6143 bar();
6146 #pragma omp target
6147 #pragma omp teams
6148 #pragma omp distribute
6149 for (int i = 0; i < 10; ++i) {
6150 #pragma omp master
6152 bar();
6155 #pragma omp target
6156 #pragma omp teams
6157 #pragma omp distribute
6158 for (int i = 0; i < 10; ++i) {
6159 #pragma omp critical
6161 bar();
6164 #pragma omp target
6165 #pragma omp teams
6166 #pragma omp distribute
6167 for (int i = 0; i < 10; ++i) {
6168 #pragma omp parallel
6170 #pragma omp single
6172 bar();
6176 #pragma omp target
6177 #pragma omp teams
6178 #pragma omp distribute
6179 for (int i = 0; i < 10; ++i) {
6180 #pragma omp parallel for
6181 for (int i = 0; i < 10; ++i)
6184 #pragma omp target
6185 #pragma omp teams
6186 #pragma omp distribute
6187 for (int i = 0; i < 10; ++i) {
6188 #pragma omp parallel for simd
6189 for (int i = 0; i < 10; ++i)
6192 #pragma omp target
6193 #pragma omp teams
6194 #pragma omp distribute
6195 for (int i = 0; i < 10; ++i) {
6196 #pragma omp parallel sections
6198 bar();
6201 #pragma omp target
6202 #pragma omp teams
6203 #pragma omp distribute
6204 for (int i = 0; i < 10; ++i) {
6205 #pragma omp task
6207 bar();
6210 #pragma omp target
6211 #pragma omp teams
6212 #pragma omp distribute
6213 for (int i = 0; i < 10; ++i) {
6214 #pragma omp taskyield
6215 bar();
6217 #pragma omp target
6218 #pragma omp teams
6219 #pragma omp distribute
6220 for (int i = 0; i < 10; ++i) {
6221 #pragma omp barrier
6222 bar();
6224 #pragma omp target
6225 #pragma omp teams
6226 #pragma omp distribute
6227 for (int i = 0; i < 10; ++i) {
6228 #pragma omp scan // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
6229 bar();
6231 #pragma omp target
6232 #pragma omp teams
6233 #pragma omp distribute
6234 for (int i = 0; i < 10; ++i) {
6235 #pragma omp taskwait
6236 bar();
6238 #pragma omp target
6239 #pragma omp teams
6240 #pragma omp distribute
6241 for (int i = 0; i < 10; ++i) {
6242 #pragma omp flush
6243 bar();
6245 #pragma omp target
6246 #pragma omp teams
6247 #pragma omp distribute
6248 for (int i = 0; i < 10; ++i) {
6249 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
6250 bar();
6252 #pragma omp target
6253 #pragma omp teams
6254 #pragma omp distribute
6255 for (int i = 0; i < 10; ++i) {
6256 #pragma omp atomic
6257 ++a;
6259 #pragma omp target
6260 #pragma omp teams
6261 #pragma omp distribute
6262 for (int i = 0; i < 10; ++i) {
6263 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
6264 ++a;
6266 #pragma omp target
6267 #pragma omp teams
6268 #pragma omp distribute
6269 for (int i = 0; i < 10; ++i) {
6270 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
6271 ++a;
6273 #pragma omp target
6274 #pragma omp teams
6275 #pragma omp distribute
6276 for (int i = 0; i < 10; ++i) {
6277 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
6278 for (int i = 0; i < 10; ++i)
6281 #pragma omp target
6282 #pragma omp teams
6283 #pragma omp distribute
6284 for (int i = 0; i < 10; ++i) {
6285 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
6286 ++a;
6288 #pragma omp target
6289 #pragma omp teams
6290 #pragma omp distribute
6291 for (int i = 0; i < 10; ++i) {
6292 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
6293 ++a;
6295 #pragma omp target
6296 #pragma omp teams
6297 #pragma omp distribute
6298 for (int i = 0; i < 10; ++i) {
6299 #pragma omp teams // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
6300 ++a;
6302 #pragma omp target
6303 #pragma omp teams
6304 #pragma omp distribute
6305 for (int i = 0; i < 10; ++i) {
6306 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
6307 ++a;
6309 #pragma omp target
6310 #pragma omp teams
6311 #pragma omp distribute
6312 for (int i = 0; i < 10; ++i) {
6313 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
6314 for (int j = 0; j < 10; ++j)
6317 #pragma omp target
6318 #pragma omp teams
6319 #pragma omp distribute
6320 for (int i = 0; i < 10; ++i) {
6321 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
6322 for (int j = 0; j < 10; ++j)
6325 #pragma omp target
6326 #pragma omp teams
6327 #pragma omp distribute
6328 for (int i = 0; i < 10; ++i) {
6329 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
6330 for (int j = 0; j < 10; ++j)
6333 #pragma omp target
6334 #pragma omp teams
6335 #pragma omp distribute
6336 for (int i = 0; i < 10; ++i) {
6337 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
6338 for (int j = 0; j < 10; ++j)
6341 #pragma omp target
6342 #pragma omp teams
6343 #pragma omp distribute
6344 for (int i = 0; i < 10; ++i) {
6345 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
6346 for (int j = 0; j < 10; ++j)
6349 #pragma omp target
6350 #pragma omp teams
6351 #pragma omp distribute
6352 for (int i = 0; i < 10; ++i) {
6353 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
6354 a++;
6356 #pragma omp target
6357 #pragma omp teams
6358 #pragma omp distribute
6359 for (int i = 0; i < 10; ++i) {
6360 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
6361 for (int j = 0; j < 10; ++j)
6364 #pragma omp target
6365 #pragma omp teams
6366 #pragma omp distribute
6367 for (int i = 0; i < 10; ++i) {
6368 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
6369 for (int j = 0; j < 10; ++j)
6372 #pragma omp target
6373 #pragma omp teams
6374 #pragma omp distribute
6375 for (int i = 0; i < 10; ++i) {
6376 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
6377 for (int j = 0; j < 10; ++j)
6380 #pragma omp target
6381 #pragma omp teams
6382 #pragma omp distribute
6383 for (int i = 0; i < 10; ++i) {
6384 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
6385 for (int j = 0; j < 10; ++j)
6389 // DISTRIBUTE PARALLEL FOR DIRECTIVE
6390 #pragma omp target
6391 #pragma omp teams
6392 #pragma omp distribute parallel for
6393 for (int i = 0; i < 10; ++i) {
6394 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
6395 for (int i = 0; i < 10; ++i)
6398 #pragma omp target
6399 #pragma omp teams
6400 #pragma omp distribute parallel for
6401 for (int i = 0; i < 10; ++i) {
6402 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
6403 for (int i = 0; i < 10; ++i)
6406 #pragma omp target
6407 #pragma omp teams
6408 #pragma omp distribute parallel for
6409 for (int i = 0; i < 10; ++i) {
6410 #pragma omp for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
6411 for (int i = 0; i < 10; ++i)
6414 #pragma omp target
6415 #pragma omp teams
6416 #pragma omp distribute parallel for
6417 for (int i = 0; i < 10; ++i) {
6418 #pragma omp simd
6419 for (int i = 0; i < 10; ++i)
6422 #pragma omp target
6423 #pragma omp teams
6424 #pragma omp distribute parallel for
6425 for (int i = 0; i < 10; ++i) {
6426 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
6427 for (int i = 0; i < 10; ++i)
6430 #pragma omp target
6431 #pragma omp teams
6432 #pragma omp distribute parallel for
6433 for (int i = 0; i < 10; ++i) {
6434 #pragma omp parallel
6435 for (int i = 0; i < 10; ++i)
6438 #pragma omp target
6439 #pragma omp teams
6440 #pragma omp distribute parallel for
6441 for (int i = 0; i < 10; ++i) {
6442 #pragma omp sections // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
6444 bar();
6447 #pragma omp target
6448 #pragma omp teams
6449 #pragma omp distribute parallel for
6450 for (int i = 0; i < 10; ++i) {
6451 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a distribute parallel for region}}
6453 bar();
6456 #pragma omp target
6457 #pragma omp teams
6458 #pragma omp distribute parallel for
6459 for (int i = 0; i < 10; ++i) {
6460 #pragma omp single // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
6462 bar();
6465 #pragma omp target
6466 #pragma omp teams
6467 #pragma omp distribute parallel for
6468 for (int i = 0; i < 10; ++i) {
6469 #pragma omp master // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
6471 bar();
6474 #pragma omp target
6475 #pragma omp teams
6476 #pragma omp distribute parallel for
6477 for (int i = 0; i < 10; ++i) {
6478 #pragma omp critical
6480 bar();
6483 #pragma omp target
6484 #pragma omp teams
6485 #pragma omp distribute parallel for
6486 for (int i = 0; i < 10; ++i) {
6487 #pragma omp parallel
6489 #pragma omp single
6491 bar();
6495 #pragma omp target
6496 #pragma omp teams
6497 #pragma omp distribute parallel for
6498 for (int i = 0; i < 10; ++i) {
6499 #pragma omp parallel for
6500 for (int i = 0; i < 10; ++i)
6503 #pragma omp target
6504 #pragma omp teams
6505 #pragma omp distribute parallel for
6506 for (int i = 0; i < 10; ++i) {
6507 #pragma omp parallel for simd
6508 for (int i = 0; i < 10; ++i)
6511 #pragma omp target
6512 #pragma omp teams
6513 #pragma omp distribute parallel for
6514 for (int i = 0; i < 10; ++i) {
6515 #pragma omp parallel sections
6517 bar();
6520 #pragma omp target
6521 #pragma omp teams
6522 #pragma omp distribute parallel for
6523 for (int i = 0; i < 10; ++i) {
6524 #pragma omp task
6526 bar();
6529 #pragma omp target
6530 #pragma omp teams
6531 #pragma omp distribute parallel for
6532 for (int i = 0; i < 10; ++i) {
6533 #pragma omp taskyield
6534 bar();
6536 #pragma omp target
6537 #pragma omp teams
6538 #pragma omp distribute parallel for
6539 for (int i = 0; i < 10; ++i) {
6540 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
6541 bar();
6543 #pragma omp target
6544 #pragma omp teams
6545 #pragma omp distribute parallel for
6546 for (int i = 0; i < 10; ++i) {
6547 #pragma omp scan // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
6548 bar();
6550 #pragma omp target
6551 #pragma omp teams
6552 #pragma omp distribute parallel for
6553 for (int i = 0; i < 10; ++i) {
6554 #pragma omp taskwait
6555 bar();
6557 #pragma omp target
6558 #pragma omp teams
6559 #pragma omp distribute parallel for
6560 for (int i = 0; i < 10; ++i) {
6561 #pragma omp flush
6562 bar();
6564 #pragma omp target
6565 #pragma omp teams
6566 #pragma omp distribute parallel for
6567 for (int i = 0; i < 10; ++i) {
6568 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
6569 bar();
6571 #pragma omp target
6572 #pragma omp teams
6573 #pragma omp distribute parallel for
6574 for (int i = 0; i < 10; ++i) {
6575 #pragma omp atomic
6576 ++a;
6578 #pragma omp target
6579 #pragma omp teams
6580 #pragma omp distribute parallel for
6581 for (int i = 0; i < 10; ++i) {
6582 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
6583 ++a;
6585 #pragma omp target
6586 #pragma omp teams
6587 #pragma omp distribute parallel for
6588 for (int i = 0; i < 10; ++i) {
6589 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
6590 ++a;
6592 #pragma omp target
6593 #pragma omp teams
6594 #pragma omp distribute parallel for
6595 for (int i = 0; i < 10; ++i) {
6596 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
6597 for (int i = 0; i < 10; ++i)
6600 #pragma omp target
6601 #pragma omp teams
6602 #pragma omp distribute parallel for
6603 for (int i = 0; i < 10; ++i) {
6604 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
6605 ++a;
6607 #pragma omp target
6608 #pragma omp teams
6609 #pragma omp distribute parallel for
6610 for (int i = 0; i < 10; ++i) {
6611 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
6612 ++a;
6614 #pragma omp target
6615 #pragma omp teams
6616 #pragma omp distribute parallel for
6617 for (int i = 0; i < 10; ++i) {
6618 #pragma omp teams // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
6619 ++a;
6621 #pragma omp target
6622 #pragma omp teams
6623 #pragma omp distribute parallel for
6624 for (int i = 0; i < 10; ++i) {
6625 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
6626 ++a;
6628 #pragma omp target
6629 #pragma omp teams
6630 #pragma omp distribute parallel for
6631 for (int i = 0; i < 10; ++i) {
6632 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
6633 for (int i = 0; i < 10; ++i)
6636 #pragma omp target
6637 #pragma omp teams
6638 #pragma omp distribute parallel for
6639 for (int i = 0; i < 10; ++i) {
6640 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
6641 for (int i = 0; i < 10; ++i)
6644 #pragma omp target
6645 #pragma omp teams
6646 #pragma omp distribute parallel for
6647 for (int i = 0; i < 10; ++i) {
6648 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
6649 for (int i = 0; i < 10; ++i)
6652 #pragma omp target
6653 #pragma omp teams
6654 #pragma omp distribute parallel for
6655 for (int i = 0; i < 10; ++i) {
6656 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
6657 for (int i = 0; i < 10; ++i)
6660 #pragma omp target
6661 #pragma omp teams
6662 #pragma omp distribute parallel for
6663 for (int i = 0; i < 10; ++i) {
6664 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
6665 for (int i = 0; i < 10; ++i)
6668 #pragma omp target
6669 #pragma omp teams
6670 #pragma omp distribute parallel for
6671 for (int i = 0; i < 10; ++i) {
6672 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
6673 a++;
6675 #pragma omp target
6676 #pragma omp teams
6677 #pragma omp distribute parallel for
6678 for (int i = 0; i < 10; ++i) {
6679 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
6680 for (int i = 0; i < 10; ++i)
6683 #pragma omp target
6684 #pragma omp teams
6685 #pragma omp distribute parallel for
6686 for (int i = 0; i < 10; ++i) {
6687 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
6688 for (int i = 0; i < 10; ++i)
6691 #pragma omp target
6692 #pragma omp teams
6693 #pragma omp distribute parallel for
6694 for (int i = 0; i < 10; ++i) {
6695 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
6696 for (int i = 0; i < 10; ++i)
6699 #pragma omp target
6700 #pragma omp teams
6701 #pragma omp distribute parallel for
6702 for (int i = 0; i < 10; ++i) {
6703 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
6704 for (int i = 0; i < 10; ++i)
6708 // DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
6709 #pragma omp target
6710 #pragma omp teams
6711 #pragma omp distribute parallel for simd
6712 for (int i = 0; i < 10; ++i) {
6713 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6714 for (int i = 0; i < 10; ++i)
6717 #pragma omp target
6718 #pragma omp teams
6719 #pragma omp distribute parallel for simd
6720 for (int i = 0; i < 10; ++i) {
6721 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6722 for (int i = 0; i < 10; ++i)
6725 #pragma omp target
6726 #pragma omp teams
6727 #pragma omp distribute parallel for simd
6728 for (int i = 0; i < 10; ++i) {
6729 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6730 for (int i = 0; i < 10; ++i)
6733 #pragma omp target
6734 #pragma omp teams
6735 #pragma omp distribute parallel for simd
6736 for (int i = 0; i < 10; ++i) {
6737 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
6738 for (int i = 0; i < 10; ++i)
6741 #pragma omp target
6742 #pragma omp teams
6743 #pragma omp distribute parallel for simd
6744 for (int i = 0; i < 10; ++i) {
6745 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6746 for (int i = 0; i < 10; ++i)
6749 #pragma omp target
6750 #pragma omp teams
6751 #pragma omp distribute parallel for simd
6752 for (int i = 0; i < 10; ++i) {
6753 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6754 for (int i = 0; i < 10; ++i)
6757 #pragma omp target
6758 #pragma omp teams
6759 #pragma omp distribute parallel for simd
6760 for (int i = 0; i < 10; ++i) {
6761 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6763 bar();
6766 #pragma omp target
6767 #pragma omp teams
6768 #pragma omp distribute parallel for simd
6769 for (int i = 0; i < 10; ++i) {
6770 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6772 bar();
6775 #pragma omp target
6776 #pragma omp teams
6777 #pragma omp distribute parallel for simd
6778 for (int i = 0; i < 10; ++i) {
6779 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6781 bar();
6784 #pragma omp target
6785 #pragma omp teams
6786 #pragma omp distribute parallel for simd
6787 for (int i = 0; i < 10; ++i) {
6788 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6790 bar();
6793 #pragma omp target
6794 #pragma omp teams
6795 #pragma omp distribute parallel for simd
6796 for (int i = 0; i < 10; ++i) {
6797 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6799 bar();
6802 #pragma omp target
6803 #pragma omp teams
6804 #pragma omp distribute parallel for simd
6805 for (int i = 0; i < 10; ++i) {
6806 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6808 #pragma omp single
6810 bar();
6814 #pragma omp target
6815 #pragma omp teams
6816 #pragma omp distribute parallel for simd
6817 for (int i = 0; i < 10; ++i) {
6818 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6819 for (int i = 0; i < 10; ++i)
6822 #pragma omp target
6823 #pragma omp teams
6824 #pragma omp distribute parallel for simd
6825 for (int i = 0; i < 10; ++i) {
6826 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6827 for (int i = 0; i < 10; ++i)
6830 #pragma omp target
6831 #pragma omp teams
6832 #pragma omp distribute parallel for simd
6833 for (int i = 0; i < 10; ++i) {
6834 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6836 bar();
6839 #pragma omp target
6840 #pragma omp teams
6841 #pragma omp distribute parallel for simd
6842 for (int i = 0; i < 10; ++i) {
6843 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6845 bar();
6848 #pragma omp target
6849 #pragma omp teams
6850 #pragma omp distribute parallel for simd
6851 for (int i = 0; i < 10; ++i) {
6852 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6853 bar();
6855 #pragma omp target
6856 #pragma omp teams
6857 #pragma omp distribute parallel for simd
6858 for (int i = 0; i < 10; ++i) {
6859 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6860 bar();
6862 #pragma omp target
6863 #pragma omp teams
6864 #pragma omp distribute parallel for simd
6865 for (int i = 0; i < 10; ++i) {
6866 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
6867 bar();
6869 #pragma omp target
6870 #pragma omp teams
6871 #pragma omp distribute parallel for simd
6872 for (int i = 0; i < 10; ++i) {
6873 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6874 bar();
6876 #pragma omp target
6877 #pragma omp teams
6878 #pragma omp distribute parallel for simd
6879 for (int i = 0; i < 10; ++i) {
6880 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6881 bar();
6883 #pragma omp target
6884 #pragma omp teams
6885 #pragma omp distribute parallel for simd
6886 for (int i = 0; i < 10; ++i) {
6887 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6888 bar();
6890 #pragma omp target
6891 #pragma omp teams
6892 #pragma omp distribute parallel for simd
6893 for (int i = 0; i < 10; ++i) {
6894 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
6895 ++a;
6897 #pragma omp target
6898 #pragma omp teams
6899 #pragma omp distribute parallel for simd
6900 for (int i = 0; i < 10; ++i) {
6901 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6902 ++a;
6904 #pragma omp target
6905 #pragma omp teams
6906 #pragma omp distribute parallel for simd
6907 for (int i = 0; i < 10; ++i) {
6908 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6909 ++a;
6911 #pragma omp target
6912 #pragma omp teams
6913 #pragma omp distribute parallel for simd
6914 for (int i = 0; i < 10; ++i) {
6915 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6916 for (int i = 0; i < 10; ++i)
6919 #pragma omp target
6920 #pragma omp teams
6921 #pragma omp distribute parallel for simd
6922 for (int i = 0; i < 10; ++i) {
6923 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6924 ++a;
6926 #pragma omp target
6927 #pragma omp teams
6928 #pragma omp distribute parallel for simd
6929 for (int i = 0; i < 10; ++i) {
6930 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6931 ++a;
6933 #pragma omp target
6934 #pragma omp teams
6935 #pragma omp distribute parallel for simd
6936 for (int i = 0; i < 10; ++i) {
6937 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6938 ++a;
6940 #pragma omp target
6941 #pragma omp teams
6942 #pragma omp distribute parallel for simd
6943 for (int i = 0; i < 10; ++i) {
6944 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6945 ++a;
6947 #pragma omp target
6948 #pragma omp teams
6949 #pragma omp distribute parallel for simd
6950 for (int i = 0; i < 10; ++i) {
6951 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6952 for (int i = 0; i < 10; ++i)
6953 ++a;
6955 #pragma omp target
6956 #pragma omp teams
6957 #pragma omp distribute parallel for simd
6958 for (int i = 0; i < 10; ++i) {
6959 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6960 for (int i = 0; i < 10; ++i)
6961 ++a;
6963 #pragma omp target
6964 #pragma omp teams
6965 #pragma omp distribute parallel for simd
6966 for (int i = 0; i < 10; ++i) {
6967 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6968 for (int i = 0; i < 10; ++i)
6969 ++a;
6971 #pragma omp target
6972 #pragma omp teams
6973 #pragma omp distribute parallel for simd
6974 for (int i = 0; i < 10; ++i) {
6975 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6976 for (int i = 0; i < 10; ++i)
6977 ++a;
6979 #pragma omp target
6980 #pragma omp teams
6981 #pragma omp distribute parallel for simd
6982 for (int i = 0; i < 10; ++i) {
6983 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6984 for (int i = 0; i < 10; ++i)
6985 ++a;
6987 #pragma omp target
6988 #pragma omp teams
6989 #pragma omp distribute parallel for simd
6990 for (int i = 0; i < 10; ++i) {
6991 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
6992 for (int i = 0; i < 10; ++i)
6993 ++a;
6995 #pragma omp target
6996 #pragma omp teams
6997 #pragma omp distribute parallel for simd
6998 for (int i = 0; i < 10; ++i) {
6999 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7000 ++a;
7002 #pragma omp target
7003 #pragma omp teams
7004 #pragma omp distribute parallel for simd
7005 for (int i = 0; i < 10; ++i) {
7006 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7007 for (int i = 0; i < 10; ++i)
7008 ++a;
7010 #pragma omp target
7011 #pragma omp teams
7012 #pragma omp distribute parallel for simd
7013 for (int i = 0; i < 10; ++i) {
7014 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7015 for (int i = 0; i < 10; ++i)
7016 ++a;
7018 #pragma omp target
7019 #pragma omp teams
7020 #pragma omp distribute parallel for simd
7021 for (int i = 0; i < 10; ++i) {
7022 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7023 for (int i = 0; i < 10; ++i)
7024 ++a;
7026 #pragma omp target
7027 #pragma omp teams
7028 #pragma omp distribute parallel for simd
7029 for (int i = 0; i < 10; ++i) {
7030 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7031 for (int i = 0; i < 10; ++i)
7032 ++a;
7035 // TARGET SIMD DIRECTIVE
7036 #pragma omp target simd
7037 for (int i = 0; i < 10; ++i) {
7038 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7039 for (int i = 0; i < 10; ++i)
7042 #pragma omp target simd
7043 for (int i = 0; i < 10; ++i) {
7044 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7045 for (int i = 0; i < 10; ++i)
7048 #pragma omp target simd
7049 for (int i = 0; i < 10; ++i) {
7050 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7051 for (int i = 0; i < 10; ++i)
7054 #pragma omp target simd
7055 for (int i = 0; i < 10; ++i) {
7056 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
7057 for (int i = 0; i < 10; ++i)
7060 #pragma omp target simd
7061 for (int i = 0; i < 10; ++i) {
7062 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7063 for (int i = 0; i < 10; ++i)
7066 #pragma omp target simd
7067 for (int i = 0; i < 10; ++i) {
7068 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7069 for (int i = 0; i < 10; ++i)
7072 #pragma omp target simd
7073 for (int i = 0; i < 10; ++i) {
7074 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7076 bar();
7079 #pragma omp target simd
7080 for (int i = 0; i < 10; ++i) {
7081 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7083 bar();
7086 #pragma omp target simd
7087 for (int i = 0; i < 10; ++i) {
7088 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7090 bar();
7093 #pragma omp target simd
7094 for (int i = 0; i < 10; ++i) {
7095 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7097 bar();
7100 #pragma omp target simd
7101 for (int i = 0; i < 10; ++i) {
7102 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7104 bar();
7107 #pragma omp target simd
7108 for (int i = 0; i < 10; ++i) {
7109 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7111 #pragma omp single
7113 bar();
7117 #pragma omp target simd
7118 for (int i = 0; i < 10; ++i) {
7119 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7120 for (int i = 0; i < 10; ++i)
7123 #pragma omp target simd
7124 for (int i = 0; i < 10; ++i) {
7125 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7126 for (int i = 0; i < 10; ++i)
7129 #pragma omp target simd
7130 for (int i = 0; i < 10; ++i) {
7131 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7133 bar();
7136 #pragma omp target simd
7137 for (int i = 0; i < 10; ++i) {
7138 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7140 bar();
7143 #pragma omp target simd
7144 for (int i = 0; i < 10; ++i) {
7145 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7146 bar();
7148 #pragma omp target simd
7149 for (int i = 0; i < 10; ++i) {
7150 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7151 bar();
7153 #pragma omp target simd
7154 for (int i = 0; i < 10; ++i) {
7155 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
7156 bar();
7158 #pragma omp target simd
7159 for (int i = 0; i < 10; ++i) {
7160 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7161 bar();
7163 #pragma omp target simd
7164 for (int i = 0; i < 10; ++i) {
7165 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7166 bar();
7168 #pragma omp target simd
7169 for (int i = 0; i < 10; ++i) {
7170 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7171 bar();
7173 #pragma omp target simd
7174 for (int i = 0; i < 10; ++i) {
7175 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
7176 ++a;
7178 #pragma omp target simd
7179 for (int i = 0; i < 10; ++i) {
7180 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7181 ++a;
7183 #pragma omp target simd
7184 for (int i = 0; i < 10; ++i) {
7185 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7186 ++a;
7188 #pragma omp target simd
7189 for (int i = 0; i < 10; ++i) {
7190 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7191 for (int i = 0; i < 10; ++i)
7194 #pragma omp target simd
7195 for (int i = 0; i < 10; ++i) {
7196 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7197 ++a;
7199 #pragma omp target simd
7200 for (int i = 0; i < 10; ++i) {
7201 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7202 ++a;
7204 #pragma omp target simd
7205 for (int i = 0; i < 10; ++i) {
7206 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7207 ++a;
7209 #pragma omp target simd
7210 for (int i = 0; i < 10; ++i) {
7211 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7212 ++a;
7214 #pragma omp target simd
7215 for (int i = 0; i < 10; ++i) {
7216 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7217 for (int i = 0; i < 10; ++i)
7218 ++a;
7220 #pragma omp target simd
7221 for (int i = 0; i < 10; ++i) {
7222 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7223 for (int i = 0; i < 10; ++i)
7224 ++a;
7226 #pragma omp target simd
7227 for (int i = 0; i < 10; ++i) {
7228 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7229 for (int i = 0; i < 10; ++i)
7230 ++a;
7232 #pragma omp target simd
7233 for (int i = 0; i < 10; ++i) {
7234 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7235 for (int i = 0; i < 10; ++i)
7236 ++a;
7238 #pragma omp target simd
7239 for (int i = 0; i < 10; ++i) {
7240 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7241 for (int i = 0; i < 10; ++i)
7242 ++a;
7244 #pragma omp target simd
7245 for (int i = 0; i < 10; ++i) {
7246 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7247 for (int i = 0; i < 10; ++i)
7248 ++a;
7250 #pragma omp target simd
7251 for (int i = 0; i < 10; ++i) {
7252 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7253 for (int i = 0; i < 10; ++i)
7254 ++a;
7256 #pragma omp target simd
7257 for (int i = 0; i < 10; ++i) {
7258 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7259 for (int i = 0; i < 10; ++i)
7260 ++a;
7263 // TEAMS DISTRIBUTE DIRECTIVE
7264 #pragma omp teams distribute // omp45-error {{orphaned 'omp teams distribute' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
7265 for (int i = 0; i < 10; ++i)
7267 #pragma omp target
7268 #pragma omp teams distribute
7269 for (int i = 0; i < 10; ++i) {
7270 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
7271 for (int i = 0; i < 10; ++i)
7274 #pragma omp target
7275 #pragma omp teams distribute
7276 for (int i = 0; i < 10; ++i) {
7277 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
7278 for (int i = 0; i < 10; ++i)
7281 #pragma omp target
7282 #pragma omp teams distribute
7283 for (int i = 0; i < 10; ++i) {
7284 #pragma omp for // OK
7285 for (int i = 0; i < 10; ++i)
7288 #pragma omp target
7289 #pragma omp teams distribute
7290 for (int i = 0; i < 10; ++i) {
7291 #pragma omp simd // OK
7292 for (int i = 0; i < 10; ++i)
7295 #pragma omp target
7296 #pragma omp teams distribute
7297 for (int i = 0; i < 10; ++i) {
7298 #pragma omp for simd // OK
7299 for (int i = 0; i < 10; ++i)
7302 #pragma omp target
7303 #pragma omp teams distribute
7304 for (int i = 0; i < 10; ++i) {
7305 #pragma omp parallel // OK
7306 for (int i = 0; i < 10; ++i)
7309 #pragma omp target
7310 #pragma omp teams distribute
7311 for (int i = 0; i < 10; ++i) {
7312 #pragma omp sections // OK
7314 bar();
7317 #pragma omp target
7318 #pragma omp teams distribute
7319 for (int i = 0; i < 10; ++i) {
7320 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams distribute region}}
7322 bar();
7325 #pragma omp target
7326 #pragma omp teams distribute
7327 for (int i = 0; i < 10; ++i) {
7328 #pragma omp single // OK
7330 bar();
7333 #pragma omp target
7334 #pragma omp teams distribute
7335 for (int i = 0; i < 10; ++i) {
7336 #pragma omp master // OK
7338 bar();
7341 #pragma omp target
7342 #pragma omp teams distribute
7343 for (int i = 0; i < 10; ++i) {
7344 #pragma omp critical // OK
7346 bar();
7349 #pragma omp target
7350 #pragma omp teams distribute
7351 for (int i = 0; i < 10; ++i) {
7352 #pragma omp parallel // OK
7354 #pragma omp single
7356 bar();
7360 #pragma omp target
7361 #pragma omp teams distribute
7362 for (int i = 0; i < 10; ++i) {
7363 #pragma omp parallel for // OK
7364 for (int i = 0; i < 10; ++i)
7367 #pragma omp target
7368 #pragma omp teams distribute
7369 for (int i = 0; i < 10; ++i) {
7370 #pragma omp parallel for simd // OK
7371 for (int i = 0; i < 10; ++i)
7374 #pragma omp target
7375 #pragma omp teams distribute
7376 for (int i = 0; i < 10; ++i) {
7377 #pragma omp parallel sections // OK
7379 bar();
7382 #pragma omp target
7383 #pragma omp teams distribute
7384 for (int i = 0; i < 10; ++i) {
7385 #pragma omp task // OK
7387 bar();
7390 #pragma omp target
7391 #pragma omp teams distribute
7392 for (int i = 0; i < 10; ++i) {
7393 #pragma omp taskyield // OK
7394 bar();
7396 #pragma omp target
7397 #pragma omp teams distribute
7398 for (int i = 0; i < 10; ++i) {
7399 #pragma omp barrier // OK
7400 bar();
7402 #pragma omp target
7403 #pragma omp teams distribute
7404 for (int i = 0; i < 10; ++i) {
7405 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
7406 bar();
7408 #pragma omp target
7409 #pragma omp teams distribute
7410 for (int i = 0; i < 10; ++i) {
7411 #pragma omp taskwait // OK
7412 bar();
7414 #pragma omp target
7415 #pragma omp teams distribute
7416 for (int i = 0; i < 10; ++i) {
7417 #pragma omp flush // OK
7418 bar();
7420 #pragma omp target
7421 #pragma omp teams distribute
7422 for (int i = 0; i < 10; ++i) {
7423 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
7424 bar();
7426 #pragma omp target
7427 #pragma omp teams distribute
7428 for (int i = 0; i < 10; ++i) {
7429 #pragma omp atomic // OK
7430 ++a;
7432 #pragma omp target
7433 #pragma omp teams distribute
7434 for (int i = 0; i < 10; ++i) {
7435 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
7436 ++a;
7438 #pragma omp target
7439 #pragma omp teams distribute
7440 for (int i = 0; i < 10; ++i) {
7441 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
7442 ++a;
7444 #pragma omp target
7445 #pragma omp teams distribute
7446 for (int i = 0; i < 10; ++i) {
7447 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
7448 for (int i = 0; i < 10; ++i)
7451 #pragma omp target
7452 #pragma omp teams distribute
7453 for (int i = 0; i < 10; ++i) {
7454 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
7455 ++a;
7457 #pragma omp target
7458 #pragma omp teams distribute
7459 for (int i = 0; i < 10; ++i) {
7460 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
7461 ++a;
7463 #pragma omp target
7464 #pragma omp teams distribute
7465 for (int i = 0; i < 10; ++i) {
7466 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
7467 ++a;
7469 #pragma omp target
7470 #pragma omp teams distribute
7471 for (int i = 0; i < 10; ++i) {
7472 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
7473 ++a;
7475 #pragma omp target
7476 #pragma omp teams distribute
7477 for (int i = 0; i < 10; ++i) {
7478 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
7479 for (int i = 0; i < 10; ++i)
7480 ++a;
7482 #pragma omp target
7483 #pragma omp teams distribute
7484 for (int i = 0; i < 10; ++i) {
7485 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
7486 for (int i = 0; i < 10; ++i)
7487 ++a;
7489 #pragma omp target
7490 #pragma omp teams distribute
7491 for (int i = 0; i < 10; ++i) {
7492 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
7493 for (int i = 0; i < 10; ++i)
7494 ++a;
7496 #pragma omp target
7497 #pragma omp teams distribute
7498 for (int i = 0; i < 10; ++i) {
7499 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
7500 for (int i = 0; i < 10; ++i)
7501 ++a;
7503 #pragma omp target
7504 #pragma omp teams distribute
7505 for (int i = 0; i < 10; ++i) {
7506 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
7507 for (int i = 0; i < 10; ++i)
7508 ++a;
7510 #pragma omp target
7511 #pragma omp teams distribute
7512 for (int i = 0; i < 10; ++i) {
7513 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
7514 for (int i = 0; i < 10; ++i)
7515 ++a;
7517 #pragma omp target
7518 #pragma omp teams distribute
7519 for (int i = 0; i < 10; ++i) {
7520 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
7521 for (int i = 0; i < 10; ++i)
7522 ++a;
7524 #pragma omp target
7525 #pragma omp teams distribute
7526 for (int i = 0; i < 10; ++i) {
7527 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
7528 for (int i = 0; i < 10; ++i)
7529 ++a;
7532 // TEAMS DISTRIBUTE DIRECTIVE
7533 #pragma omp teams distribute // omp45-error {{orphaned 'omp teams distribute' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
7534 for (int i = 0; i < 10; ++i)
7536 #pragma omp target
7537 #pragma omp teams distribute
7538 for (int i = 0; i < 10; ++i) {
7539 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
7540 for (int i = 0; i < 10; ++i)
7543 #pragma omp target
7544 #pragma omp teams distribute
7545 for (int i = 0; i < 10; ++i) {
7546 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
7547 for (int i = 0; i < 10; ++i)
7550 #pragma omp target
7551 #pragma omp teams distribute
7552 for (int i = 0; i < 10; ++i) {
7553 #pragma omp for // OK
7554 for (int i = 0; i < 10; ++i)
7557 #pragma omp target
7558 #pragma omp teams distribute
7559 for (int i = 0; i < 10; ++i) {
7560 #pragma omp simd // OK
7561 for (int i = 0; i < 10; ++i)
7564 #pragma omp target
7565 #pragma omp teams distribute
7566 for (int i = 0; i < 10; ++i) {
7567 #pragma omp for simd // OK
7568 for (int i = 0; i < 10; ++i)
7571 #pragma omp target
7572 #pragma omp teams distribute
7573 for (int i = 0; i < 10; ++i) {
7574 #pragma omp parallel // OK
7575 for (int i = 0; i < 10; ++i)
7578 #pragma omp target
7579 #pragma omp teams distribute
7580 for (int i = 0; i < 10; ++i) {
7581 #pragma omp sections // OK
7583 bar();
7586 #pragma omp target
7587 #pragma omp teams distribute
7588 for (int i = 0; i < 10; ++i) {
7589 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams distribute region}}
7591 bar();
7594 #pragma omp target
7595 #pragma omp teams distribute
7596 for (int i = 0; i < 10; ++i) {
7597 #pragma omp single // OK
7599 bar();
7602 #pragma omp target
7603 #pragma omp teams distribute
7604 for (int i = 0; i < 10; ++i) {
7605 #pragma omp master // OK
7607 bar();
7610 #pragma omp target
7611 #pragma omp teams distribute
7612 for (int i = 0; i < 10; ++i) {
7613 #pragma omp critical // OK
7615 bar();
7618 #pragma omp target
7619 #pragma omp teams distribute
7620 for (int i = 0; i < 10; ++i) {
7621 #pragma omp parallel // OK
7623 #pragma omp single
7625 bar();
7629 #pragma omp target
7630 #pragma omp teams distribute
7631 for (int i = 0; i < 10; ++i) {
7632 #pragma omp parallel for // OK
7633 for (int i = 0; i < 10; ++i)
7636 #pragma omp target
7637 #pragma omp teams distribute
7638 for (int i = 0; i < 10; ++i) {
7639 #pragma omp parallel for simd // OK
7640 for (int i = 0; i < 10; ++i)
7643 #pragma omp target
7644 #pragma omp teams distribute
7645 for (int i = 0; i < 10; ++i) {
7646 #pragma omp parallel sections // OK
7648 bar();
7651 #pragma omp target
7652 #pragma omp teams distribute
7653 for (int i = 0; i < 10; ++i) {
7654 #pragma omp task // OK
7656 bar();
7659 #pragma omp target
7660 #pragma omp teams distribute
7661 for (int i = 0; i < 10; ++i) {
7662 #pragma omp taskyield // OK
7663 bar();
7665 #pragma omp target
7666 #pragma omp teams distribute
7667 for (int i = 0; i < 10; ++i) {
7668 #pragma omp barrier // OK
7669 bar();
7671 #pragma omp target
7672 #pragma omp teams distribute
7673 for (int i = 0; i < 10; ++i) {
7674 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
7675 bar();
7677 #pragma omp target
7678 #pragma omp teams distribute
7679 for (int i = 0; i < 10; ++i) {
7680 #pragma omp taskwait // OK
7681 bar();
7683 #pragma omp target
7684 #pragma omp teams distribute
7685 for (int i = 0; i < 10; ++i) {
7686 #pragma omp flush // OK
7687 bar();
7689 #pragma omp target
7690 #pragma omp teams distribute
7691 for (int i = 0; i < 10; ++i) {
7692 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
7693 bar();
7695 #pragma omp target
7696 #pragma omp teams distribute
7697 for (int i = 0; i < 10; ++i) {
7698 #pragma omp atomic // OK
7699 ++a;
7701 #pragma omp target
7702 #pragma omp teams distribute
7703 for (int i = 0; i < 10; ++i) {
7704 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
7705 ++a;
7707 #pragma omp target
7708 #pragma omp teams distribute
7709 for (int i = 0; i < 10; ++i) {
7710 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
7711 ++a;
7713 #pragma omp target
7714 #pragma omp teams distribute
7715 for (int i = 0; i < 10; ++i) {
7716 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
7717 for (int i = 0; i < 10; ++i)
7720 #pragma omp target
7721 #pragma omp teams distribute
7722 for (int i = 0; i < 10; ++i) {
7723 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
7724 ++a;
7726 #pragma omp target
7727 #pragma omp teams distribute
7728 for (int i = 0; i < 10; ++i) {
7729 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
7730 ++a;
7732 #pragma omp target
7733 #pragma omp teams distribute
7734 for (int i = 0; i < 10; ++i) {
7735 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
7736 ++a;
7738 #pragma omp target
7739 #pragma omp teams distribute
7740 for (int i = 0; i < 10; ++i) {
7741 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
7742 ++a;
7744 #pragma omp target
7745 #pragma omp teams distribute
7746 for (int i = 0; i < 10; ++i) {
7747 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
7748 for (int i = 0; i < 10; ++i)
7749 ++a;
7751 #pragma omp target
7752 #pragma omp teams distribute
7753 for (int i = 0; i < 10; ++i) {
7754 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
7755 for (int i = 0; i < 10; ++i)
7756 ++a;
7758 #pragma omp target
7759 #pragma omp teams distribute
7760 for (int i = 0; i < 10; ++i) {
7761 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
7762 for (int i = 0; i < 10; ++i)
7763 ++a;
7765 #pragma omp target
7766 #pragma omp teams distribute
7767 for (int i = 0; i < 10; ++i) {
7768 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
7769 for (int i = 0; i < 10; ++i)
7770 ++a;
7772 #pragma omp target
7773 #pragma omp teams distribute
7774 for (int i = 0; i < 10; ++i) {
7775 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
7776 for (int i = 0; i < 10; ++i)
7777 ++a;
7779 #pragma omp target
7780 #pragma omp teams distribute
7781 for (int i = 0; i < 10; ++i) {
7782 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
7783 for (int i = 0; i < 10; ++i)
7784 ++a;
7786 #pragma omp target
7787 #pragma omp teams distribute
7788 for (int i = 0; i < 10; ++i) {
7789 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
7790 ++a;
7792 #pragma omp target
7793 #pragma omp teams distribute
7794 for (int i = 0; i < 10; ++i) {
7795 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
7796 for (int i = 0; i < 10; ++i)
7797 ++a;
7799 #pragma omp target
7800 #pragma omp teams distribute
7801 for (int i = 0; i < 10; ++i) {
7802 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
7803 for (int i = 0; i < 10; ++i)
7804 ++a;
7806 #pragma omp target
7807 #pragma omp teams distribute
7808 for (int i = 0; i < 10; ++i) {
7809 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
7810 for (int i = 0; i < 10; ++i)
7811 ++a;
7813 #pragma omp target
7814 #pragma omp teams distribute
7815 for (int i = 0; i < 10; ++i) {
7816 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
7817 for (int i = 0; i < 10; ++i)
7818 ++a;
7821 // TEAMS DISTRIBUTE SIMD DIRECTIVE
7822 #pragma omp teams distribute simd // omp45-error {{orphaned 'omp teams distribute simd' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
7823 for (int i = 0; i < 10; ++i)
7825 #pragma omp target
7826 #pragma omp teams distribute simd
7827 for (int i = 0; i < 10; ++i) {
7828 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7829 for (int i = 0; i < 10; ++i)
7832 #pragma omp target
7833 #pragma omp teams distribute simd
7834 for (int i = 0; i < 10; ++i) {
7835 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7836 for (int i = 0; i < 10; ++i)
7839 #pragma omp target
7840 #pragma omp teams distribute simd
7841 for (int i = 0; i < 10; ++i) {
7842 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7843 for (int i = 0; i < 10; ++i)
7846 #pragma omp target
7847 #pragma omp teams distribute simd
7848 for (int i = 0; i < 10; ++i) {
7849 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
7850 for (int i = 0; i < 10; ++i)
7853 #pragma omp target
7854 #pragma omp teams distribute simd
7855 for (int i = 0; i < 10; ++i) {
7856 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7857 for (int i = 0; i < 10; ++i)
7860 #pragma omp target
7861 #pragma omp teams distribute simd
7862 for (int i = 0; i < 10; ++i) {
7863 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7864 for (int i = 0; i < 10; ++i)
7867 #pragma omp target
7868 #pragma omp teams distribute simd
7869 for (int i = 0; i < 10; ++i) {
7870 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7872 bar();
7875 #pragma omp target
7876 #pragma omp teams distribute simd
7877 for (int i = 0; i < 10; ++i) {
7878 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7880 bar();
7883 #pragma omp target
7884 #pragma omp teams distribute simd
7885 for (int i = 0; i < 10; ++i) {
7886 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7888 bar();
7891 #pragma omp target
7892 #pragma omp teams distribute simd
7893 for (int i = 0; i < 10; ++i) {
7894 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7896 bar();
7899 #pragma omp target
7900 #pragma omp teams distribute simd
7901 for (int i = 0; i < 10; ++i) {
7902 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7904 bar();
7907 #pragma omp target
7908 #pragma omp teams distribute simd
7909 for (int i = 0; i < 10; ++i) {
7910 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7912 #pragma omp single
7914 bar();
7918 #pragma omp target
7919 #pragma omp teams distribute simd
7920 for (int i = 0; i < 10; ++i) {
7921 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7922 for (int i = 0; i < 10; ++i)
7925 #pragma omp target
7926 #pragma omp teams distribute simd
7927 for (int i = 0; i < 10; ++i) {
7928 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7929 for (int i = 0; i < 10; ++i)
7932 #pragma omp target
7933 #pragma omp teams distribute simd
7934 for (int i = 0; i < 10; ++i) {
7935 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7937 bar();
7940 #pragma omp target
7941 #pragma omp teams distribute simd
7942 for (int i = 0; i < 10; ++i) {
7943 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7945 bar();
7948 #pragma omp target
7949 #pragma omp teams distribute simd
7950 for (int i = 0; i < 10; ++i) {
7951 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7952 bar();
7954 #pragma omp target
7955 #pragma omp teams distribute simd
7956 for (int i = 0; i < 10; ++i) {
7957 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7958 bar();
7960 #pragma omp target
7961 #pragma omp teams distribute simd
7962 for (int i = 0; i < 10; ++i) {
7963 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
7964 bar();
7966 #pragma omp target
7967 #pragma omp teams distribute simd
7968 for (int i = 0; i < 10; ++i) {
7969 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7970 bar();
7972 #pragma omp target
7973 #pragma omp teams distribute simd
7974 for (int i = 0; i < 10; ++i) {
7975 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7976 bar();
7978 #pragma omp target
7979 #pragma omp teams distribute simd
7980 for (int i = 0; i < 10; ++i) {
7981 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7982 bar();
7984 #pragma omp target
7985 #pragma omp teams distribute simd
7986 for (int i = 0; i < 10; ++i) {
7987 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
7988 ++a;
7990 #pragma omp target
7991 #pragma omp teams distribute simd
7992 for (int i = 0; i < 10; ++i) {
7993 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
7994 ++a;
7996 #pragma omp target
7997 #pragma omp teams distribute simd
7998 for (int i = 0; i < 10; ++i) {
7999 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8000 ++a;
8002 #pragma omp target
8003 #pragma omp teams distribute simd
8004 for (int i = 0; i < 10; ++i) {
8005 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8006 for (int i = 0; i < 10; ++i)
8009 #pragma omp target
8010 #pragma omp teams distribute simd
8011 for (int i = 0; i < 10; ++i) {
8012 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8013 ++a;
8015 #pragma omp target
8016 #pragma omp teams distribute simd
8017 for (int i = 0; i < 10; ++i) {
8018 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8019 ++a;
8021 #pragma omp target
8022 #pragma omp teams distribute simd
8023 for (int i = 0; i < 10; ++i) {
8024 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8025 ++a;
8027 #pragma omp target
8028 #pragma omp teams distribute simd
8029 for (int i = 0; i < 10; ++i) {
8030 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8031 ++a;
8033 #pragma omp target
8034 #pragma omp teams distribute simd
8035 for (int i = 0; i < 10; ++i) {
8036 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8037 for (int i = 0; i < 10; ++i)
8038 ++a;
8040 #pragma omp target
8041 #pragma omp teams distribute simd
8042 for (int i = 0; i < 10; ++i) {
8043 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8044 for (int i = 0; i < 10; ++i)
8045 ++a;
8047 #pragma omp target
8048 #pragma omp teams distribute simd
8049 for (int i = 0; i < 10; ++i) {
8050 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8051 for (int i = 0; i < 10; ++i)
8052 ++a;
8054 #pragma omp target
8055 #pragma omp teams distribute simd
8056 for (int i = 0; i < 10; ++i) {
8057 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8058 for (int i = 0; i < 10; ++i)
8059 ++a;
8061 #pragma omp target
8062 #pragma omp teams distribute simd
8063 for (int i = 0; i < 10; ++i) {
8064 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8065 for (int i = 0; i < 10; ++i)
8066 ++a;
8068 #pragma omp target
8069 #pragma omp teams distribute simd
8070 for (int i = 0; i < 10; ++i) {
8071 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8072 for (int i = 0; i < 10; ++i)
8073 ++a;
8075 #pragma omp target
8076 #pragma omp teams distribute simd
8077 for (int i = 0; i < 10; ++i) {
8078 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8079 ++a;
8081 #pragma omp target
8082 #pragma omp teams distribute simd
8083 for (int i = 0; i < 10; ++i) {
8084 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8085 for (int i = 0; i < 10; ++i)
8086 ++a;
8088 #pragma omp target
8089 #pragma omp teams distribute simd
8090 for (int i = 0; i < 10; ++i) {
8091 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8092 for (int i = 0; i < 10; ++i)
8093 ++a;
8095 #pragma omp target
8096 #pragma omp teams distribute simd
8097 for (int i = 0; i < 10; ++i) {
8098 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8099 for (int i = 0; i < 10; ++i)
8100 ++a;
8102 #pragma omp target
8103 #pragma omp teams distribute simd
8104 for (int i = 0; i < 10; ++i) {
8105 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8106 for (int i = 0; i < 10; ++i)
8107 ++a;
8110 // TEAMS DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
8111 #pragma omp teams distribute parallel for simd // omp45-error {{orphaned 'omp teams distribute parallel for simd' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
8112 for (int i = 0; i < 10; ++i)
8114 #pragma omp target
8115 #pragma omp teams distribute parallel for simd
8116 for (int i = 0; i < 10; ++i) {
8117 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8118 for (int i = 0; i < 10; ++i)
8121 #pragma omp target
8122 #pragma omp teams distribute parallel for simd
8123 for (int i = 0; i < 10; ++i) {
8124 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8125 for (int i = 0; i < 10; ++i)
8128 #pragma omp target
8129 #pragma omp teams distribute parallel for simd
8130 for (int i = 0; i < 10; ++i) {
8131 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8132 for (int i = 0; i < 10; ++i)
8135 #pragma omp target
8136 #pragma omp teams distribute parallel for simd
8137 for (int i = 0; i < 10; ++i) {
8138 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
8139 for (int i = 0; i < 10; ++i)
8142 #pragma omp target
8143 #pragma omp teams distribute parallel for simd
8144 for (int i = 0; i < 10; ++i) {
8145 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8146 for (int i = 0; i < 10; ++i)
8149 #pragma omp target
8150 #pragma omp teams distribute parallel for simd
8151 for (int i = 0; i < 10; ++i) {
8152 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8153 for (int i = 0; i < 10; ++i)
8156 #pragma omp target
8157 #pragma omp teams distribute parallel for simd
8158 for (int i = 0; i < 10; ++i) {
8159 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8161 bar();
8164 #pragma omp target
8165 #pragma omp teams distribute parallel for simd
8166 for (int i = 0; i < 10; ++i) {
8167 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8169 bar();
8172 #pragma omp target
8173 #pragma omp teams distribute parallel for simd
8174 for (int i = 0; i < 10; ++i) {
8175 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8177 bar();
8180 #pragma omp target
8181 #pragma omp teams distribute parallel for simd
8182 for (int i = 0; i < 10; ++i) {
8183 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8185 bar();
8188 #pragma omp target
8189 #pragma omp teams distribute parallel for simd
8190 for (int i = 0; i < 10; ++i) {
8191 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8193 bar();
8196 #pragma omp target
8197 #pragma omp teams distribute parallel for simd
8198 for (int i = 0; i < 10; ++i) {
8199 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8201 #pragma omp single
8203 bar();
8207 #pragma omp target
8208 #pragma omp teams distribute parallel for simd
8209 for (int i = 0; i < 10; ++i) {
8210 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8211 for (int i = 0; i < 10; ++i)
8214 #pragma omp target
8215 #pragma omp teams distribute parallel for simd
8216 for (int i = 0; i < 10; ++i) {
8217 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8218 for (int i = 0; i < 10; ++i)
8221 #pragma omp target
8222 #pragma omp teams distribute parallel for simd
8223 for (int i = 0; i < 10; ++i) {
8224 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8226 bar();
8229 #pragma omp target
8230 #pragma omp teams distribute parallel for simd
8231 for (int i = 0; i < 10; ++i) {
8232 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8234 bar();
8237 #pragma omp target
8238 #pragma omp teams distribute parallel for simd
8239 for (int i = 0; i < 10; ++i) {
8240 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8241 bar();
8243 #pragma omp target
8244 #pragma omp teams distribute parallel for simd
8245 for (int i = 0; i < 10; ++i) {
8246 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8247 bar();
8249 #pragma omp target
8250 #pragma omp teams distribute parallel for simd
8251 for (int i = 0; i < 10; ++i) {
8252 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
8253 bar();
8255 #pragma omp target
8256 #pragma omp teams distribute parallel for simd
8257 for (int i = 0; i < 10; ++i) {
8258 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8259 bar();
8261 #pragma omp target
8262 #pragma omp teams distribute parallel for simd
8263 for (int i = 0; i < 10; ++i) {
8264 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8265 bar();
8267 #pragma omp target
8268 #pragma omp teams distribute parallel for simd
8269 for (int i = 0; i < 10; ++i) {
8270 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8271 bar();
8273 #pragma omp target
8274 #pragma omp teams distribute parallel for simd
8275 for (int i = 0; i < 10; ++i) {
8276 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
8277 ++a;
8279 #pragma omp target
8280 #pragma omp teams distribute parallel for simd
8281 for (int i = 0; i < 10; ++i) {
8282 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8283 ++a;
8285 #pragma omp target
8286 #pragma omp teams distribute parallel for simd
8287 for (int i = 0; i < 10; ++i) {
8288 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8289 ++a;
8291 #pragma omp target
8292 #pragma omp teams distribute parallel for simd
8293 for (int i = 0; i < 10; ++i) {
8294 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8295 for (int i = 0; i < 10; ++i)
8298 #pragma omp target
8299 #pragma omp teams distribute parallel for simd
8300 for (int i = 0; i < 10; ++i) {
8301 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8302 ++a;
8304 #pragma omp target
8305 #pragma omp teams distribute parallel for simd
8306 for (int i = 0; i < 10; ++i) {
8307 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8308 ++a;
8310 #pragma omp target
8311 #pragma omp teams distribute parallel for simd
8312 for (int i = 0; i < 10; ++i) {
8313 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8314 ++a;
8316 #pragma omp target
8317 #pragma omp teams distribute parallel for simd
8318 for (int i = 0; i < 10; ++i) {
8319 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8320 ++a;
8322 #pragma omp target
8323 #pragma omp teams distribute parallel for simd
8324 for (int i = 0; i < 10; ++i) {
8325 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8326 for (int i = 0; i < 10; ++i)
8327 ++a;
8329 #pragma omp target
8330 #pragma omp teams distribute parallel for simd
8331 for (int i = 0; i < 10; ++i) {
8332 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8333 for (int i = 0; i < 10; ++i)
8334 ++a;
8336 #pragma omp target
8337 #pragma omp teams distribute parallel for simd
8338 for (int i = 0; i < 10; ++i) {
8339 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8340 for (int i = 0; i < 10; ++i)
8341 ++a;
8343 #pragma omp target
8344 #pragma omp teams distribute parallel for simd
8345 for (int i = 0; i < 10; ++i) {
8346 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8347 for (int i = 0; i < 10; ++i)
8348 ++a;
8350 #pragma omp target
8351 #pragma omp teams distribute parallel for simd
8352 for (int i = 0; i < 10; ++i) {
8353 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8354 for (int i = 0; i < 10; ++i)
8355 ++a;
8357 #pragma omp target
8358 #pragma omp teams distribute parallel for simd
8359 for (int i = 0; i < 10; ++i) {
8360 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8361 for (int i = 0; i < 10; ++i)
8362 ++a;
8364 #pragma omp target
8365 #pragma omp teams distribute parallel for simd
8366 for (int i = 0; i < 10; ++i) {
8367 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8368 ++a;
8370 #pragma omp target
8371 #pragma omp teams distribute parallel for simd
8372 for (int i = 0; i < 10; ++i) {
8373 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8374 for (int i = 0; i < 10; ++i)
8375 ++a;
8377 #pragma omp target
8378 #pragma omp teams distribute parallel for simd
8379 for (int i = 0; i < 10; ++i) {
8380 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8381 for (int i = 0; i < 10; ++i)
8382 ++a;
8384 #pragma omp target
8385 #pragma omp teams distribute parallel for simd
8386 for (int i = 0; i < 10; ++i) {
8387 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8388 for (int i = 0; i < 10; ++i)
8389 ++a;
8391 #pragma omp target
8392 #pragma omp teams distribute parallel for simd
8393 for (int i = 0; i < 10; ++i) {
8394 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
8395 for (int i = 0; i < 10; ++i)
8396 ++a;
8399 // TEAMS DISTRIBUTE PARALLEL FOR DIRECTIVE
8400 #pragma omp teams distribute parallel for // omp45-error {{orphaned 'omp teams distribute parallel for' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
8401 for (int i = 0; i < 10; ++i)
8403 #pragma omp target
8404 #pragma omp teams distribute parallel for
8405 for (int i = 0; i < 10; ++i) {
8406 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
8407 for (int i = 0; i < 10; ++i)
8410 #pragma omp target
8411 #pragma omp teams distribute parallel for
8412 for (int i = 0; i < 10; ++i) {
8413 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
8414 for (int i = 0; i < 10; ++i)
8417 #pragma omp target
8418 #pragma omp teams distribute parallel for
8419 for (int i = 0; i < 10; ++i) {
8420 #pragma omp for // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
8421 for (int i = 0; i < 10; ++i)
8424 #pragma omp target
8425 #pragma omp teams distribute parallel for
8426 for (int i = 0; i < 10; ++i) {
8427 #pragma omp simd // OK
8428 for (int i = 0; i < 10; ++i)
8431 #pragma omp target
8432 #pragma omp teams distribute parallel for
8433 for (int i = 0; i < 10; ++i) {
8434 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
8435 for (int i = 0; i < 10; ++i)
8438 #pragma omp target
8439 #pragma omp teams distribute parallel for
8440 for (int i = 0; i < 10; ++i) {
8441 #pragma omp parallel // OK
8442 for (int i = 0; i < 10; ++i)
8445 #pragma omp target
8446 #pragma omp teams distribute parallel for
8447 for (int i = 0; i < 10; ++i) {
8448 #pragma omp sections // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
8450 bar();
8453 #pragma omp target
8454 #pragma omp teams distribute parallel for
8455 for (int i = 0; i < 10; ++i) {
8456 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams distribute parallel for region}}
8458 bar();
8461 #pragma omp target
8462 #pragma omp teams distribute parallel for
8463 for (int i = 0; i < 10; ++i) {
8464 #pragma omp single // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
8466 bar();
8469 #pragma omp target
8470 #pragma omp teams distribute parallel for
8471 for (int i = 0; i < 10; ++i) {
8472 #pragma omp master // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
8474 bar();
8477 #pragma omp target
8478 #pragma omp teams distribute parallel for
8479 for (int i = 0; i < 10; ++i) {
8480 #pragma omp critical // OK
8482 bar();
8485 #pragma omp target
8486 #pragma omp teams distribute parallel for
8487 for (int i = 0; i < 10; ++i) {
8488 #pragma omp parallel // OK
8490 #pragma omp single
8492 bar();
8496 #pragma omp target
8497 #pragma omp teams distribute parallel for
8498 for (int i = 0; i < 10; ++i) {
8499 #pragma omp parallel for // OK
8500 for (int i = 0; i < 10; ++i)
8503 #pragma omp target
8504 #pragma omp teams distribute parallel for
8505 for (int i = 0; i < 10; ++i) {
8506 #pragma omp parallel for simd // OK
8507 for (int i = 0; i < 10; ++i)
8510 #pragma omp target
8511 #pragma omp teams distribute parallel for
8512 for (int i = 0; i < 10; ++i) {
8513 #pragma omp parallel sections // OK
8515 bar();
8518 #pragma omp target
8519 #pragma omp teams distribute parallel for
8520 for (int i = 0; i < 10; ++i) {
8521 #pragma omp task // OK
8523 bar();
8526 #pragma omp target
8527 #pragma omp teams distribute parallel for
8528 for (int i = 0; i < 10; ++i) {
8529 #pragma omp taskyield // OK
8530 bar();
8532 #pragma omp target
8533 #pragma omp teams distribute parallel for
8534 for (int i = 0; i < 10; ++i) {
8535 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
8536 bar();
8538 #pragma omp target
8539 #pragma omp teams distribute parallel for
8540 for (int i = 0; i < 10; ++i) {
8541 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
8542 bar();
8544 #pragma omp target
8545 #pragma omp teams distribute parallel for
8546 for (int i = 0; i < 10; ++i) {
8547 #pragma omp taskwait // OK
8548 bar();
8550 #pragma omp target
8551 #pragma omp teams distribute parallel for
8552 for (int i = 0; i < 10; ++i) {
8553 #pragma omp flush // OK
8554 bar();
8556 #pragma omp target
8557 #pragma omp teams distribute parallel for
8558 for (int i = 0; i < 10; ++i) {
8559 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
8560 bar();
8562 #pragma omp target
8563 #pragma omp teams distribute parallel for
8564 for (int i = 0; i < 10; ++i) {
8565 #pragma omp atomic // OK
8566 ++a;
8568 #pragma omp target
8569 #pragma omp teams distribute parallel for
8570 for (int i = 0; i < 10; ++i) {
8571 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
8572 ++a;
8574 #pragma omp target
8575 #pragma omp teams distribute parallel for
8576 for (int i = 0; i < 10; ++i) {
8577 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
8578 ++a;
8580 #pragma omp target
8581 #pragma omp teams distribute parallel for
8582 for (int i = 0; i < 10; ++i) {
8583 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
8584 for (int i = 0; i < 10; ++i)
8587 #pragma omp target
8588 #pragma omp teams distribute parallel for
8589 for (int i = 0; i < 10; ++i) {
8590 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
8591 ++a;
8593 #pragma omp target
8594 #pragma omp teams distribute parallel for
8595 for (int i = 0; i < 10; ++i) {
8596 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
8597 ++a;
8599 #pragma omp target
8600 #pragma omp teams distribute parallel for
8601 for (int i = 0; i < 10; ++i) {
8602 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
8603 ++a;
8605 #pragma omp target
8606 #pragma omp teams distribute parallel for
8607 for (int i = 0; i < 10; ++i) {
8608 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
8609 ++a;
8611 #pragma omp target
8612 #pragma omp teams distribute parallel for
8613 for (int i = 0; i < 10; ++i) {
8614 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
8615 for (int i = 0; i < 10; ++i)
8616 ++a;
8618 #pragma omp target
8619 #pragma omp teams distribute parallel for
8620 for (int i = 0; i < 10; ++i) {
8621 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
8622 for (int i = 0; i < 10; ++i)
8623 ++a;
8625 #pragma omp target
8626 #pragma omp teams distribute parallel for
8627 for (int i = 0; i < 10; ++i) {
8628 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
8629 for (int i = 0; i < 10; ++i)
8630 ++a;
8632 #pragma omp target
8633 #pragma omp teams distribute parallel for
8634 for (int i = 0; i < 10; ++i) {
8635 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
8636 for (int i = 0; i < 10; ++i)
8637 ++a;
8639 #pragma omp target
8640 #pragma omp teams distribute parallel for
8641 for (int i = 0; i < 10; ++i) {
8642 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
8643 for (int i = 0; i < 10; ++i)
8644 ++a;
8646 #pragma omp target
8647 #pragma omp teams distribute parallel for
8648 for (int i = 0; i < 10; ++i) {
8649 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
8650 for (int i = 0; i < 10; ++i)
8651 ++a;
8653 #pragma omp target
8654 #pragma omp teams distribute parallel for
8655 for (int i = 0; i < 10; ++i) {
8656 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
8657 ++a;
8659 #pragma omp target
8660 #pragma omp teams distribute parallel for
8661 for (int i = 0; i < 10; ++i) {
8662 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
8663 for (int i = 0; i < 10; ++i)
8664 ++a;
8666 #pragma omp target
8667 #pragma omp teams distribute parallel for
8668 for (int i = 0; i < 10; ++i) {
8669 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
8670 for (int i = 0; i < 10; ++i)
8671 ++a;
8673 #pragma omp target
8674 #pragma omp teams distribute parallel for
8675 for (int i = 0; i < 10; ++i) {
8676 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
8677 for (int i = 0; i < 10; ++i)
8678 ++a;
8680 #pragma omp target
8681 #pragma omp teams distribute parallel for
8682 for (int i = 0; i < 10; ++i) {
8683 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
8684 for (int i = 0; i < 10; ++i)
8685 ++a;
8688 // TARGET TEAMS DIRECTIVE
8689 #pragma omp target teams
8690 #pragma omp parallel
8691 bar();
8692 #pragma omp target teams
8693 #pragma omp for // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
8694 for (int i = 0; i < 10; ++i)
8696 #pragma omp target teams
8697 #pragma omp simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp simd' directive into a parallel region?}}
8698 for (int i = 0; i < 10; ++i)
8700 #pragma omp target teams
8701 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
8702 for (int i = 0; i < 10; ++i)
8704 #pragma omp target teams
8705 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
8707 bar();
8709 #pragma omp target teams
8710 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams region}}
8712 bar();
8714 #pragma omp target teams
8715 #pragma omp single // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
8716 bar();
8718 #pragma omp target teams
8719 #pragma omp master // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp master' directive into a parallel region?}}
8721 bar();
8723 #pragma omp target teams
8724 #pragma omp critical // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp critical' directive into a parallel region?}}
8726 bar();
8728 #pragma omp target teams
8729 #pragma omp parallel for
8730 for (int i = 0; i < 10; ++i)
8732 #pragma omp target teams
8733 #pragma omp parallel for simd
8734 for (int i = 0; i < 10; ++i)
8736 #pragma omp target teams
8737 #pragma omp parallel sections
8739 bar();
8741 #pragma omp target teams
8742 #pragma omp task // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp task' directive into a parallel region?}}
8744 bar();
8746 #pragma omp target teams
8748 #pragma omp taskyield // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskyield' directive into a parallel region?}}
8749 bar();
8751 #pragma omp target teams
8753 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp barrier' directive into a parallel region?}}
8754 bar();
8756 #pragma omp target teams
8758 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
8759 bar();
8761 #pragma omp target teams
8763 #pragma omp taskwait // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskwait' directive into a parallel region?}}
8764 bar();
8766 #pragma omp target teams
8768 #pragma omp flush // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp flush' directive into a parallel region?}}
8769 bar();
8771 #pragma omp target teams
8773 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
8774 bar();
8776 #pragma omp target teams
8778 #pragma omp atomic // omp-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp atomic' directive into a parallel region?}}
8779 ++a;
8781 #pragma omp target teams
8783 #pragma omp target // expected-error {{region cannot be nested inside 'target teams' region}}
8784 ++a;
8786 #pragma omp target teams
8788 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams' region}}
8789 ++a;
8791 #pragma omp target teams
8792 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams' region}}
8793 for (int i = 0; i < 10; ++i)
8795 #pragma omp target teams
8797 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams' region}}
8799 #pragma omp target teams
8801 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams' region}}
8803 #pragma omp target teams
8805 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
8806 ++a;
8808 #pragma omp target teams
8810 #pragma omp taskloop // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskloop' directive into a parallel region?}}
8811 for (int i = 0; i < 10; ++i)
8812 ++a;
8814 #pragma omp target teams
8815 #pragma omp distribute
8816 for (int i = 0; i < 10; ++i)
8818 #pragma omp target teams
8820 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams' region}}
8821 ++a;
8823 #pragma omp target teams
8824 #pragma omp distribute parallel for
8825 for (int i = 0; i < 10; ++i)
8827 #pragma omp target teams
8829 #pragma omp distribute parallel for
8830 for (int i = 0; i < 10; ++i)
8832 #pragma omp distribute parallel for
8833 for (int j = 0; j < 10; ++j)
8836 #pragma omp target teams
8838 #pragma omp distribute parallel for simd
8839 for (int i = 0; i < 10; ++i)
8841 #pragma omp distribute parallel for simd
8842 for (int j = 0; j < 10; ++j)
8845 #pragma omp target teams
8847 #pragma omp distribute simd
8848 for (int i = 0; i < 10; ++i)
8850 #pragma omp distribute simd
8851 for (int j = 0; j < 10; ++j)
8854 #pragma omp target teams
8856 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams' region}}
8857 for (int i = 0; i < 10; ++i)
8860 #pragma omp target teams
8862 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
8863 for (int i = 0; i < 10; ++i)
8866 #pragma omp target teams
8868 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
8869 for (int i = 0; i < 10; ++i)
8872 #pragma omp target teams
8874 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
8875 for (int i = 0; i < 10; ++i)
8878 #pragma omp target teams
8880 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
8881 for (int i = 0; i < 10; ++i)
8884 #pragma omp target teams
8886 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams' region}}
8887 a++;
8889 #pragma omp target teams
8891 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams' region}}
8892 for (int i = 0; i < 10; ++i)
8895 #pragma omp target teams
8897 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams' region}}
8898 for (int i = 0; i < 10; ++i)
8901 #pragma omp target teams
8903 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams' region}}
8904 for (int i = 0; i < 10; ++i)
8907 #pragma omp target teams
8909 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams' region}}
8910 for (int i = 0; i < 10; ++i)
8914 // TARGET TEAMS DISTRIBUTE DIRECTIVE
8915 #pragma omp target teams distribute // OK
8916 for (int i = 0; i < 10; ++i)
8918 #pragma omp target teams distribute
8919 for (int i = 0; i < 10; ++i) {
8920 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
8921 for (int i = 0; i < 10; ++i)
8924 #pragma omp target teams distribute
8925 for (int i = 0; i < 10; ++i) {
8926 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
8927 for (int i = 0; i < 10; ++i)
8930 #pragma omp target teams distribute
8931 for (int i = 0; i < 10; ++i) {
8932 #pragma omp for // OK
8933 for (int i = 0; i < 10; ++i)
8936 #pragma omp target teams distribute
8937 for (int i = 0; i < 10; ++i) {
8938 #pragma omp simd // OK
8939 for (int i = 0; i < 10; ++i)
8942 #pragma omp target teams distribute
8943 for (int i = 0; i < 10; ++i) {
8944 #pragma omp for simd // OK
8945 for (int i = 0; i < 10; ++i)
8948 #pragma omp target teams distribute
8949 for (int i = 0; i < 10; ++i) {
8950 #pragma omp parallel // OK
8951 for (int i = 0; i < 10; ++i)
8954 #pragma omp target teams distribute
8955 for (int i = 0; i < 10; ++i) {
8956 #pragma omp sections // OK
8958 bar();
8961 #pragma omp target teams distribute
8962 for (int i = 0; i < 10; ++i) {
8963 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams distribute region}}
8965 bar();
8968 #pragma omp target teams distribute
8969 for (int i = 0; i < 10; ++i) {
8970 #pragma omp single // OK
8972 bar();
8975 #pragma omp target teams distribute
8976 for (int i = 0; i < 10; ++i) {
8977 #pragma omp master // OK
8979 bar();
8982 #pragma omp target teams distribute
8983 for (int i = 0; i < 10; ++i) {
8984 #pragma omp critical // OK
8986 bar();
8989 #pragma omp target teams distribute
8990 for (int i = 0; i < 10; ++i) {
8991 #pragma omp parallel // OK
8993 #pragma omp single
8995 bar();
8999 #pragma omp target teams distribute
9000 for (int i = 0; i < 10; ++i) {
9001 #pragma omp parallel for // OK
9002 for (int i = 0; i < 10; ++i)
9005 #pragma omp target teams distribute
9006 for (int i = 0; i < 10; ++i) {
9007 #pragma omp parallel for simd // OK
9008 for (int i = 0; i < 10; ++i)
9011 #pragma omp target teams distribute
9012 for (int i = 0; i < 10; ++i) {
9013 #pragma omp parallel sections // OK
9015 bar();
9018 #pragma omp target teams distribute
9019 for (int i = 0; i < 10; ++i) {
9020 #pragma omp task // OK
9022 bar();
9025 #pragma omp target teams distribute
9026 for (int i = 0; i < 10; ++i) {
9027 #pragma omp taskyield // OK
9028 bar();
9030 #pragma omp target teams distribute
9031 for (int i = 0; i < 10; ++i) {
9032 #pragma omp barrier // OK
9033 bar();
9035 #pragma omp target teams distribute
9036 for (int i = 0; i < 10; ++i) {
9037 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
9038 bar();
9040 #pragma omp target teams distribute
9041 for (int i = 0; i < 10; ++i) {
9042 #pragma omp taskwait // OK
9043 bar();
9045 #pragma omp target teams distribute
9046 for (int i = 0; i < 10; ++i) {
9047 #pragma omp flush // OK
9048 bar();
9050 #pragma omp target teams distribute
9051 for (int i = 0; i < 10; ++i) {
9052 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
9053 bar();
9055 #pragma omp target teams distribute
9056 for (int i = 0; i < 10; ++i) {
9057 #pragma omp atomic // OK
9058 ++a;
9060 #pragma omp target teams distribute
9061 for (int i = 0; i < 10; ++i) {
9062 #pragma omp target // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9063 ++a;
9065 #pragma omp target teams distribute
9066 for (int i = 0; i < 10; ++i) {
9067 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9068 ++a;
9070 #pragma omp target teams distribute
9071 for (int i = 0; i < 10; ++i) {
9072 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9073 for (int i = 0; i < 10; ++i)
9076 #pragma omp target teams distribute
9077 for (int i = 0; i < 10; ++i) {
9078 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9079 ++a;
9081 #pragma omp target teams distribute
9082 for (int i = 0; i < 10; ++i) {
9083 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9084 ++a;
9086 #pragma omp target teams distribute
9087 for (int i = 0; i < 10; ++i) {
9088 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
9089 ++a;
9091 #pragma omp target teams distribute
9092 for (int i = 0; i < 10; ++i) {
9093 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9094 ++a;
9096 #pragma omp target teams distribute
9097 for (int i = 0; i < 10; ++i) {
9098 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
9099 for (int i = 0; i < 10; ++i)
9100 ++a;
9102 #pragma omp target teams distribute
9103 for (int i = 0; i < 10; ++i) {
9104 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9105 for (int i = 0; i < 10; ++i)
9106 ++a;
9108 #pragma omp target teams distribute
9109 for (int i = 0; i < 10; ++i) {
9110 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
9111 for (int i = 0; i < 10; ++i)
9112 ++a;
9114 #pragma omp target teams distribute
9115 for (int i = 0; i < 10; ++i) {
9116 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
9117 for (int i = 0; i < 10; ++i)
9118 ++a;
9120 #pragma omp target teams distribute
9121 for (int i = 0; i < 10; ++i) {
9122 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
9123 for (int i = 0; i < 10; ++i)
9124 ++a;
9126 #pragma omp target teams distribute
9127 for (int i = 0; i < 10; ++i) {
9128 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
9129 for (int i = 0; i < 10; ++i)
9132 #pragma omp target teams distribute
9133 for (int i = 0; i < 10; ++i) {
9134 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9135 a++;
9137 #pragma omp target teams distribute
9138 for (int i = 0; i < 10; ++i) {
9139 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9140 for (int i = 0; i < 10; ++i)
9143 #pragma omp target teams distribute
9144 for (int i = 0; i < 10; ++i) {
9145 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9146 for (int i = 0; i < 10; ++i)
9149 #pragma omp target teams distribute
9150 for (int i = 0; i < 10; ++i) {
9151 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9152 for (int i = 0; i < 10; ++i)
9155 #pragma omp target teams distribute
9156 for (int i = 0; i < 10; ++i) {
9157 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
9158 for (int i = 0; i < 10; ++i)
9162 // TARGET TEAMS DISTRIBUTE PARALLEL FOR DIRECTIVE
9163 #pragma omp target teams distribute parallel for // OK
9164 for (int i = 0; i < 10; ++i)
9166 #pragma omp target teams distribute parallel for
9167 for (int i = 0; i < 10; ++i) {
9168 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
9169 for (int i = 0; i < 10; ++i)
9172 #pragma omp target teams distribute parallel for
9173 for (int i = 0; i < 10; ++i) {
9174 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
9175 for (int i = 0; i < 10; ++i)
9178 #pragma omp target teams distribute parallel for
9179 for (int i = 0; i < 10; ++i) {
9180 #pragma omp for // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
9181 for (int i = 0; i < 10; ++i)
9184 #pragma omp target teams distribute parallel for
9185 for (int i = 0; i < 10; ++i) {
9186 #pragma omp simd // OK
9187 for (int i = 0; i < 10; ++i)
9190 #pragma omp target teams distribute parallel for
9191 for (int i = 0; i < 10; ++i) {
9192 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
9193 for (int i = 0; i < 10; ++i)
9196 #pragma omp target teams distribute parallel for
9197 for (int i = 0; i < 10; ++i) {
9198 #pragma omp parallel // OK
9199 for (int i = 0; i < 10; ++i)
9202 #pragma omp target teams distribute parallel for
9203 for (int i = 0; i < 10; ++i) {
9204 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
9206 bar();
9209 #pragma omp target teams distribute parallel for
9210 for (int i = 0; i < 10; ++i) {
9211 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams distribute parallel for region}}
9213 bar();
9216 #pragma omp target teams distribute parallel for
9217 for (int i = 0; i < 10; ++i) {
9218 #pragma omp single // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
9220 bar();
9223 #pragma omp target teams distribute parallel for
9224 for (int i = 0; i < 10; ++i) {
9225 #pragma omp master // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
9227 bar();
9230 #pragma omp target teams distribute parallel for
9231 for (int i = 0; i < 10; ++i) {
9232 #pragma omp critical // OK
9234 bar();
9237 #pragma omp target teams distribute parallel for
9238 for (int i = 0; i < 10; ++i) {
9239 #pragma omp parallel // OK
9241 #pragma omp single
9243 bar();
9247 #pragma omp target teams distribute parallel for
9248 for (int i = 0; i < 10; ++i) {
9249 #pragma omp parallel for // OK
9250 for (int i = 0; i < 10; ++i)
9253 #pragma omp target teams distribute parallel for
9254 for (int i = 0; i < 10; ++i) {
9255 #pragma omp parallel for simd // OK
9256 for (int i = 0; i < 10; ++i)
9259 #pragma omp target teams distribute parallel for
9260 for (int i = 0; i < 10; ++i) {
9261 #pragma omp parallel sections // OK
9263 bar();
9266 #pragma omp target teams distribute parallel for
9267 for (int i = 0; i < 10; ++i) {
9268 #pragma omp task // OK
9270 bar();
9273 #pragma omp target teams distribute parallel for
9274 for (int i = 0; i < 10; ++i) {
9275 #pragma omp taskyield // OK
9276 bar();
9278 #pragma omp target teams distribute parallel for
9279 for (int i = 0; i < 10; ++i) {
9280 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
9281 bar();
9283 #pragma omp target teams distribute parallel for
9284 for (int i = 0; i < 10; ++i) {
9285 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
9286 bar();
9288 #pragma omp target teams distribute parallel for
9289 for (int i = 0; i < 10; ++i) {
9290 #pragma omp taskwait // OK
9291 bar();
9293 #pragma omp target teams distribute parallel for
9294 for (int i = 0; i < 10; ++i) {
9295 #pragma omp flush // OK
9296 bar();
9298 #pragma omp target teams distribute parallel for
9299 for (int i = 0; i < 10; ++i) {
9300 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
9301 bar();
9303 #pragma omp target teams distribute parallel for
9304 for (int i = 0; i < 10; ++i) {
9305 #pragma omp atomic // OK
9306 ++a;
9308 #pragma omp target teams distribute parallel for
9309 for (int i = 0; i < 10; ++i) {
9310 #pragma omp target // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9311 ++a;
9313 #pragma omp target teams distribute parallel for
9314 for (int i = 0; i < 10; ++i) {
9315 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9316 ++a;
9318 #pragma omp target teams distribute parallel for
9319 for (int i = 0; i < 10; ++i) {
9320 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9321 for (int i = 0; i < 10; ++i)
9324 #pragma omp target teams distribute parallel for
9325 for (int i = 0; i < 10; ++i) {
9326 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9327 ++a;
9329 #pragma omp target teams distribute parallel for
9330 for (int i = 0; i < 10; ++i) {
9331 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9332 ++a;
9334 #pragma omp target teams distribute parallel for
9335 for (int i = 0; i < 10; ++i) {
9336 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
9337 ++a;
9339 #pragma omp target teams distribute parallel for
9340 for (int i = 0; i < 10; ++i) {
9341 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9342 ++a;
9344 #pragma omp target teams distribute parallel for
9345 for (int i = 0; i < 10; ++i) {
9346 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
9347 for (int i = 0; i < 10; ++i)
9348 ++a;
9350 #pragma omp target teams distribute parallel for
9351 for (int i = 0; i < 10; ++i) {
9352 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9353 for (int i = 0; i < 10; ++i)
9354 ++a;
9356 #pragma omp target teams distribute parallel for
9357 for (int i = 0; i < 10; ++i) {
9358 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
9359 for (int i = 0; i < 10; ++i)
9360 ++a;
9362 #pragma omp target teams distribute parallel for
9363 for (int i = 0; i < 10; ++i) {
9364 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
9365 for (int i = 0; i < 10; ++i)
9366 ++a;
9368 #pragma omp target teams distribute parallel for
9369 for (int i = 0; i < 10; ++i) {
9370 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
9371 for (int i = 0; i < 10; ++i)
9372 ++a;
9374 #pragma omp target teams distribute parallel for
9375 for (int i = 0; i < 10; ++i) {
9376 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
9377 for (int i = 0; i < 10; ++i)
9380 #pragma omp target teams distribute parallel for
9381 for (int i = 0; i < 10; ++i) {
9382 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9383 a++;
9385 #pragma omp target teams distribute parallel for
9386 for (int i = 0; i < 10; ++i) {
9387 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9388 for (int i = 0; i < 10; ++i)
9391 #pragma omp target teams distribute parallel for
9392 for (int i = 0; i < 10; ++i) {
9393 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9394 for (int i = 0; i < 10; ++i)
9397 #pragma omp target teams distribute parallel for
9398 for (int i = 0; i < 10; ++i) {
9399 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9400 for (int i = 0; i < 10; ++i)
9403 #pragma omp target teams distribute parallel for
9404 for (int i = 0; i < 10; ++i) {
9405 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
9406 for (int i = 0; i < 10; ++i)
9410 // TARGET TEAMS DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
9411 #pragma omp target teams distribute parallel for simd // OK
9412 for (int i = 0; i < 10; ++i)
9414 #pragma omp target teams distribute parallel for simd
9415 for (int i = 0; i < 10; ++i) {
9416 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9417 for (int i = 0; i < 10; ++i)
9420 #pragma omp target teams distribute parallel for simd
9421 for (int i = 0; i < 10; ++i) {
9422 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9423 for (int i = 0; i < 10; ++i)
9426 #pragma omp target teams distribute parallel for simd
9427 for (int i = 0; i < 10; ++i) {
9428 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9429 for (int i = 0; i < 10; ++i)
9432 #pragma omp target teams distribute parallel for simd
9433 for (int i = 0; i < 10; ++i) {
9434 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
9435 for (int i = 0; i < 10; ++i)
9438 #pragma omp target teams distribute parallel for simd
9439 for (int i = 0; i < 10; ++i) {
9440 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9441 for (int i = 0; i < 10; ++i)
9444 #pragma omp target teams distribute parallel for simd
9445 for (int i = 0; i < 10; ++i) {
9446 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9447 for (int i = 0; i < 10; ++i)
9450 #pragma omp target teams distribute parallel for simd
9451 for (int i = 0; i < 10; ++i) {
9452 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9454 bar();
9457 #pragma omp target teams distribute parallel for simd
9458 for (int i = 0; i < 10; ++i) {
9459 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9461 bar();
9464 #pragma omp target teams distribute parallel for simd
9465 for (int i = 0; i < 10; ++i) {
9466 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9468 bar();
9471 #pragma omp target teams distribute parallel for simd
9472 for (int i = 0; i < 10; ++i) {
9473 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9475 bar();
9478 #pragma omp target teams distribute parallel for simd
9479 for (int i = 0; i < 10; ++i) {
9480 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9482 bar();
9485 #pragma omp target teams distribute parallel for simd
9486 for (int i = 0; i < 10; ++i) {
9487 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9489 #pragma omp single
9491 bar();
9495 #pragma omp target teams distribute parallel for simd
9496 for (int i = 0; i < 10; ++i) {
9497 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9498 for (int i = 0; i < 10; ++i)
9501 #pragma omp target teams distribute parallel for simd
9502 for (int i = 0; i < 10; ++i) {
9503 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9504 for (int i = 0; i < 10; ++i)
9507 #pragma omp target teams distribute parallel for simd
9508 for (int i = 0; i < 10; ++i) {
9509 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9511 bar();
9514 #pragma omp target teams distribute parallel for simd
9515 for (int i = 0; i < 10; ++i) {
9516 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9518 bar();
9521 #pragma omp target teams distribute parallel for simd
9522 for (int i = 0; i < 10; ++i) {
9523 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9524 bar();
9526 #pragma omp target teams distribute parallel for simd
9527 for (int i = 0; i < 10; ++i) {
9528 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9529 bar();
9531 #pragma omp target teams distribute parallel for simd
9532 for (int i = 0; i < 10; ++i) {
9533 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
9534 bar();
9536 #pragma omp target teams distribute parallel for simd
9537 for (int i = 0; i < 10; ++i) {
9538 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9539 bar();
9541 #pragma omp target teams distribute parallel for simd
9542 for (int i = 0; i < 10; ++i) {
9543 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9544 bar();
9546 #pragma omp target teams distribute parallel for simd
9547 for (int i = 0; i < 10; ++i) {
9548 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9549 bar();
9551 #pragma omp target teams distribute parallel for simd
9552 for (int i = 0; i < 10; ++i) {
9553 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
9554 ++a;
9556 #pragma omp target teams distribute parallel for simd
9557 for (int i = 0; i < 10; ++i) {
9558 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9559 ++a;
9561 #pragma omp target teams distribute parallel for simd
9562 for (int i = 0; i < 10; ++i) {
9563 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9564 ++a;
9566 #pragma omp target teams distribute parallel for simd
9567 for (int i = 0; i < 10; ++i) {
9568 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9569 for (int i = 0; i < 10; ++i)
9572 #pragma omp target teams distribute parallel for simd
9573 for (int i = 0; i < 10; ++i) {
9574 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9575 ++a;
9577 #pragma omp target teams distribute parallel for simd
9578 for (int i = 0; i < 10; ++i) {
9579 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9580 ++a;
9582 #pragma omp target teams distribute parallel for simd
9583 for (int i = 0; i < 10; ++i) {
9584 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9585 ++a;
9587 #pragma omp target teams distribute parallel for simd
9588 for (int i = 0; i < 10; ++i) {
9589 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9590 ++a;
9592 #pragma omp target teams distribute parallel for simd
9593 for (int i = 0; i < 10; ++i) {
9594 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9595 for (int i = 0; i < 10; ++i)
9596 ++a;
9598 #pragma omp target teams distribute parallel for simd
9599 for (int i = 0; i < 10; ++i) {
9600 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9601 for (int i = 0; i < 10; ++i)
9602 ++a;
9604 #pragma omp target teams distribute parallel for simd
9605 for (int i = 0; i < 10; ++i) {
9606 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9607 for (int i = 0; i < 10; ++i)
9608 ++a;
9610 #pragma omp target teams distribute parallel for simd
9611 for (int i = 0; i < 10; ++i) {
9612 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9613 for (int i = 0; i < 10; ++i)
9614 ++a;
9616 #pragma omp target teams distribute parallel for simd
9617 for (int i = 0; i < 10; ++i) {
9618 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9619 for (int i = 0; i < 10; ++i)
9620 ++a;
9622 #pragma omp target teams distribute parallel for simd
9623 for (int i = 0; i < 10; ++i) {
9624 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9625 for (int i = 0; i < 10; ++i)
9628 #pragma omp target teams distribute parallel for simd
9629 for (int i = 0; i < 10; ++i) {
9630 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9631 a++;
9633 #pragma omp target teams distribute parallel for simd
9634 for (int i = 0; i < 10; ++i) {
9635 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9636 for (int i = 0; i < 10; ++i)
9639 #pragma omp target teams distribute parallel for simd
9640 for (int i = 0; i < 10; ++i) {
9641 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9642 for (int i = 0; i < 10; ++i)
9645 #pragma omp target teams distribute parallel for simd
9646 for (int i = 0; i < 10; ++i) {
9647 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9648 for (int i = 0; i < 10; ++i)
9651 #pragma omp target teams distribute parallel for simd
9652 for (int i = 0; i < 10; ++i) {
9653 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9654 for (int i = 0; i < 10; ++i)
9658 // TARGET TEAMS DISTRIBUTE SIMD DIRECTIVE
9659 #pragma omp target teams distribute simd // OK
9660 for (int i = 0; i < 10; ++i)
9662 #pragma omp target teams distribute simd
9663 for (int i = 0; i < 10; ++i) {
9664 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9665 for (int i = 0; i < 10; ++i)
9668 #pragma omp target teams distribute simd
9669 for (int i = 0; i < 10; ++i) {
9670 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9671 for (int i = 0; i < 10; ++i)
9674 #pragma omp target teams distribute simd
9675 for (int i = 0; i < 10; ++i) {
9676 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9677 for (int i = 0; i < 10; ++i)
9680 #pragma omp target teams distribute simd
9681 for (int i = 0; i < 10; ++i) {
9682 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
9683 for (int i = 0; i < 10; ++i)
9686 #pragma omp target teams distribute simd
9687 for (int i = 0; i < 10; ++i) {
9688 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9689 for (int i = 0; i < 10; ++i)
9692 #pragma omp target teams distribute simd
9693 for (int i = 0; i < 10; ++i) {
9694 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9695 for (int i = 0; i < 10; ++i)
9698 #pragma omp target teams distribute simd
9699 for (int i = 0; i < 10; ++i) {
9700 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9702 bar();
9705 #pragma omp target teams distribute simd
9706 for (int i = 0; i < 10; ++i) {
9707 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9709 bar();
9712 #pragma omp target teams distribute simd
9713 for (int i = 0; i < 10; ++i) {
9714 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9716 bar();
9719 #pragma omp target teams distribute simd
9720 for (int i = 0; i < 10; ++i) {
9721 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9723 bar();
9726 #pragma omp target teams distribute simd
9727 for (int i = 0; i < 10; ++i) {
9728 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9730 bar();
9733 #pragma omp target teams distribute simd
9734 for (int i = 0; i < 10; ++i) {
9735 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9737 #pragma omp single
9739 bar();
9743 #pragma omp target teams distribute simd
9744 for (int i = 0; i < 10; ++i) {
9745 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9746 for (int i = 0; i < 10; ++i)
9749 #pragma omp target teams distribute simd
9750 for (int i = 0; i < 10; ++i) {
9751 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9752 for (int i = 0; i < 10; ++i)
9755 #pragma omp target teams distribute simd
9756 for (int i = 0; i < 10; ++i) {
9757 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9759 bar();
9762 #pragma omp target teams distribute simd
9763 for (int i = 0; i < 10; ++i) {
9764 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9766 bar();
9769 #pragma omp target teams distribute simd
9770 for (int i = 0; i < 10; ++i) {
9771 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9772 bar();
9774 #pragma omp target teams distribute simd
9775 for (int i = 0; i < 10; ++i) {
9776 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9777 bar();
9779 #pragma omp target teams distribute simd
9780 for (int i = 0; i < 10; ++i) {
9781 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
9782 bar();
9784 #pragma omp target teams distribute simd
9785 for (int i = 0; i < 10; ++i) {
9786 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9787 bar();
9789 #pragma omp target teams distribute simd
9790 for (int i = 0; i < 10; ++i) {
9791 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9792 bar();
9794 #pragma omp target teams distribute simd
9795 for (int i = 0; i < 10; ++i) {
9796 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9797 bar();
9799 #pragma omp target teams distribute simd
9800 for (int i = 0; i < 10; ++i) {
9801 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
9802 ++a;
9804 #pragma omp target teams distribute simd
9805 for (int i = 0; i < 10; ++i) {
9806 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9807 ++a;
9809 #pragma omp target teams distribute simd
9810 for (int i = 0; i < 10; ++i) {
9811 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9812 ++a;
9814 #pragma omp target teams distribute simd
9815 for (int i = 0; i < 10; ++i) {
9816 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9817 for (int i = 0; i < 10; ++i)
9820 #pragma omp target teams distribute simd
9821 for (int i = 0; i < 10; ++i) {
9822 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9823 ++a;
9825 #pragma omp target teams distribute simd
9826 for (int i = 0; i < 10; ++i) {
9827 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9828 ++a;
9830 #pragma omp target teams distribute simd
9831 for (int i = 0; i < 10; ++i) {
9832 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9833 ++a;
9835 #pragma omp target teams distribute simd
9836 for (int i = 0; i < 10; ++i) {
9837 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9838 ++a;
9840 #pragma omp target teams distribute simd
9841 for (int i = 0; i < 10; ++i) {
9842 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9843 for (int i = 0; i < 10; ++i)
9844 ++a;
9846 #pragma omp target teams distribute simd
9847 for (int i = 0; i < 10; ++i) {
9848 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9849 for (int i = 0; i < 10; ++i)
9850 ++a;
9852 #pragma omp target teams distribute simd
9853 for (int i = 0; i < 10; ++i) {
9854 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9855 for (int i = 0; i < 10; ++i)
9856 ++a;
9858 #pragma omp target teams distribute simd
9859 for (int i = 0; i < 10; ++i) {
9860 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9861 for (int i = 0; i < 10; ++i)
9862 ++a;
9864 #pragma omp target teams distribute simd
9865 for (int i = 0; i < 10; ++i) {
9866 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9867 for (int i = 0; i < 10; ++i)
9868 ++a;
9870 #pragma omp target teams distribute simd
9871 for (int i = 0; i < 10; ++i) {
9872 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9873 for (int i = 0; i < 10; ++i)
9876 #pragma omp target teams distribute simd
9877 for (int i = 0; i < 10; ++i) {
9878 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9879 a++;
9881 #pragma omp target teams distribute simd
9882 for (int i = 0; i < 10; ++i) {
9883 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9884 for (int i = 0; i < 10; ++i)
9887 #pragma omp target teams distribute simd
9888 for (int i = 0; i < 10; ++i) {
9889 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9890 for (int i = 0; i < 10; ++i)
9893 #pragma omp target teams distribute simd
9894 for (int i = 0; i < 10; ++i) {
9895 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9896 for (int i = 0; i < 10; ++i)
9899 #pragma omp target teams distribute simd
9900 for (int i = 0; i < 10; ++i) {
9901 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
9902 for (int i = 0; i < 10; ++i)
9906 // SCOPE DIRECTIVE
9907 #pragma omp scope
9908 #pragma omp parallel // OK
9909 bar();
9910 #pragma omp scope
9911 #pragma omp parallel for // OK
9912 for(int i = 0; i < 10; i++)
9914 #pragma omp scope
9915 #pragma omp parallel for simd // OK
9916 for(int i = 0; i < 10; i++)
9918 #pragma omp scope
9919 #pragma omp for
9920 for (int i = 0; i < 10; ++i)
9922 #pragma omp scope
9923 #pragma omp simd
9924 for (int i = 0; i < 10; ++i)
9926 #pragma omp scope
9927 #pragma omp for simd
9928 for (int i = 0; i < 10; ++i)
9930 #pragma omp scope
9931 #pragma omp sections
9933 bar();
9935 #pragma omp scope
9936 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a scope region}}
9938 bar();
9940 #pragma omp scope
9941 #pragma omp single
9942 bar();
9944 #pragma omp scope
9945 #pragma omp master
9947 bar();
9949 #pragma omp scope
9950 #pragma omp critical
9952 bar();
9954 #pragma omp scope
9955 #pragma omp parallel sections
9957 bar();
9959 #pragma omp scope
9960 #pragma omp parallel master
9962 bar();
9964 #pragma omp scope
9965 #pragma omp parallel masked
9967 bar();
9969 #pragma omp scope
9970 #pragma omp task
9972 bar();
9974 #pragma omp scope
9976 #pragma omp taskyield
9977 bar();
9979 #pragma omp scope
9981 #pragma omp barrier
9982 bar();
9984 #pragma omp scope
9986 #pragma omp scan // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
9987 bar();
9989 #pragma omp scope
9991 #pragma omp taskwait
9992 bar();
9994 #pragma omp scope
9996 #pragma omp flush
9997 bar();
9999 #pragma omp scope
10001 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
10002 bar();
10004 #pragma omp scope
10006 #pragma omp atomic
10007 ++a;
10009 #pragma omp scope
10011 #pragma omp target parallel
10012 ++a;
10014 #pragma omp scope
10016 #pragma omp target parallel for
10017 for (int i = 0; i < 10; ++i)
10020 #pragma omp scope
10022 #pragma omp target enter data map(to: a)
10023 ++a;
10025 #pragma omp scope
10027 #pragma omp target exit data map(from: a)
10028 ++a;
10030 #pragma omp scope
10032 #pragma omp taskloop
10033 for (int i = 0; i < 10; ++i)
10034 ++a;
10036 #pragma omp scope
10038 #pragma omp target // OK
10039 a++;
10041 #pragma omp scope
10043 #pragma omp teams // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
10044 a++;
10046 #pragma omp scope
10048 #pragma omp target teams // OK
10049 a++;
10051 #pragma omp scope
10053 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
10054 for (int i = 0; i < 10; ++i)
10057 #pragma omp scope
10059 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
10060 for (int i = 0; i < 10; ++i)
10063 #pragma omp scope
10065 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
10066 for (int i = 0; i < 10; ++i)
10069 #pragma omp scope
10071 #pragma omp target simd // OK
10072 for (int i = 0; i < 10; ++i)
10075 #pragma omp scope
10077 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
10078 for (int i = 0; i < 10; ++i)
10081 #pragma omp scope
10083 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
10084 for (int i = 0; i < 10; ++i)
10087 #pragma omp scope
10089 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
10090 for (int i = 0; i < 10; ++i)
10093 #pragma omp scope
10095 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
10096 for (int i = 0; i < 10; ++i)
10099 #pragma omp scope
10101 #pragma omp target teams // OK
10102 ++a;
10104 #pragma omp scope
10106 #pragma omp target teams distribute // OK
10107 for (int i = 0; i < 10; ++i)
10110 #pragma omp scope
10112 #pragma omp target teams distribute parallel for // OK
10113 for (int i = 0; i < 10; ++i)
10116 #pragma omp scope
10118 #pragma omp target teams distribute parallel for simd // OK
10119 for (int i = 0; i < 10; ++i)
10122 #pragma omp scope
10124 #pragma omp target teams distribute simd // OK
10125 for (int i = 0; i < 10; ++i)
10128 #pragma omp for
10129 for (int i = 0; i < 10; ++i) {
10130 #pragma omp scope // expected-error {{region cannot be closely nested inside 'for' region}}
10131 bar();
10134 #pragma omp for simd
10135 for (int i = 0; i < 10; ++i) {
10136 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10137 bar();
10140 #pragma omp sections
10142 #pragma omp scope // expected-error {{region cannot be closely nested inside 'sections' region}}
10143 bar();
10146 #pragma omp sections
10148 #pragma omp section
10150 #pragma omp scope // expected-error {{region cannot be closely nested inside 'section' region}}
10151 bar();
10155 #pragma omp single
10157 #pragma omp scope // expected-error {{region cannot be closely nested inside 'single' region}}
10158 bar();
10161 #pragma omp master
10163 #pragma omp scope // expected-error {{region cannot be closely nested inside 'master' region}}
10164 bar();
10167 #pragma omp critical
10169 #pragma omp scope // expected-error {{region cannot be closely nested inside 'critical' region}}
10170 bar();
10173 #pragma omp parallel for
10174 for (int i = 0; i < 10; ++i) {
10175 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel for' region}}
10176 bar();
10179 #pragma omp parallel for simd
10180 for (int i = 0; i < 10; ++i) {
10181 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10182 bar();
10185 #pragma omp parallel master
10187 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel master' region}}
10188 bar();
10191 #pragma omp parallel sections
10193 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
10194 bar();
10197 #pragma omp task
10199 #pragma omp scope // expected-error {{region cannot be closely nested inside 'task' region}}
10200 bar();
10203 #pragma omp ordered
10205 #pragma omp scope // expected-error {{region cannot be closely nested inside 'ordered' region}}
10206 bar();
10209 #pragma omp atomic
10210 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
10211 // expected-note@+1 {{expected an expression statement}}
10213 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
10214 bar();
10217 #pragma omp target
10218 #pragma omp teams
10220 #pragma omp scope // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp scope' directive into a parallel region?}}
10221 bar();
10224 #pragma omp taskloop
10225 for (int i = 0; i < 10; ++i) {
10226 #pragma omp scope // expected-error {{region cannot be closely nested inside 'taskloop' region}}
10227 bar();
10230 #pragma omp target
10231 #pragma omp teams
10232 #pragma omp distribute parallel for
10233 for (int i = 0; i < 10; ++i) {
10234 #pragma omp scope // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
10235 bar();
10238 #pragma omp target
10239 #pragma omp teams
10240 #pragma omp distribute parallel for simd
10241 for (int i = 0; i < 10; ++i) {
10242 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10243 bar();
10246 #pragma omp target simd
10247 for (int i = 0; i < 10; ++i) {
10248 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10249 bar();
10252 #pragma omp target
10253 #pragma omp teams distribute simd
10254 for (int i = 0; i < 10; ++i) {
10255 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10256 bar();
10259 #pragma omp target
10260 #pragma omp teams distribute parallel for simd
10261 for (int i = 0; i < 10; ++i) {
10262 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10263 bar();
10266 #pragma omp target
10267 #pragma omp teams distribute parallel for
10268 for (int i = 0; i < 10; ++i) {
10269 #pragma omp scope // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
10270 bar();
10273 #pragma omp target teams
10275 #pragma omp scope // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp scope' directive into a parallel region?}}
10276 bar();
10279 #pragma omp target teams distribute parallel for
10280 for (int i = 0; i < 10; ++i) {
10281 #pragma omp scope // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
10282 bar();
10285 #pragma omp target teams distribute parallel for simd
10286 for (int i = 0; i < 10; ++i) {
10287 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10288 bar();
10291 #pragma omp target teams distribute simd
10292 for (int i = 0; i < 10; ++i) {
10293 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10294 bar();
10297 #pragma omp simd
10298 for (int i = 0; i < 10; ++i) {
10299 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10300 bar();
10304 void foo() {
10305 int a = 0;
10306 // PARALLEL DIRECTIVE
10307 #pragma omp parallel
10308 #pragma omp for
10309 for (int i = 0; i < 10; ++i)
10311 #pragma omp parallel
10312 #pragma omp simd
10313 for (int i = 0; i < 10; ++i)
10315 #pragma omp parallel
10316 #pragma omp for simd
10317 for (int i = 0; i < 10; ++i)
10319 #pragma omp parallel
10320 #pragma omp sections
10322 bar();
10324 #pragma omp parallel
10325 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel region}}
10327 bar();
10329 #pragma omp parallel
10330 #pragma omp sections
10332 bar();
10334 #pragma omp parallel
10335 #pragma omp single
10336 bar();
10337 #pragma omp parallel
10338 #pragma omp master
10339 bar();
10340 #pragma omp parallel master
10341 bar();
10342 #pragma omp parallel masked
10343 bar();
10344 #pragma omp parallel
10345 #pragma omp critical
10346 bar();
10347 #pragma omp parallel
10348 #pragma omp parallel for
10349 for (int i = 0; i < 10; ++i)
10351 #pragma omp parallel
10352 #pragma omp parallel for simd
10353 for (int i = 0; i < 10; ++i)
10355 #pragma omp parallel
10356 #pragma omp parallel sections
10358 bar();
10360 #pragma omp parallel
10361 #pragma omp task
10363 bar();
10365 #pragma omp parallel
10367 #pragma omp taskyield
10368 bar();
10370 #pragma omp parallel
10372 #pragma omp barrier
10373 bar();
10375 #pragma omp parallel
10377 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
10378 bar();
10380 #pragma omp parallel
10382 #pragma omp taskwait
10383 bar();
10385 #pragma omp parallel
10387 #pragma omp flush
10388 bar();
10390 #pragma omp parallel
10392 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
10393 bar();
10395 #pragma omp parallel
10397 #pragma omp atomic
10398 ++a;
10400 #pragma omp parallel
10402 #pragma omp target
10403 ++a;
10405 #pragma omp parallel
10407 #pragma omp target parallel
10408 ++a;
10410 #pragma omp parallel
10411 #pragma omp target parallel for
10412 for (int i = 0; i < 10; ++i)
10414 #pragma omp parallel
10416 #pragma omp target enter data map(to: a)
10417 ++a;
10419 #pragma omp parallel
10421 #pragma omp target exit data map(from: a)
10422 ++a;
10424 #pragma omp parallel
10426 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
10427 ++a;
10429 #pragma omp parallel
10431 #pragma omp taskloop
10432 for (int i = 0; i < 10; ++i)
10433 ++a;
10435 #pragma omp parallel
10437 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
10438 for (int i = 0; i < 10; ++i)
10441 #pragma omp parallel
10443 #pragma omp target update to(a)
10444 a++;
10446 #pragma omp parallel
10448 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
10449 for (int i = 0; i < 10; ++i)
10452 #pragma omp parallel
10454 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
10455 for (int i = 0; i < 10; ++i)
10458 #pragma omp parallel
10460 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
10461 for (int i = 0; i < 10; ++i)
10464 #pragma omp parallel
10466 #pragma omp target simd // OK
10467 for (int i = 0; i < 10; ++i)
10470 #pragma omp parallel
10472 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
10473 for (int i = 0; i < 10; ++i)
10476 #pragma omp parallel
10478 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
10479 for (int i = 0; i < 10; ++i)
10482 #pragma omp parallel
10484 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
10485 for (int i = 0; i < 10; ++i)
10488 #pragma omp parallel
10490 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
10491 for (int i = 0; i < 10; ++i)
10494 #pragma omp parallel
10496 #pragma omp target teams // OK
10497 a++;
10499 #pragma omp parallel
10501 #pragma omp target teams distribute // OK
10502 for (int i = 0; i < 10; ++i)
10505 #pragma omp parallel
10507 #pragma omp target teams distribute parallel for // OK
10508 for (int i = 0; i < 10; ++i)
10511 #pragma omp parallel
10513 #pragma omp target teams distribute parallel for simd // OK
10514 for (int i = 0; i < 10; ++i)
10517 #pragma omp parallel
10519 #pragma omp target teams distribute simd // OK
10520 for (int i = 0; i < 10; ++i)
10524 // SIMD DIRECTIVE
10525 #pragma omp simd
10526 for (int i = 0; i < 10; ++i) {
10527 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10528 for (int i = 0; i < 10; ++i)
10531 #pragma omp simd
10532 for (int i = 0; i < 10; ++i) {
10533 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
10534 for (int i = 0; i < 10; ++i)
10537 #pragma omp simd
10538 for (int i = 0; i < 10; ++i) {
10539 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10540 for (int i = 0; i < 10; ++i)
10543 #pragma omp simd
10544 for (int i = 0; i < 10; ++i) {
10545 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10546 for (int i = 0; i < 10; ++i)
10549 #pragma omp simd
10550 for (int i = 0; i < 10; ++i) {
10551 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10553 bar();
10556 #pragma omp simd
10557 for (int i = 0; i < 10; ++i) {
10558 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10560 bar();
10563 #pragma omp simd
10564 for (int i = 0; i < 10; ++i) {
10565 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10566 bar();
10567 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10568 bar();
10570 #pragma omp simd
10571 for (int i = 0; i < 10; ++i) {
10572 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10573 bar();
10574 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10575 bar();
10577 #pragma omp simd
10578 for (int i = 0; i < 10; ++i) {
10579 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10580 for (int i = 0; i < 10; ++i)
10583 #pragma omp simd
10584 for (int i = 0; i < 10; ++i) {
10585 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10586 for (int i = 0; i < 10; ++i)
10589 #pragma omp simd
10590 for (int i = 0; i < 10; ++i) {
10591 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10593 bar();
10596 #pragma omp simd
10597 for (int i = 0; i < 10; ++i) {
10598 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10600 bar();
10603 #pragma omp simd
10604 for (int i = 0; i < 10; ++i) {
10605 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10606 bar();
10608 #pragma omp simd
10609 for (int i = 0; i < 10; ++i) {
10610 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10611 bar();
10613 #pragma omp simd
10614 for (int i = 0; i < 10; ++i) {
10615 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
10616 bar();
10618 #pragma omp simd
10619 for (int i = 0; i < 10; ++i) {
10620 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10621 bar();
10623 #pragma omp simd
10624 for (int i = 0; i < 10; ++i) {
10625 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10626 bar();
10628 #pragma omp simd
10629 for (int i = 0; i < 10; ++i) {
10630 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10631 bar();
10633 #pragma omp simd
10634 for (int i = 0; i < 10; ++i) {
10635 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
10636 ++a;
10638 #pragma omp simd
10639 for (int i = 0; i < 10; ++i) {
10640 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10641 ++a;
10643 #pragma omp simd
10644 for (int i = 0; i < 10; ++i) {
10645 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10646 ++a;
10648 #pragma omp simd
10649 for (int i = 0; i < 10; ++i) {
10650 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10651 for (int i = 0; i < 10; ++i)
10654 #pragma omp simd
10655 for (int i = 0; i < 10; ++i) {
10656 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10657 ++a;
10659 #pragma omp simd
10660 for (int i = 0; i < 10; ++i) {
10661 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10662 ++a;
10664 #pragma omp simd
10665 for (int i = 0; i < 10; ++i) {
10666 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10667 ++a;
10669 #pragma omp simd
10670 for (int i = 0; i < 10; ++i) {
10671 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10672 for (int i = 0; i < 10; ++i)
10673 ++a;
10675 #pragma omp simd
10676 for (int i = 0; i < 10; ++i) {
10677 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10678 for (int j = 0; j < 10; ++j)
10681 #pragma omp simd
10682 for (int i = 0; i < 10; ++i) {
10683 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10684 a++;
10686 #pragma omp simd
10687 for (int i = 0; i < 10; ++i) {
10688 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10689 for (int j = 0; j < 10; ++j)
10692 #pragma omp simd
10693 for (int i = 0; i < 10; ++i) {
10694 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10695 for (int j = 0; j < 10; ++j)
10698 #pragma omp simd
10699 for (int i = 0; i < 10; ++i) {
10700 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10701 for (int j = 0; j < 10; ++j)
10704 #pragma omp simd
10705 for (int i = 0; i < 10; ++i) {
10706 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10707 for (int j = 0; j < 10; ++j)
10710 #pragma omp simd
10711 for (int i = 0; i < 10; ++i) {
10712 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10713 for (int j = 0; j < 10; ++j)
10716 #pragma omp simd
10717 for (int i = 0; i < 10; ++i) {
10718 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10719 for (int j = 0; j < 10; ++j)
10722 #pragma omp simd
10723 for (int i = 0; i < 10; ++i) {
10724 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10725 for (int j = 0; j < 10; ++j)
10728 #pragma omp simd
10729 for (int i = 0; i < 10; ++i) {
10730 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10731 for (int j = 0; j < 10; ++j)
10734 #pragma omp simd
10735 for (int i = 0; i < 10; ++i) {
10736 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10737 a++;
10739 #pragma omp simd
10740 for (int i = 0; i < 10; ++i) {
10741 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10742 for (int j = 0; j < 10; ++j)
10745 #pragma omp simd
10746 for (int i = 0; i < 10; ++i) {
10747 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10748 for (int j = 0; j < 10; ++j)
10751 #pragma omp simd
10752 for (int i = 0; i < 10; ++i) {
10753 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10754 for (int j = 0; j < 10; ++j)
10757 #pragma omp simd
10758 for (int i = 0; i < 10; ++i) {
10759 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
10760 for (int j = 0; j < 10; ++j)
10764 // FOR DIRECTIVE
10765 #pragma omp for
10766 for (int i = 0; i < 10; ++i) {
10767 #pragma omp for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
10768 for (int i = 0; i < 10; ++i)
10771 #pragma omp for
10772 for (int i = 0; i < 10; ++i) {
10773 #pragma omp simd
10774 for (int i = 0; i < 10; ++i)
10777 #pragma omp for
10778 for (int i = 0; i < 10; ++i) {
10779 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
10780 for (int i = 0; i < 10; ++i)
10783 #pragma omp for
10784 for (int i = 0; i < 10; ++i) {
10785 #pragma omp parallel
10786 for (int i = 0; i < 10; ++i)
10789 #pragma omp for
10790 for (int i = 0; i < 10; ++i) {
10791 #pragma omp sections // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
10793 bar();
10796 #pragma omp for
10797 for (int i = 0; i < 10; ++i) {
10798 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a for region}}
10800 bar();
10803 #pragma omp for
10804 for (int i = 0; i < 10; ++i) {
10805 #pragma omp single // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
10806 bar();
10807 #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
10808 bar();
10809 #pragma omp critical
10810 bar();
10812 #pragma omp for
10813 for (int i = 0; i < 10; ++i) {
10814 #pragma omp parallel
10816 #pragma omp single // OK
10818 bar();
10820 #pragma omp for // OK
10821 for (int i = 0; i < 10; ++i)
10823 #pragma omp for simd // OK
10824 for (int i = 0; i < 10; ++i)
10826 #pragma omp sections // OK
10828 bar();
10832 #pragma omp for
10833 for (int i = 0; i < 10; ++i) {
10834 #pragma omp parallel for
10835 for (int i = 0; i < 10; ++i)
10838 #pragma omp for
10839 for (int i = 0; i < 10; ++i) {
10840 #pragma omp parallel for simd
10841 for (int i = 0; i < 10; ++i)
10844 #pragma omp for
10845 for (int i = 0; i < 10; ++i) {
10846 #pragma omp parallel sections
10848 bar();
10851 #pragma omp for
10852 for (int i = 0; i < 10; ++i) {
10853 #pragma omp task
10855 bar();
10858 #pragma omp for
10859 for (int i = 0; i < 10; ++i) {
10860 #pragma omp taskyield
10861 bar();
10863 #pragma omp for
10864 for (int i = 0; i < 10; ++i) {
10865 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'for' region}}
10866 bar();
10868 #pragma omp for
10869 for (int i = 0; i < 10; ++i) {
10870 #pragma omp scan // omp45-error {{region cannot be closely nested inside 'for' region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
10871 bar();
10873 #pragma omp for
10874 for (int i = 0; i < 10; ++i) {
10875 #pragma omp taskwait
10876 bar();
10878 #pragma omp for
10879 for (int i = 0; i < 10; ++i) {
10880 #pragma omp flush
10881 bar();
10883 #pragma omp for
10884 for (int i = 0; i < 10; ++i) {
10885 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
10886 bar();
10888 #pragma omp for ordered
10889 for (int i = 0; i < 10; ++i) {
10890 #pragma omp ordered // OK
10891 bar();
10893 #pragma omp for
10894 for (int i = 0; i < 10; ++i) {
10895 #pragma omp atomic
10896 ++a;
10898 #pragma omp for
10899 for (int i = 0; i < 10; ++i) {
10900 #pragma omp target
10901 ++a;
10903 #pragma omp for
10904 for (int i = 0; i < 10; ++i) {
10905 #pragma omp target parallel
10906 ++a;
10908 #pragma omp for
10909 for (int i = 0; i < 10; ++i) {
10910 #pragma omp target parallel for
10911 for (int i = 0; i < 10; ++i)
10914 #pragma omp for
10915 for (int i = 0; i < 10; ++i) {
10916 #pragma omp target enter data map(to: a)
10917 ++a;
10919 #pragma omp for
10920 for (int i = 0; i < 10; ++i) {
10921 #pragma omp target exit data map(from: a)
10922 ++a;
10924 #pragma omp for
10925 for (int i = 0; i < 10; ++i) {
10926 #pragma omp teams // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
10927 ++a;
10929 #pragma omp for
10930 for (int i = 0; i < 10; ++i) {
10931 #pragma omp taskloop
10932 for (int i = 0; i < 10; ++i)
10933 ++a;
10935 #pragma omp for
10936 for (int i = 0; i < 10; ++i) {
10937 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
10938 for (int j = 0; j < 10; ++j)
10941 #pragma omp for
10942 for (int i = 0; i < 10; ++i) {
10943 #pragma omp target update to(a)
10944 ++a;
10946 #pragma omp for
10947 for (int i = 0; i < 10; ++i) {
10948 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
10949 for (int j = 0; j < 10; ++j)
10952 #pragma omp for
10953 for (int i = 0; i < 10; ++i) {
10954 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
10955 for (int j = 0; j < 10; ++j)
10958 #pragma omp for
10959 for (int i = 0; i < 10; ++i) {
10960 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
10961 for (int j = 0; j < 10; ++j)
10964 #pragma omp for
10965 for (int i = 0; i < 10; ++i) {
10966 #pragma omp target simd // OK
10967 for (int j = 0; j < 10; ++j)
10970 #pragma omp for
10971 for (int i = 0; i < 10; ++i) {
10972 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
10973 for (int j = 0; j < 10; ++j)
10976 #pragma omp for
10977 for (int i = 0; i < 10; ++i) {
10978 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
10979 for (int j = 0; j < 10; ++j)
10982 #pragma omp for
10983 for (int i = 0; i < 10; ++i) {
10984 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
10985 for (int j = 0; j < 10; ++j)
10988 #pragma omp for
10989 for (int i = 0; i < 10; ++i) {
10990 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
10991 for (int j = 0; j < 10; ++j)
10994 #pragma omp for
10995 for (int i = 0; i < 10; ++i) {
10996 #pragma omp target teams // OK
10997 a++;
10999 #pragma omp for
11000 for (int i = 0; i < 10; ++i) {
11001 #pragma omp target teams distribute // OK
11002 for (int j = 0; j < 10; ++j)
11005 #pragma omp for
11006 for (int i = 0; i < 10; ++i) {
11007 #pragma omp target teams distribute parallel for // OK
11008 for (int j = 0; j < 10; ++j)
11011 #pragma omp for
11012 for (int i = 0; i < 10; ++i) {
11013 #pragma omp target teams distribute parallel for simd // OK
11014 for (int j = 0; j < 10; ++j)
11017 #pragma omp for
11018 for (int i = 0; i < 10; ++i) {
11019 #pragma omp target teams distribute simd // OK
11020 for (int j = 0; j < 10; ++j)
11024 // FOR SIMD DIRECTIVE
11025 #pragma omp for simd
11026 for (int i = 0; i < 10; ++i) {
11027 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11028 for (int i = 0; i < 10; ++i)
11031 #pragma omp for simd
11032 for (int i = 0; i < 10; ++i) {
11033 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
11034 for (int i = 0; i < 10; ++i)
11037 #pragma omp for simd
11038 for (int i = 0; i < 10; ++i) {
11039 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11040 for (int i = 0; i < 10; ++i)
11043 #pragma omp for simd
11044 for (int i = 0; i < 10; ++i) {
11045 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11046 for (int i = 0; i < 10; ++i)
11049 #pragma omp for simd
11050 for (int i = 0; i < 10; ++i) {
11051 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11053 bar();
11056 #pragma omp for simd
11057 for (int i = 0; i < 10; ++i) {
11058 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11060 bar();
11063 #pragma omp for simd
11064 for (int i = 0; i < 10; ++i) {
11065 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11066 bar();
11067 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11068 bar();
11070 #pragma omp for simd
11071 for (int i = 0; i < 10; ++i) {
11072 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11073 bar();
11074 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11075 bar();
11077 #pragma omp for simd
11078 for (int i = 0; i < 10; ++i) {
11079 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11080 for (int i = 0; i < 10; ++i)
11083 #pragma omp for simd
11084 for (int i = 0; i < 10; ++i) {
11085 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11086 for (int i = 0; i < 10; ++i)
11089 #pragma omp for simd
11090 for (int i = 0; i < 10; ++i) {
11091 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11093 bar();
11096 #pragma omp for simd
11097 for (int i = 0; i < 10; ++i) {
11098 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11100 bar();
11103 #pragma omp for simd
11104 for (int i = 0; i < 10; ++i) {
11105 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11106 bar();
11108 #pragma omp for simd
11109 for (int i = 0; i < 10; ++i) {
11110 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11111 bar();
11113 #pragma omp for simd
11114 for (int i = 0; i < 10; ++i) {
11115 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
11116 bar();
11118 #pragma omp for simd
11119 for (int i = 0; i < 10; ++i) {
11120 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11121 bar();
11123 #pragma omp for simd
11124 for (int i = 0; i < 10; ++i) {
11125 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11126 bar();
11128 #pragma omp for simd
11129 for (int i = 0; i < 10; ++i) {
11130 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11131 bar();
11133 #pragma omp for simd
11134 for (int i = 0; i < 10; ++i) {
11135 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
11136 ++a;
11138 #pragma omp for simd
11139 for (int i = 0; i < 10; ++i) {
11140 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11141 ++a;
11143 #pragma omp for simd
11144 for (int i = 0; i < 10; ++i) {
11145 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11146 ++a;
11148 #pragma omp for simd
11149 for (int i = 0; i < 10; ++i) {
11150 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11151 for (int i = 0; i < 10; ++i)
11154 #pragma omp for simd
11155 for (int i = 0; i < 10; ++i) {
11156 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11157 ++a;
11159 #pragma omp for simd
11160 for (int i = 0; i < 10; ++i) {
11161 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11162 ++a;
11164 #pragma omp for simd
11165 for (int i = 0; i < 10; ++i) {
11166 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11167 ++a;
11169 #pragma omp for simd
11170 for (int i = 0; i < 10; ++i) {
11171 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11172 for (int i = 0; i < 10; ++i)
11173 ++a;
11175 #pragma omp for simd
11176 for (int i = 0; i < 10; ++i) {
11177 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11178 for (int j = 0; j < 10; ++j)
11181 #pragma omp for simd
11182 for (int i = 0; i < 10; ++i) {
11183 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11184 ++a;
11186 #pragma omp for simd
11187 for (int i = 0; i < 10; ++i) {
11188 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11189 for (int j = 0; j < 10; ++j)
11192 #pragma omp for simd
11193 for (int i = 0; i < 10; ++i) {
11194 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11195 for (int j = 0; j < 10; ++j)
11198 #pragma omp for simd
11199 for (int i = 0; i < 10; ++i) {
11200 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11201 for (int j = 0; j < 10; ++j)
11204 #pragma omp for simd
11205 for (int i = 0; i < 10; ++i) {
11206 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11207 for (int j = 0; j < 10; ++j)
11210 #pragma omp for simd
11211 for (int i = 0; i < 10; ++i) {
11212 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11213 for (int j = 0; j < 10; ++j)
11216 #pragma omp for simd
11217 for (int i = 0; i < 10; ++i) {
11218 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11219 for (int j = 0; j < 10; ++j)
11222 #pragma omp for simd
11223 for (int i = 0; i < 10; ++i) {
11224 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11225 for (int j = 0; j < 10; ++j)
11228 #pragma omp for simd
11229 for (int i = 0; i < 10; ++i) {
11230 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11231 for (int j = 0; j < 10; ++j)
11234 #pragma omp for simd
11235 for (int i = 0; i < 10; ++i) {
11236 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11237 a++;
11239 #pragma omp for simd
11240 for (int i = 0; i < 10; ++i) {
11241 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11242 for (int j = 0; j < 10; ++j)
11245 #pragma omp for simd
11246 for (int i = 0; i < 10; ++i) {
11247 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11248 for (int j = 0; j < 10; ++j)
11251 #pragma omp for simd
11252 for (int i = 0; i < 10; ++i) {
11253 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11254 for (int j = 0; j < 10; ++j)
11257 #pragma omp for simd
11258 for (int i = 0; i < 10; ++i) {
11259 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
11260 for (int j = 0; j < 10; ++j)
11264 // SECTIONS DIRECTIVE
11265 #pragma omp sections
11267 #pragma omp for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
11268 for (int i = 0; i < 10; ++i)
11271 #pragma omp sections
11273 #pragma omp simd
11274 for (int i = 0; i < 10; ++i)
11277 #pragma omp sections
11279 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
11280 for (int i = 0; i < 10; ++i)
11283 #pragma omp sections
11285 #pragma omp parallel
11286 for (int i = 0; i < 10; ++i)
11289 #pragma omp sections
11291 #pragma omp sections // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
11293 bar();
11296 #pragma omp sections
11298 #pragma omp section
11300 bar();
11303 #pragma omp sections
11305 #pragma omp critical
11306 bar();
11307 #pragma omp single // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
11308 bar();
11309 #pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
11310 bar();
11312 #pragma omp sections
11314 #pragma omp parallel
11316 #pragma omp single // OK
11318 bar();
11320 #pragma omp for // OK
11321 for (int i = 0; i < 10; ++i)
11323 #pragma omp for simd // OK
11324 for (int i = 0; i < 10; ++i)
11326 #pragma omp sections // OK
11328 bar();
11332 #pragma omp sections
11334 #pragma omp parallel for
11335 for (int i = 0; i < 10; ++i)
11338 #pragma omp sections
11340 #pragma omp parallel for simd
11341 for (int i = 0; i < 10; ++i)
11344 #pragma omp sections
11346 #pragma omp parallel sections
11348 bar();
11351 #pragma omp sections
11353 #pragma omp task
11355 bar();
11358 #pragma omp sections
11360 #pragma omp taskyield
11362 #pragma omp sections
11364 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'sections' region}}
11365 bar();
11367 #pragma omp sections
11369 #pragma omp scan // expected-error {{region cannot be closely nested inside 'sections' region}}
11370 bar();
11372 #pragma omp sections
11374 #pragma omp taskwait
11376 #pragma omp sections
11378 #pragma omp flush
11380 #pragma omp sections
11382 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
11383 bar();
11385 #pragma omp sections
11387 #pragma omp atomic
11388 ++a;
11390 #pragma omp sections
11392 #pragma omp target
11393 ++a;
11395 #pragma omp sections
11397 #pragma omp target parallel
11398 ++a;
11400 #pragma omp sections
11402 #pragma omp target parallel for
11403 for (int i = 0; i < 10; ++i)
11406 #pragma omp sections
11408 #pragma omp target enter data map(to: a)
11410 #pragma omp sections
11412 #pragma omp target exit data map(from: a)
11414 #pragma omp sections
11416 #pragma omp teams // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
11417 ++a;
11419 #pragma omp sections
11421 #pragma omp taskloop
11422 for (int i = 0; i < 10; ++i)
11423 ++a;
11425 #pragma omp sections
11427 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
11428 for (int i = 0; i < 10; ++i)
11431 #pragma omp sections
11433 #pragma omp target update to(a)
11435 #pragma omp sections
11437 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
11438 for (int i = 0; i < 10; ++i)
11441 #pragma omp sections
11443 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
11444 for (int i = 0; i < 10; ++i)
11447 #pragma omp sections
11449 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
11450 for (int i = 0; i < 10; ++i)
11453 #pragma omp sections
11455 #pragma omp target simd // OK
11456 for (int i = 0; i < 10; ++i)
11459 #pragma omp sections
11461 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
11462 for (int i = 0; i < 10; ++i)
11465 #pragma omp sections
11467 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
11468 for (int i = 0; i < 10; ++i)
11471 #pragma omp sections
11473 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
11474 for (int i = 0; i < 10; ++i)
11477 #pragma omp sections
11479 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
11480 for (int i = 0; i < 10; ++i)
11483 #pragma omp sections
11485 #pragma omp target teams // OK
11486 a++;
11488 #pragma omp sections
11490 #pragma omp target teams distribute // OK
11491 for (int i = 0; i < 10; ++i)
11494 #pragma omp sections
11496 #pragma omp target teams distribute parallel for // OK
11497 for (int i = 0; i < 10; ++i)
11500 #pragma omp sections
11502 #pragma omp target teams distribute parallel for simd // OK
11503 for (int i = 0; i < 10; ++i)
11506 #pragma omp sections
11508 #pragma omp target teams distribute simd // OK
11509 for (int i = 0; i < 10; ++i)
11513 // SECTION DIRECTIVE
11514 #pragma omp section // expected-error {{orphaned 'omp section' directives are prohibited, it must be closely nested to a sections region}}
11516 bar();
11518 #pragma omp sections
11520 #pragma omp section
11522 #pragma omp for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
11523 for (int i = 0; i < 10; ++i)
11527 #pragma omp sections
11529 #pragma omp section
11531 #pragma omp simd
11532 for (int i = 0; i < 10; ++i)
11536 #pragma omp sections
11538 #pragma omp section
11540 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
11541 for (int i = 0; i < 10; ++i)
11545 #pragma omp sections
11547 #pragma omp section
11549 #pragma omp parallel
11550 for (int i = 0; i < 10; ++i)
11554 #pragma omp sections
11556 #pragma omp section
11558 #pragma omp sections // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
11560 bar();
11564 #pragma omp sections
11566 #pragma omp section
11568 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a section region}}
11570 bar();
11574 #pragma omp sections
11576 #pragma omp section
11578 #pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
11579 bar();
11580 #pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
11581 bar();
11582 #pragma omp critical
11583 bar();
11586 #pragma omp sections
11588 #pragma omp section
11590 #pragma omp parallel
11592 #pragma omp single // OK
11594 bar();
11596 #pragma omp for // OK
11597 for (int i = 0; i < 10; ++i)
11599 #pragma omp for simd // OK
11600 for (int i = 0; i < 10; ++i)
11602 #pragma omp sections // OK
11604 bar();
11609 #pragma omp sections
11611 #pragma omp section
11613 #pragma omp parallel for
11614 for (int i = 0; i < 10; ++i)
11618 #pragma omp sections
11620 #pragma omp section
11622 #pragma omp parallel for simd
11623 for (int i = 0; i < 10; ++i)
11627 #pragma omp sections
11629 #pragma omp section
11631 #pragma omp parallel sections
11633 bar();
11637 #pragma omp sections
11639 #pragma omp section
11641 #pragma omp task
11643 bar();
11647 #pragma omp sections
11649 #pragma omp section
11651 #pragma omp taskyield
11652 bar();
11655 #pragma omp sections
11657 #pragma omp section
11659 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'section' region}}
11660 bar();
11663 #pragma omp sections
11665 #pragma omp section
11667 #pragma omp scan // expected-error {{region cannot be closely nested inside 'section' region}}
11668 bar();
11671 #pragma omp sections
11673 #pragma omp section
11675 #pragma omp taskwait
11676 bar();
11679 #pragma omp sections
11681 #pragma omp section
11683 #pragma omp flush
11684 bar();
11687 #pragma omp sections
11689 #pragma omp section
11691 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
11692 bar();
11695 #pragma omp sections
11697 #pragma omp section
11699 #pragma omp atomic
11700 ++a;
11703 #pragma omp sections
11705 #pragma omp section
11707 #pragma omp target
11708 ++a;
11711 #pragma omp sections
11713 #pragma omp section
11715 #pragma omp target parallel
11716 ++a;
11719 #pragma omp sections
11721 #pragma omp section
11723 #pragma omp target parallel for
11724 for (int i = 0; i < 10; ++i)
11728 #pragma omp sections
11730 #pragma omp section
11732 #pragma omp target enter data map(to: a)
11733 ++a;
11736 #pragma omp sections
11738 #pragma omp section
11740 #pragma omp target exit data map(from: a)
11741 ++a;
11744 #pragma omp sections
11746 #pragma omp section
11748 #pragma omp teams // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
11749 ++a;
11752 #pragma omp sections
11754 #pragma omp section
11756 #pragma omp taskloop
11757 for (int i = 0; i < 10; ++i)
11758 ++a;
11761 #pragma omp sections
11763 #pragma omp section
11764 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
11765 for (int i = 0; i < 10; ++i)
11768 #pragma omp sections
11770 #pragma omp section
11772 #pragma omp target update to(a)
11773 a++;
11776 #pragma omp sections
11778 #pragma omp section
11779 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
11780 for (int i = 0; i < 10; ++i)
11783 #pragma omp sections
11785 #pragma omp section
11786 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
11787 for (int i = 0; i < 10; ++i)
11790 #pragma omp sections
11792 #pragma omp section
11793 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
11794 for (int i = 0; i < 10; ++i)
11797 #pragma omp sections
11799 #pragma omp section
11800 #pragma omp target simd // OK
11801 for (int i = 0; i < 10; ++i)
11804 #pragma omp sections
11806 #pragma omp section
11807 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
11808 for (int i = 0; i < 10; ++i)
11811 #pragma omp sections
11813 #pragma omp section
11814 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
11815 for (int i = 0; i < 10; ++i)
11818 #pragma omp sections
11820 #pragma omp section
11821 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
11822 for (int i = 0; i < 10; ++i)
11825 #pragma omp sections
11827 #pragma omp section
11828 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
11829 for (int i = 0; i < 10; ++i)
11832 #pragma omp sections
11834 #pragma omp section
11835 #pragma omp target teams // OK
11836 a++;
11838 #pragma omp sections
11840 #pragma omp section
11841 #pragma omp target teams distribute // OK
11842 for (int i = 0; i < 10; ++i)
11845 #pragma omp sections
11847 #pragma omp section
11848 #pragma omp target teams distribute parallel for // OK
11849 for (int i = 0; i < 10; ++i)
11852 #pragma omp sections
11854 #pragma omp section
11855 #pragma omp target teams distribute parallel for simd // OK
11856 for (int i = 0; i < 10; ++i)
11859 #pragma omp sections
11861 #pragma omp section
11862 #pragma omp target teams distribute simd // OK
11863 for (int i = 0; i < 10; ++i)
11867 // SINGLE DIRECTIVE
11868 #pragma omp single
11870 #pragma omp for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
11871 for (int i = 0; i < 10; ++i)
11874 #pragma omp single
11876 #pragma omp simd
11877 for (int i = 0; i < 10; ++i)
11880 #pragma omp single
11882 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
11883 for (int i = 0; i < 10; ++i)
11886 #pragma omp single
11888 #pragma omp parallel
11889 for (int i = 0; i < 10; ++i)
11892 #pragma omp single
11894 #pragma omp single // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
11896 bar();
11898 #pragma omp master // expected-error {{region cannot be closely nested inside 'single' region}}
11899 bar();
11900 #pragma omp critical
11901 bar();
11903 #pragma omp single
11905 #pragma omp sections // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
11907 bar();
11910 #pragma omp single
11912 #pragma omp parallel
11914 #pragma omp single // OK
11916 bar();
11918 #pragma omp for // OK
11919 for (int i = 0; i < 10; ++i)
11921 #pragma omp for simd // OK
11922 for (int i = 0; i < 10; ++i)
11924 #pragma omp sections // OK
11926 bar();
11930 #pragma omp single
11932 #pragma omp parallel for
11933 for (int i = 0; i < 10; ++i)
11936 #pragma omp single
11938 #pragma omp parallel for simd
11939 for (int i = 0; i < 10; ++i)
11942 #pragma omp single
11944 #pragma omp parallel sections
11946 bar();
11949 #pragma omp single
11951 #pragma omp task
11953 bar();
11956 #pragma omp single
11958 #pragma omp taskyield
11959 bar();
11961 #pragma omp single
11963 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'single' region}}
11964 bar();
11966 #pragma omp single
11968 #pragma omp scan // expected-error {{region cannot be closely nested inside 'single' region}}
11969 bar();
11971 #pragma omp single
11973 #pragma omp taskwait
11974 bar();
11976 #pragma omp single
11978 #pragma omp flush
11979 bar();
11981 #pragma omp single
11983 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
11984 bar();
11986 #pragma omp single
11988 #pragma omp atomic
11989 ++a;
11991 #pragma omp single
11993 #pragma omp target
11994 ++a;
11996 #pragma omp single
11998 #pragma omp target parallel
11999 ++a;
12001 #pragma omp single
12003 #pragma omp target parallel for
12004 for (int i = 0; i < 10; ++i)
12007 #pragma omp single
12009 #pragma omp target enter data map(to: a)
12010 ++a;
12012 #pragma omp single
12014 #pragma omp target exit data map(from: a)
12015 ++a;
12017 #pragma omp single
12019 #pragma omp teams // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
12020 ++a;
12022 #pragma omp single
12024 #pragma omp taskloop
12025 for (int i = 0; i < 10; ++i)
12026 ++a;
12028 #pragma omp single
12030 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
12031 for (int i = 0; i < 10; ++i)
12034 #pragma omp single
12036 #pragma omp target update to(a)
12037 a++;
12039 #pragma omp single
12041 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
12042 for (int i = 0; i < 10; ++i)
12045 #pragma omp single
12047 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
12048 for (int i = 0; i < 10; ++i)
12051 #pragma omp single
12053 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
12054 for (int i = 0; i < 10; ++i)
12057 #pragma omp single
12059 #pragma omp target simd // OK
12060 for (int i = 0; i < 10; ++i)
12063 #pragma omp single
12065 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
12066 for (int i = 0; i < 10; ++i)
12069 #pragma omp single
12071 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
12072 for (int i = 0; i < 10; ++i)
12075 #pragma omp single
12077 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
12078 for (int i = 0; i < 10; ++i)
12081 #pragma omp single
12083 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
12084 for (int i = 0; i < 10; ++i)
12087 #pragma omp single
12089 #pragma omp target teams // oK
12090 a++;
12092 #pragma omp single
12094 #pragma omp target teams distribute // OK
12095 for (int i = 0; i < 10; ++i)
12098 #pragma omp single
12100 #pragma omp target teams distribute parallel for // OK
12101 for (int i = 0; i < 10; ++i)
12104 #pragma omp single
12106 #pragma omp target teams distribute parallel for simd // OK
12107 for (int i = 0; i < 10; ++i)
12110 #pragma omp single
12112 #pragma omp target teams distribute simd // OK
12113 for (int i = 0; i < 10; ++i)
12117 // MASTER DIRECTIVE
12118 #pragma omp master
12120 #pragma omp for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
12121 for (int i = 0; i < 10; ++i)
12124 #pragma omp master
12126 #pragma omp simd
12127 for (int i = 0; i < 10; ++i)
12130 #pragma omp master
12132 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
12133 for (int i = 0; i < 10; ++i)
12136 #pragma omp master
12138 #pragma omp parallel
12139 for (int i = 0; i < 10; ++i)
12142 #pragma omp parallel master
12144 for (int i = 0; i < 10; ++i)
12147 #pragma omp master
12149 #pragma omp single // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
12151 bar();
12154 #pragma omp master
12156 #pragma omp master // OK, though second 'master' is redundant
12158 bar();
12161 #pragma omp master
12163 #pragma omp critical
12165 bar();
12168 #pragma omp master
12170 #pragma omp sections // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
12172 bar();
12175 #pragma omp master
12177 #pragma omp parallel
12179 #pragma omp master // OK
12181 bar();
12183 #pragma omp for // OK
12184 for (int i = 0; i < 10; ++i)
12186 #pragma omp for simd // OK
12187 for (int i = 0; i < 10; ++i)
12189 #pragma omp sections // OK
12191 bar();
12195 #pragma omp master
12197 #pragma omp parallel master
12199 bar();
12202 #pragma omp master
12204 #pragma omp parallel for
12205 for (int i = 0; i < 10; ++i)
12208 #pragma omp master
12210 #pragma omp parallel for simd
12211 for (int i = 0; i < 10; ++i)
12214 #pragma omp master
12216 #pragma omp parallel sections
12218 bar();
12221 #pragma omp master
12223 #pragma omp task
12225 bar();
12228 #pragma omp master
12230 #pragma omp taskyield
12231 bar();
12233 #pragma omp master
12235 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'master' region}}
12236 bar();
12238 #pragma omp master
12240 #pragma omp scan // expected-error {{region cannot be closely nested inside 'master' region}}
12241 bar();
12243 #pragma omp master
12245 #pragma omp taskwait
12246 bar();
12248 #pragma omp master
12250 #pragma omp flush
12251 bar();
12253 #pragma omp master
12255 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
12256 bar();
12258 #pragma omp master
12260 #pragma omp atomic
12261 ++a;
12263 #pragma omp master
12265 #pragma omp target
12266 ++a;
12268 #pragma omp master
12270 #pragma omp target parallel
12271 ++a;
12273 #pragma omp master
12275 #pragma omp target parallel for
12276 for (int i = 0; i < 10; ++i)
12279 #pragma omp master
12281 #pragma omp target enter data map(to: a)
12282 ++a;
12284 #pragma omp master
12286 #pragma omp target exit data map(from: a)
12287 ++a;
12289 #pragma omp master
12291 #pragma omp teams // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
12292 ++a;
12294 #pragma omp master
12296 #pragma omp taskloop
12297 for (int i = 0; i < 10; ++i)
12298 ++a;
12300 #pragma omp master
12302 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
12303 for (int i = 0; i < 10; ++i)
12306 #pragma omp master
12308 #pragma omp target update to(a)
12309 ++a;
12311 #pragma omp master
12313 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
12314 for (int i = 0; i < 10; ++i)
12317 #pragma omp master
12319 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
12320 for (int i = 0; i < 10; ++i)
12323 #pragma omp master
12325 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
12326 for (int i = 0; i < 10; ++i)
12329 #pragma omp master
12331 #pragma omp target simd // OK
12332 for (int i = 0; i < 10; ++i)
12335 #pragma omp master
12337 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
12338 for (int i = 0; i < 10; ++i)
12341 #pragma omp master
12343 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
12344 for (int i = 0; i < 10; ++i)
12347 #pragma omp master
12349 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
12350 for (int i = 0; i < 10; ++i)
12353 #pragma omp master
12355 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
12356 for (int i = 0; i < 10; ++i)
12359 #pragma omp master
12361 #pragma omp target teams // OK
12362 a++;
12364 #pragma omp master
12366 #pragma omp target teams distribute // OK
12367 for (int i = 0; i < 10; ++i)
12370 #pragma omp master
12372 #pragma omp target teams distribute parallel for // OK
12373 for (int i = 0; i < 10; ++i)
12376 #pragma omp master
12378 #pragma omp target teams distribute parallel for simd // OK
12379 for (int i = 0; i < 10; ++i)
12382 #pragma omp master
12384 #pragma omp target teams distribute simd // OK
12385 for (int i = 0; i < 10; ++i)
12389 // CRITICAL DIRECTIVE
12390 #pragma omp critical
12392 #pragma omp for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
12393 for (int i = 0; i < 10; ++i)
12396 #pragma omp critical
12398 #pragma omp simd
12399 for (int i = 0; i < 10; ++i)
12402 #pragma omp critical
12404 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
12405 for (int i = 0; i < 10; ++i)
12408 #pragma omp critical
12410 #pragma omp parallel
12411 for (int i = 0; i < 10; ++i)
12414 #pragma omp critical
12416 #pragma omp single // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
12418 bar();
12421 #pragma omp critical
12423 #pragma omp master // OK, though second 'master' is redundant
12425 bar();
12428 #pragma omp critical
12430 #pragma omp critical
12432 bar();
12435 #pragma omp critical
12437 #pragma omp sections // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
12439 bar();
12442 #pragma omp critical
12444 #pragma omp parallel
12446 #pragma omp master // OK
12448 bar();
12450 #pragma omp for // OK
12451 for (int i = 0; i < 10; ++i)
12453 #pragma omp for simd // OK
12454 for (int i = 0; i < 10; ++i)
12456 #pragma omp sections // OK
12458 bar();
12462 #pragma omp critical
12464 #pragma omp parallel for
12465 for (int i = 0; i < 10; ++i)
12468 #pragma omp critical
12470 #pragma omp parallel for simd
12471 for (int i = 0; i < 10; ++i)
12474 #pragma omp critical
12476 #pragma omp parallel sections
12478 bar();
12481 #pragma omp critical
12483 #pragma omp task
12485 bar();
12488 #pragma omp critical
12490 #pragma omp taskyield
12491 bar();
12493 #pragma omp critical
12495 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'critical' region}}
12496 bar();
12498 #pragma omp critical
12500 #pragma omp scan // expected-error {{region cannot be closely nested inside 'critical' region}}
12501 bar();
12503 #pragma omp critical
12505 #pragma omp taskwait
12506 bar();
12508 #pragma omp critical(Belka)
12510 #pragma omp critical(Strelka)
12511 bar();
12513 #pragma omp critical(Tuzik) // expected-note {{previous 'critical' region starts here}}
12515 #pragma omp critical(grelka) // expected-note {{previous 'critical' region starts here}}
12517 #pragma omp critical(Tuzik) // expected-error {{cannot nest 'critical' regions having the same name 'Tuzik'}}
12519 #pragma omp parallel
12520 #pragma omp critical(grelka) // expected-error {{cannot nest 'critical' regions having the same name 'grelka'}}
12522 bar();
12527 #pragma omp critical
12529 #pragma omp flush
12530 bar();
12532 #pragma omp critical
12534 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
12535 bar();
12537 #pragma omp critical
12539 #pragma omp atomic
12540 ++a;
12542 #pragma omp critical
12544 #pragma omp target
12545 ++a;
12547 #pragma omp critical
12549 #pragma omp target parallel
12550 ++a;
12552 #pragma omp critical
12554 #pragma omp target parallel for
12555 for (int i = 0; i < 10; ++i)
12558 #pragma omp critical
12560 #pragma omp target enter data map(to: a)
12561 ++a;
12563 #pragma omp critical
12565 #pragma omp target exit data map(from: a)
12566 ++a;
12568 #pragma omp critical
12570 #pragma omp teams // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
12571 ++a;
12573 #pragma omp critical
12575 #pragma omp taskloop
12576 for (int i = 0; i < 10; ++i)
12577 ++a;
12579 #pragma omp critical
12581 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
12582 for (int i = 0; i < 10; ++i)
12585 #pragma omp critical
12587 #pragma omp target update to(a)
12588 a++;
12590 #pragma omp critical
12592 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
12593 for (int i = 0; i < 10; ++i)
12596 #pragma omp critical
12598 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
12599 for (int i = 0; i < 10; ++i)
12602 #pragma omp critical
12604 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
12605 for (int i = 0; i < 10; ++i)
12608 #pragma omp critical
12610 #pragma omp target simd // OK
12611 for (int i = 0; i < 10; ++i)
12614 #pragma omp critical
12616 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
12617 for (int i = 0; i < 10; ++i)
12620 #pragma omp critical
12622 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
12623 for (int i = 0; i < 10; ++i)
12626 #pragma omp critical
12628 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
12629 for (int i = 0; i < 10; ++i)
12632 #pragma omp critical
12634 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
12635 for (int i = 0; i < 10; ++i)
12638 #pragma omp critical
12640 #pragma omp target teams // OK
12641 a++;
12643 #pragma omp critical
12645 #pragma omp target teams distribute // OK
12646 for (int i = 0; i < 10; ++i)
12649 #pragma omp critical
12651 #pragma omp target teams distribute parallel for // OK
12652 for (int i = 0; i < 10; ++i)
12655 #pragma omp critical
12657 #pragma omp target teams distribute parallel for simd // OK
12658 for (int i = 0; i < 10; ++i)
12661 #pragma omp critical
12663 #pragma omp target teams distribute simd // OK
12664 for (int i = 0; i < 10; ++i)
12668 // PARALLEL FOR DIRECTIVE
12669 #pragma omp parallel for
12670 for (int i = 0; i < 10; ++i) {
12671 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
12672 for (int i = 0; i < 10; ++i)
12675 #pragma omp parallel for
12676 for (int i = 0; i < 10; ++i) {
12677 #pragma omp simd
12678 for (int i = 0; i < 10; ++i)
12681 #pragma omp parallel for
12682 for (int i = 0; i < 10; ++i) {
12683 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
12684 for (int i = 0; i < 10; ++i)
12688 #pragma omp parallel for
12689 for (int i = 0; i < 10; ++i) {
12690 #pragma omp parallel
12691 for (int i = 0; i < 10; ++i)
12694 #pragma omp parallel for
12695 for (int i = 0; i < 10; ++i) {
12696 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
12698 bar();
12701 #pragma omp parallel for
12702 for (int i = 0; i < 10; ++i) {
12703 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel for region}}
12705 bar();
12708 #pragma omp parallel for
12709 for (int i = 0; i < 10; ++i) {
12710 #pragma omp single // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
12712 bar();
12714 #pragma omp master // expected-error {{region cannot be closely nested inside 'parallel for' region}}
12716 bar();
12718 #pragma omp critical
12720 bar();
12723 #pragma omp parallel for
12724 for (int i = 0; i < 10; ++i) {
12725 #pragma omp parallel
12727 #pragma omp single // OK
12729 bar();
12731 #pragma omp master // OK
12733 bar();
12735 #pragma omp critical // OK
12737 bar();
12739 #pragma omp for // OK
12740 for (int i = 0; i < 10; ++i)
12742 #pragma omp for simd // OK
12743 for (int i = 0; i < 10; ++i)
12745 #pragma omp sections // OK
12747 bar();
12751 #pragma omp parallel for
12752 for (int i = 0; i < 10; ++i) {
12753 #pragma omp parallel for
12754 for (int i = 0; i < 10; ++i)
12757 #pragma omp parallel for
12758 for (int i = 0; i < 10; ++i) {
12759 #pragma omp parallel for simd
12760 for (int i = 0; i < 10; ++i)
12763 #pragma omp parallel for
12764 for (int i = 0; i < 10; ++i) {
12765 #pragma omp parallel sections
12767 bar();
12770 #pragma omp parallel for
12771 for (int i = 0; i < 10; ++i) {
12772 #pragma omp task
12774 bar();
12777 #pragma omp parallel for
12778 for (int i = 0; i < 10; ++i) {
12779 #pragma omp taskyield
12780 bar();
12782 #pragma omp parallel for
12783 for (int i = 0; i < 10; ++i) {
12784 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel for' region}}
12785 bar();
12787 #pragma omp parallel for
12788 for (int i = 0; i < 10; ++i) {
12789 #pragma omp scan // omp45-error {{region cannot be closely nested inside 'parallel for' region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
12790 bar();
12792 #pragma omp parallel for
12793 for (int i = 0; i < 10; ++i) {
12794 #pragma omp taskwait
12795 bar();
12797 #pragma omp parallel for
12798 for (int i = 0; i < 10; ++i) {
12799 #pragma omp flush
12800 bar();
12802 #pragma omp parallel for
12803 for (int i = 0; i < 10; ++i) {
12804 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
12805 bar();
12807 #pragma omp parallel for ordered
12808 for (int i = 0; i < 10; ++i) {
12809 #pragma omp ordered // OK
12810 bar();
12812 #pragma omp parallel for
12813 for (int i = 0; i < 10; ++i) {
12814 #pragma omp atomic
12815 ++a;
12817 #pragma omp parallel for
12818 for (int i = 0; i < 10; ++i) {
12819 #pragma omp target
12820 ++a;
12822 #pragma omp parallel for
12823 for (int i = 0; i < 10; ++i) {
12824 #pragma omp target parallel
12825 ++a;
12827 #pragma omp parallel for
12828 for (int i = 0; i < 10; ++i) {
12829 #pragma omp target parallel for
12830 for (int i = 0; i < 10; ++i)
12833 #pragma omp parallel for
12834 for (int i = 0; i < 10; ++i) {
12835 #pragma omp target enter data map(to: a)
12836 ++a;
12838 #pragma omp parallel for
12839 for (int i = 0; i < 10; ++i) {
12840 #pragma omp target exit data map(from: a)
12841 ++a;
12843 #pragma omp parallel for
12844 for (int i = 0; i < 10; ++i) {
12845 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
12846 ++a;
12848 #pragma omp parallel for
12849 for (int i = 0; i < 10; ++i) {
12850 #pragma omp taskloop
12851 for (int i = 0; i < 10; ++i)
12852 ++a;
12854 #pragma omp parallel for
12855 for (int i = 0; i < 10; ++i) {
12856 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
12857 for (int j = 0; j < 10; ++j)
12860 #pragma omp parallel for
12861 for (int i = 0; i < 10; ++i) {
12862 #pragma omp target update to(a)
12863 a++;
12865 #pragma omp parallel for
12866 for (int i = 0; i < 10; ++i) {
12867 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
12868 for (int j = 0; j < 10; ++j)
12871 #pragma omp parallel for
12872 for (int i = 0; i < 10; ++i) {
12873 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
12874 for (int j = 0; j < 10; ++j)
12877 #pragma omp parallel for
12878 for (int i = 0; i < 10; ++i) {
12879 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
12880 for (int j = 0; j < 10; ++j)
12883 #pragma omp parallel for
12884 for (int i = 0; i < 10; ++i) {
12885 #pragma omp target simd // OK
12886 for (int j = 0; j < 10; ++j)
12889 #pragma omp parallel for
12890 for (int i = 0; i < 10; ++i) {
12891 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
12892 for (int j = 0; j < 10; ++j)
12895 #pragma omp parallel for
12896 for (int i = 0; i < 10; ++i) {
12897 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
12898 for (int j = 0; j < 10; ++j)
12901 #pragma omp parallel for
12902 for (int i = 0; i < 10; ++i) {
12903 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
12904 for (int j = 0; j < 10; ++j)
12907 #pragma omp parallel for
12908 for (int i = 0; i < 10; ++i) {
12909 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
12910 for (int j = 0; j < 10; ++j)
12913 #pragma omp parallel for
12914 for (int i = 0; i < 10; ++i) {
12915 #pragma omp target teams // OK
12916 a++;
12918 #pragma omp parallel for
12919 for (int i = 0; i < 10; ++i) {
12920 #pragma omp target teams distribute // OK
12921 for (int j = 0; j < 10; ++j)
12924 #pragma omp parallel for
12925 for (int i = 0; i < 10; ++i) {
12926 #pragma omp target teams distribute parallel for // OK
12927 for (int j = 0; j < 10; ++j)
12930 #pragma omp parallel for
12931 for (int i = 0; i < 10; ++i) {
12932 #pragma omp target teams distribute parallel for simd // OK
12933 for (int j = 0; j < 10; ++j)
12936 #pragma omp parallel for
12937 for (int i = 0; i < 10; ++i) {
12938 #pragma omp target teams distribute simd // OK
12939 for (int j = 0; j < 10; ++j)
12943 // PARALLEL FOR SIMD DIRECTIVE
12944 #pragma omp parallel for simd
12945 for (int i = 0; i < 10; ++i) {
12946 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12947 for (int i = 0; i < 10; ++i)
12950 #pragma omp parallel for simd
12951 for (int i = 0; i < 10; ++i) {
12952 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
12953 for (int i = 0; i < 10; ++i)
12956 #pragma omp parallel for simd
12957 for (int i = 0; i < 10; ++i) {
12958 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12959 for (int i = 0; i < 10; ++i)
12962 #pragma omp parallel for simd
12963 for (int i = 0; i < 10; ++i) {
12964 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12965 for (int i = 0; i < 10; ++i)
12968 #pragma omp parallel for simd
12969 for (int i = 0; i < 10; ++i) {
12970 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12972 bar();
12975 #pragma omp parallel for simd
12976 for (int i = 0; i < 10; ++i) {
12977 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12979 bar();
12982 #pragma omp parallel for simd
12983 for (int i = 0; i < 10; ++i) {
12984 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12986 bar();
12990 #pragma omp parallel for simd
12991 for (int i = 0; i < 10; ++i) {
12992 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
12994 bar();
12998 #pragma omp parallel for simd
12999 for (int i = 0; i < 10; ++i) {
13000 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13002 bar();
13006 #pragma omp parallel for simd
13007 for (int i = 0; i < 10; ++i) {
13008 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13010 #pragma omp single
13012 bar();
13014 #pragma omp for
13015 for (int i = 0; i < 10; ++i)
13017 #pragma omp for simd
13018 for (int i = 0; i < 10; ++i)
13020 #pragma omp sections
13022 bar();
13026 #pragma omp parallel for simd
13027 for (int i = 0; i < 10; ++i) {
13028 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13029 for (int i = 0; i < 10; ++i)
13032 #pragma omp parallel for simd
13033 for (int i = 0; i < 10; ++i) {
13034 #pragma omp parallel for simd// expected-error {{OpenMP constructs may not be nested inside a simd region}}
13035 for (int i = 0; i < 10; ++i)
13038 #pragma omp parallel for simd
13039 for (int i = 0; i < 10; ++i) {
13040 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13042 bar();
13045 #pragma omp parallel for simd
13046 for (int i = 0; i < 10; ++i) {
13047 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13049 bar();
13052 #pragma omp parallel for simd
13053 for (int i = 0; i < 10; ++i) {
13054 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13055 bar();
13057 #pragma omp parallel for simd
13058 for (int i = 0; i < 10; ++i) {
13059 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13060 bar();
13062 #pragma omp parallel for simd
13063 for (int i = 0; i < 10; ++i) {
13064 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}} omp51-error {{exactly one of 'inclusive' or 'exclusive' clauses is expected}}
13065 bar();
13067 #pragma omp parallel for simd
13068 for (int i = 0; i < 10; ++i) {
13069 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13070 bar();
13072 #pragma omp parallel for simd
13073 for (int i = 0; i < 10; ++i) {
13074 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13075 bar();
13077 #pragma omp parallel for simd
13078 for (int i = 0; i < 10; ++i) {
13079 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13080 bar();
13082 #pragma omp parallel for simd
13083 for (int i = 0; i < 10; ++i) {
13084 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13085 bar();
13087 #pragma omp parallel for simd
13088 for (int i = 0; i < 10; ++i) {
13089 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
13090 ++a;
13092 #pragma omp parallel for simd
13093 for (int i = 0; i < 10; ++i) {
13094 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13095 ++a;
13097 #pragma omp parallel for simd
13098 for (int i = 0; i < 10; ++i) {
13099 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13100 ++a;
13102 #pragma omp parallel for simd
13103 for (int i = 0; i < 10; ++i) {
13104 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13105 for (int i = 0; i < 10; ++i)
13108 #pragma omp parallel for simd
13109 for (int i = 0; i < 10; ++i) {
13110 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13111 ++a;
13113 #pragma omp parallel for simd
13114 for (int i = 0; i < 10; ++i) {
13115 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13116 ++a;
13118 #pragma omp parallel for simd
13119 for (int i = 0; i < 10; ++i) {
13120 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13121 ++a;
13123 #pragma omp parallel for simd
13124 for (int i = 0; i < 10; ++i) {
13125 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13126 for (int i = 0; i < 10; ++i)
13127 ++a;
13129 #pragma omp parallel for simd
13130 for (int i = 0; i < 10; ++i) {
13131 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13132 for (int j = 0; j < 10; ++j)
13135 #pragma omp parallel for simd
13136 for (int i = 0; i < 10; ++i) {
13137 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13138 a++;
13140 #pragma omp parallel for simd
13141 for (int i = 0; i < 10; ++i) {
13142 #pragma omp distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13143 for (int j = 0; j < 10; ++j)
13146 #pragma omp parallel for simd
13147 for (int i = 0; i < 10; ++i) {
13148 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13149 for (int j = 0; j < 10; ++j)
13152 #pragma omp parallel for simd
13153 for (int i = 0; i < 10; ++i) {
13154 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13155 for (int j = 0; j < 10; ++j)
13158 #pragma omp parallel for simd
13159 for (int i = 0; i < 10; ++i) {
13160 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13161 for (int j = 0; j < 10; ++j)
13164 #pragma omp parallel for simd
13165 for (int i = 0; i < 10; ++i) {
13166 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13167 for (int j = 0; j < 10; ++j)
13170 #pragma omp parallel for simd
13171 for (int i = 0; i < 10; ++i) {
13172 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13173 for (int j = 0; j < 10; ++j)
13176 #pragma omp parallel for simd
13177 for (int i = 0; i < 10; ++i) {
13178 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13179 for (int j = 0; j < 10; ++j)
13182 #pragma omp parallel for simd
13183 for (int i = 0; i < 10; ++i) {
13184 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13185 for (int j = 0; j < 10; ++j)
13188 #pragma omp parallel for simd
13189 for (int i = 0; i < 10; ++i) {
13190 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13191 a++;
13193 #pragma omp parallel for simd
13194 for (int i = 0; i < 10; ++i) {
13195 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13196 for (int j = 0; j < 10; ++j)
13199 #pragma omp parallel for simd
13200 for (int i = 0; i < 10; ++i) {
13201 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13202 for (int j = 0; j < 10; ++j)
13205 #pragma omp parallel for simd
13206 for (int i = 0; i < 10; ++i) {
13207 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13208 for (int j = 0; j < 10; ++j)
13211 #pragma omp parallel for simd
13212 for (int i = 0; i < 10; ++i) {
13213 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
13214 for (int j = 0; j < 10; ++j)
13218 // PARALLEL SECTIONS DIRECTIVE
13219 #pragma omp parallel sections
13221 #pragma omp for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
13222 for (int i = 0; i < 10; ++i)
13225 #pragma omp parallel sections
13227 #pragma omp simd
13228 for (int i = 0; i < 10; ++i)
13231 #pragma omp parallel sections
13233 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
13234 for (int i = 0; i < 10; ++i)
13237 #pragma omp parallel sections
13239 #pragma omp parallel
13240 for (int i = 0; i < 10; ++i)
13243 #pragma omp parallel sections
13245 #pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
13247 bar();
13250 #pragma omp parallel sections
13252 #pragma omp section
13254 bar();
13257 #pragma omp parallel sections
13259 #pragma omp section
13261 #pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
13262 bar();
13263 #pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
13264 bar();
13265 #pragma omp critical
13266 bar();
13269 #pragma omp parallel sections
13271 #pragma omp parallel
13273 #pragma omp single // OK
13275 bar();
13277 #pragma omp master // OK
13279 bar();
13281 #pragma omp critical // OK
13283 bar();
13285 #pragma omp for // OK
13286 for (int i = 0; i < 10; ++i)
13288 #pragma omp for simd // OK
13289 for (int i = 0; i < 10; ++i)
13291 #pragma omp sections // OK
13293 bar();
13297 #pragma omp parallel sections
13299 #pragma omp parallel for
13300 for (int i = 0; i < 10; ++i)
13303 #pragma omp parallel sections
13305 #pragma omp parallel for simd
13306 for (int i = 0; i < 10; ++i)
13309 #pragma omp parallel sections
13311 #pragma omp parallel sections
13313 bar();
13316 #pragma omp parallel sections
13318 #pragma omp task
13320 bar();
13323 #pragma omp parallel sections
13325 #pragma omp taskyield
13327 #pragma omp parallel sections
13329 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
13331 #pragma omp parallel sections
13333 #pragma omp scan // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
13335 #pragma omp parallel sections
13337 #pragma omp taskwait
13339 #pragma omp parallel sections
13341 #pragma omp flush
13343 #pragma omp parallel sections
13345 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
13346 bar();
13348 #pragma omp parallel sections
13350 #pragma omp atomic
13351 ++a;
13353 #pragma omp parallel sections
13355 #pragma omp target
13356 ++a;
13358 #pragma omp parallel sections
13360 #pragma omp target parallel
13361 ++a;
13363 #pragma omp parallel sections
13365 #pragma omp target parallel for
13366 for (int i = 0; i < 10; ++i)
13369 #pragma omp parallel sections
13371 #pragma omp target enter data map(to: a)
13373 #pragma omp parallel sections
13375 #pragma omp target exit data map(from: a)
13377 #pragma omp parallel sections
13379 #pragma omp teams // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
13380 ++a;
13382 #pragma omp parallel sections
13384 #pragma omp taskloop
13385 for (int i = 0; i < 10; ++i)
13386 ++a;
13388 #pragma omp parallel sections
13390 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
13391 for (int i = 0; i < 10; ++i)
13394 #pragma omp parallel sections
13396 #pragma omp target update to(a)
13398 #pragma omp parallel sections
13400 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
13401 for (int i = 0; i < 10; ++i)
13404 #pragma omp parallel sections
13406 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
13407 for (int i = 0; i < 10; ++i)
13410 #pragma omp parallel sections
13412 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
13413 for (int i = 0; i < 10; ++i)
13416 #pragma omp parallel sections
13418 #pragma omp target simd // OK
13419 for (int i = 0; i < 10; ++i)
13422 #pragma omp parallel sections
13424 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
13425 for (int i = 0; i < 10; ++i)
13428 #pragma omp parallel sections
13430 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
13431 for (int i = 0; i < 10; ++i)
13434 #pragma omp parallel sections
13436 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
13437 for (int i = 0; i < 10; ++i)
13440 #pragma omp parallel sections
13442 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
13443 for (int i = 0; i < 10; ++i)
13446 #pragma omp parallel sections
13448 #pragma omp target teams // OK
13449 a++;
13451 #pragma omp parallel sections
13453 #pragma omp target teams distribute // OK
13454 for (int i = 0; i < 10; ++i)
13457 #pragma omp parallel sections
13459 #pragma omp target teams distribute parallel for // OK
13460 for (int i = 0; i < 10; ++i)
13463 #pragma omp parallel sections
13465 #pragma omp target teams distribute parallel for simd // OK
13466 for (int i = 0; i < 10; ++i)
13469 #pragma omp parallel sections
13471 #pragma omp target teams distribute simd // OK
13472 for (int i = 0; i < 10; ++i)
13476 // TASK DIRECTIVE
13477 #pragma omp task
13478 #pragma omp for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
13479 for (int i = 0; i < 10; ++i)
13481 #pragma omp task
13482 #pragma omp simd
13483 for (int i = 0; i < 10; ++i)
13485 #pragma omp task
13486 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
13487 for (int i = 0; i < 10; ++i)
13489 #pragma omp task
13490 #pragma omp sections // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
13492 bar();
13494 #pragma omp task
13495 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a task region}}
13497 bar();
13499 #pragma omp task
13500 #pragma omp single // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
13501 bar();
13502 #pragma omp task
13503 #pragma omp master // expected-error {{region cannot be closely nested inside 'task' region}}
13504 bar();
13505 #pragma omp task
13506 #pragma omp critical
13507 bar();
13508 #pragma omp task
13509 #pragma omp parallel for
13510 for (int i = 0; i < 10; ++i)
13512 #pragma omp task
13513 #pragma omp parallel for simd
13514 for (int i = 0; i < 10; ++i)
13516 #pragma omp task
13517 #pragma omp parallel sections
13519 bar();
13521 #pragma omp task
13522 #pragma omp task
13524 bar();
13526 #pragma omp task
13528 #pragma omp taskyield
13529 bar();
13531 #pragma omp task
13533 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'task' region}}
13534 bar();
13536 #pragma omp task
13538 #pragma omp scan // expected-error {{region cannot be closely nested inside 'task' region}}
13539 bar();
13541 #pragma omp task
13543 #pragma omp taskwait
13544 bar();
13546 #pragma omp task
13548 #pragma omp flush
13549 bar();
13551 #pragma omp task
13553 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
13554 bar();
13556 #pragma omp task
13558 #pragma omp atomic
13559 ++a;
13561 #pragma omp task
13563 #pragma omp target
13564 ++a;
13566 #pragma omp task
13568 #pragma omp target parallel
13569 ++a;
13571 #pragma omp task
13572 #pragma omp target parallel for
13573 for (int i = 0; i < 10; ++i)
13575 #pragma omp task
13577 #pragma omp target enter data map(to: a)
13578 ++a;
13580 #pragma omp task
13582 #pragma omp target exit data map(from: a)
13583 ++a;
13585 #pragma omp task
13587 #pragma omp teams // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
13588 ++a;
13590 #pragma omp task
13592 #pragma omp taskloop
13593 for (int i = 0; i < 10; ++i)
13594 ++a;
13596 #pragma omp task
13598 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
13599 for (int i = 0; i < 10; ++i)
13602 #pragma omp task
13604 #pragma omp target update to(a)
13605 a++;
13607 #pragma omp task
13609 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
13610 for (int i = 0; i < 10; ++i)
13613 #pragma omp task
13615 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
13616 for (int i = 0; i < 10; ++i)
13619 #pragma omp task
13621 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
13622 for (int i = 0; i < 10; ++i)
13625 #pragma omp task
13627 #pragma omp target simd // OK
13628 for (int i = 0; i < 10; ++i)
13631 #pragma omp task
13633 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
13634 for (int i = 0; i < 10; ++i)
13637 #pragma omp task
13639 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
13640 for (int i = 0; i < 10; ++i)
13643 #pragma omp task
13645 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
13646 for (int i = 0; i < 10; ++i)
13649 #pragma omp task
13651 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
13652 for (int i = 0; i < 10; ++i)
13655 #pragma omp task
13657 #pragma omp target teams // OK
13658 a++;
13660 #pragma omp task
13662 #pragma omp target teams distribute // OK
13663 for (int i = 0; i < 10; ++i)
13666 #pragma omp task
13668 #pragma omp target teams distribute parallel for // OK
13669 for (int i = 0; i < 10; ++i)
13672 #pragma omp task
13674 #pragma omp target teams distribute parallel for simd // OK
13675 for (int i = 0; i < 10; ++i)
13678 #pragma omp task
13680 #pragma omp target teams distribute simd // OK
13681 for (int i = 0; i < 10; ++i)
13685 // ATOMIC DIRECTIVE
13686 #pragma omp atomic
13687 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13688 // expected-note@+1 {{expected an expression statement}}
13690 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13691 for (int i = 0; i < 10; ++i)
13694 #pragma omp atomic
13695 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13696 // expected-note@+1 {{expected an expression statement}}
13698 #pragma omp simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13699 for (int i = 0; i < 10; ++i)
13702 #pragma omp atomic
13703 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13704 // expected-note@+1 {{expected an expression statement}}
13706 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13707 for (int i = 0; i < 10; ++i)
13710 #pragma omp atomic
13711 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13712 // expected-note@+1 {{expected an expression statement}}
13714 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13715 for (int i = 0; i < 10; ++i)
13718 #pragma omp atomic
13719 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13720 // expected-note@+1 {{expected an expression statement}}
13722 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13724 bar();
13727 #pragma omp atomic
13728 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13729 // expected-note@+1 {{expected an expression statement}}
13731 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13733 bar();
13736 #pragma omp atomic
13737 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13738 // expected-note@+1 {{expected an expression statement}}
13740 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13742 bar();
13745 #pragma omp atomic
13746 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13747 // expected-note@+1 {{expected an expression statement}}
13749 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13751 bar();
13754 #pragma omp atomic
13755 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13756 // expected-note@+1 {{expected an expression statement}}
13758 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13760 bar();
13763 #pragma omp atomic
13764 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13765 // expected-note@+1 {{expected an expression statement}}
13767 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13768 for (int i = 0; i < 10; ++i)
13771 #pragma omp atomic
13772 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13773 // expected-note@+1 {{expected an expression statement}}
13775 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13776 for (int i = 0; i < 10; ++i)
13779 #pragma omp atomic
13780 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13781 // expected-note@+1 {{expected an expression statement}}
13783 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13785 bar();
13788 #pragma omp atomic
13789 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13790 // expected-note@+1 {{expected an expression statement}}
13792 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13794 bar();
13797 #pragma omp atomic
13798 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13799 // expected-note@+1 {{expected an expression statement}}
13801 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13802 bar();
13804 #pragma omp atomic
13805 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13806 // expected-note@+1 {{expected an expression statement}}
13808 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13809 bar();
13811 #pragma omp atomic
13812 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13813 // expected-note@+1 {{expected an expression statement}}
13815 #pragma omp scan // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13816 bar();
13818 #pragma omp atomic
13819 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13820 // expected-note@+1 {{expected an expression statement}}
13822 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13823 bar();
13825 #pragma omp atomic
13826 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13827 // expected-note@+1 {{expected an expression statement}}
13829 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13830 bar();
13832 #pragma omp atomic
13833 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13834 // expected-note@+1 {{expected an expression statement}}
13836 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13837 bar();
13839 #pragma omp atomic
13840 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13841 // expected-note@+1 {{expected an expression statement}}
13843 #pragma omp atomic // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13844 ++a;
13846 #pragma omp atomic
13847 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13848 // expected-note@+1 {{expected an expression statement}}
13850 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13851 ++a;
13853 #pragma omp atomic
13854 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13855 // expected-note@+1 {{expected an expression statement}}
13857 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13858 ++a;
13860 #pragma omp atomic
13861 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13862 // expected-note@+1 {{expected an expression statement}}
13864 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13865 for (int i = 0; i < 10; ++i)
13868 #pragma omp atomic
13869 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13870 // expected-note@+1 {{expected an expression statement}}
13872 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13873 ++a;
13875 #pragma omp atomic
13876 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13877 // expected-note@+1 {{expected an expression statement}}
13879 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13880 ++a;
13882 #pragma omp atomic
13883 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13884 // expected-note@+1 {{expected an expression statement}}
13886 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13887 ++a;
13889 #pragma omp atomic
13890 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13891 // expected-note@+1 {{expected an expression statement}}
13893 #pragma omp taskloop // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13894 for (int i = 0; i < 10; ++i)
13895 ++a;
13897 #pragma omp atomic
13898 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13899 // expected-note@+1 {{expected an expression statement}}
13901 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13902 for (int i = 0; i < 10; ++i)
13905 #pragma omp atomic
13906 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13907 // expected-note@+1 {{expected an expression statement}}
13909 #pragma omp target update // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13911 #pragma omp atomic
13912 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13913 // expected-note@+1 {{expected an expression statement}}
13915 #pragma omp distribute parallel for// expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13916 for (int i = 0; i < 10; ++i)
13919 #pragma omp atomic
13920 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13921 // expected-note@+1 {{expected an expression statement}}
13923 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13924 for (int i = 0; i < 10; ++i)
13927 #pragma omp atomic
13928 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13929 // expected-note@+1 {{expected an expression statement}}
13931 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13932 for (int i = 0; i < 10; ++i)
13935 #pragma omp atomic
13936 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13937 // expected-note@+1 {{expected an expression statement}}
13939 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13940 for (int i = 0; i < 10; ++i)
13943 #pragma omp atomic
13944 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13945 // expected-note@+1 {{expected an expression statement}}
13947 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13948 for (int i = 0; i < 10; ++i)
13951 #pragma omp atomic
13952 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13953 // expected-note@+1 {{expected an expression statement}}
13955 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13956 for (int i = 0; i < 10; ++i)
13959 #pragma omp atomic
13960 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13961 // expected-note@+1 {{expected an expression statement}}
13963 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13964 for (int i = 0; i < 10; ++i)
13967 #pragma omp atomic
13968 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13969 // expected-note@+1 {{expected an expression statement}}
13971 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13972 for (int i = 0; i < 10; ++i)
13975 #pragma omp atomic
13976 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13977 // expected-note@+1 {{expected an expression statement}}
13979 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13980 a++;
13982 #pragma omp atomic
13983 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13984 // expected-note@+1 {{expected an expression statement}}
13986 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13987 for (int i = 0; i < 10; ++i)
13990 #pragma omp atomic
13991 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
13992 // expected-note@+1 {{expected an expression statement}}
13994 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
13995 for (int i = 0; i < 10; ++i)
13998 #pragma omp atomic
13999 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
14000 // expected-note@+1 {{expected an expression statement}}
14002 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
14003 for (int i = 0; i < 10; ++i)
14006 #pragma omp atomic
14007 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
14008 // expected-note@+1 {{expected an expression statement}}
14010 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
14011 for (int i = 0; i < 10; ++i)
14015 // TARGET DIRECTIVE
14016 #pragma omp target
14017 #pragma omp parallel
14018 bar();
14019 #pragma omp target
14020 #pragma omp for
14021 for (int i = 0; i < 10; ++i)
14023 #pragma omp target
14024 #pragma omp simd
14025 for (int i = 0; i < 10; ++i)
14027 #pragma omp target
14028 #pragma omp for simd
14029 for (int i = 0; i < 10; ++i)
14031 #pragma omp target
14032 #pragma omp sections
14034 bar();
14036 #pragma omp target
14037 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target region}}
14039 bar();
14041 #pragma omp target
14042 #pragma omp single
14043 bar();
14045 #pragma omp target
14046 #pragma omp master
14048 bar();
14050 #pragma omp target
14051 #pragma omp critical
14053 bar();
14055 #pragma omp target
14056 #pragma omp parallel for
14057 for (int i = 0; i < 10; ++i)
14059 #pragma omp target
14060 #pragma omp parallel for simd
14061 for (int i = 0; i < 10; ++i)
14063 #pragma omp target
14064 #pragma omp parallel sections
14066 bar();
14068 #pragma omp target
14069 #pragma omp task
14071 bar();
14073 #pragma omp target
14075 #pragma omp taskyield
14076 bar();
14078 #pragma omp target
14080 #pragma omp barrier
14081 bar();
14083 #pragma omp target
14085 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
14086 bar();
14088 #pragma omp target
14090 #pragma omp taskwait
14091 bar();
14093 #pragma omp target
14095 #pragma omp flush
14096 bar();
14098 #pragma omp target
14100 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
14101 bar();
14103 #pragma omp target
14105 #pragma omp atomic
14106 ++a;
14108 #pragma omp target
14110 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
14111 ++a;
14113 #pragma omp target
14115 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
14116 ++a;
14118 #pragma omp target
14119 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
14120 for (int i = 0; i < 10; ++i)
14122 #pragma omp target
14124 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
14126 #pragma omp target
14128 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
14130 #pragma omp target
14132 #pragma omp teams
14133 ++a;
14135 #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}}
14137 #pragma omp teams // expected-note {{directive outside teams construct here}}
14138 ++a;
14139 #pragma omp teams // expected-note {{nested teams construct here}}
14140 ++a;
14142 #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}}
14144 ++a; // expected-note {{statement outside teams construct here}}
14145 #pragma omp teams // expected-note {{nested teams construct here}}
14146 ++a;
14148 #pragma omp target
14150 #pragma omp taskloop
14151 for (int i = 0; i < 10; ++i)
14152 ++a;
14154 #pragma omp target
14156 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
14157 for (int i = 0; i < 10; ++i)
14160 #pragma omp atomic
14161 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
14162 // expected-note@+1 {{expected an expression statement}}
14164 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
14165 a++;
14167 #pragma omp target
14169 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
14170 for (int i = 0; i < 10; ++i)
14173 #pragma omp target
14175 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
14176 for (int i = 0; i < 10; ++i)
14179 #pragma omp target
14181 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
14182 for (int i = 0; i < 10; ++i)
14185 #pragma omp target
14187 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
14188 for (int i = 0; i < 10; ++i)
14191 #pragma omp target
14193 #pragma omp teams distribute // OK
14194 for (int i = 0; i < 10; ++i)
14197 #pragma omp target
14199 #pragma omp teams distribute simd // OK
14200 for (int i = 0; i < 10; ++i)
14203 #pragma omp target
14205 #pragma omp teams distribute parallel for simd // OK
14206 for (int i = 0; i < 10; ++i)
14209 #pragma omp target
14211 #pragma omp teams distribute parallel for // OK
14212 for (int i = 0; i < 10; ++i)
14215 #pragma omp target
14217 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
14218 a++;
14220 #pragma omp target
14222 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
14223 for (int i = 0; i < 10; ++i)
14226 #pragma omp target
14228 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
14229 for (int i = 0; i < 10; ++i)
14232 #pragma omp target
14234 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
14235 for (int i = 0; i < 10; ++i)
14238 #pragma omp target
14240 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
14241 for (int i = 0; i < 10; ++i)
14245 // TARGET PARALLEL DIRECTIVE
14246 #pragma omp target parallel
14247 #pragma omp parallel
14248 bar();
14249 #pragma omp target parallel
14250 #pragma omp for
14251 for (int i = 0; i < 10; ++i)
14253 #pragma omp target parallel
14254 #pragma omp simd
14255 for (int i = 0; i < 10; ++i)
14257 #pragma omp target parallel
14258 #pragma omp for simd
14259 for (int i = 0; i < 10; ++i)
14261 #pragma omp target parallel
14262 #pragma omp sections
14264 bar();
14266 #pragma omp target parallel
14267 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target parallel region}}
14269 bar();
14271 #pragma omp target parallel
14272 #pragma omp single
14273 bar();
14275 #pragma omp target parallel
14276 #pragma omp master
14278 bar();
14280 #pragma omp target parallel
14281 #pragma omp critical
14283 bar();
14285 #pragma omp target parallel
14286 #pragma omp parallel for
14287 for (int i = 0; i < 10; ++i)
14289 #pragma omp target parallel
14290 #pragma omp parallel for simd
14291 for (int i = 0; i < 10; ++i)
14293 #pragma omp target parallel
14294 #pragma omp parallel sections
14296 bar();
14298 #pragma omp target parallel
14299 #pragma omp task
14301 bar();
14303 #pragma omp target parallel
14305 #pragma omp taskyield
14306 bar();
14308 #pragma omp target parallel
14310 #pragma omp barrier
14311 bar();
14313 #pragma omp target parallel
14315 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
14316 bar();
14318 #pragma omp target parallel
14320 #pragma omp taskwait
14321 bar();
14323 #pragma omp target parallel
14325 #pragma omp flush
14326 bar();
14328 #pragma omp target parallel
14330 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
14331 bar();
14333 #pragma omp target parallel
14335 #pragma omp atomic
14336 ++a;
14338 #pragma omp target parallel
14340 #pragma omp target // expected-error {{region cannot be nested inside 'target parallel' region}}
14341 ++a;
14343 #pragma omp target parallel
14345 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel' region}}
14346 ++a;
14348 #pragma omp target parallel
14349 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target parallel' region}}
14350 for (int i = 0; i < 10; ++i)
14352 #pragma omp target parallel
14354 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
14355 ++a;
14357 #pragma omp target parallel
14359 ++a;
14360 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
14361 ++a;
14363 #pragma omp target parallel
14365 #pragma omp taskloop
14366 for (int i = 0; i < 10; ++i)
14367 ++a;
14369 #pragma omp target parallel
14371 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
14372 for (int i = 0; i < 10; ++i)
14375 #pragma omp target parallel
14377 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel' region}}
14379 #pragma omp target parallel
14381 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel' region}}
14383 #pragma omp target parallel
14385 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target parallel' region}}
14387 #pragma omp target parallel
14389 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
14390 for (int i = 0; i < 10; ++i)
14393 #pragma omp target parallel
14395 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
14396 for (int i = 0; i < 10; ++i)
14399 #pragma omp target parallel
14401 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
14402 for (int i = 0; i < 10; ++i)
14405 #pragma omp target parallel
14407 #pragma omp target simd // expected-error {{region cannot be nested inside 'target parallel' regio}}
14408 for (int i = 0; i < 10; ++i)
14411 #pragma omp target parallel
14413 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
14414 for (int i = 0; i < 10; ++i)
14417 #pragma omp target parallel
14419 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
14420 for (int i = 0; i < 10; ++i)
14423 #pragma omp target parallel
14425 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
14426 for (int i = 0; i < 10; ++i)
14429 #pragma omp target parallel
14431 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
14432 for (int i = 0; i < 10; ++i)
14435 #pragma omp target parallel
14437 #pragma omp target teams // expected-error {{region cannot be nested inside 'target parallel' region}}
14438 a++;
14440 #pragma omp target parallel
14442 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target parallel' region}}
14443 for (int i = 0; i < 10; ++i)
14446 #pragma omp target parallel
14448 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target parallel' region}}
14449 for (int i = 0; i < 10; ++i)
14452 #pragma omp target parallel
14454 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target parallel' region}}
14455 for (int i = 0; i < 10; ++i)
14458 #pragma omp target parallel
14460 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target parallel' region}}
14461 for (int i = 0; i < 10; ++i)
14465 // TARGET PARALLEL FOR DIRECTIVE
14466 #pragma omp target parallel for
14467 for (int i = 0; i < 10; ++i) {
14468 #pragma omp for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
14469 for (int i = 0; i < 10; ++i)
14472 #pragma omp target parallel for
14473 for (int i = 0; i < 10; ++i) {
14474 #pragma omp simd
14475 for (int i = 0; i < 10; ++i)
14478 #pragma omp target parallel for
14479 for (int i = 0; i < 10; ++i) {
14480 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
14481 for (int i = 0; i < 10; ++i)
14484 #pragma omp target parallel for
14485 for (int i = 0; i < 10; ++i) {
14486 #pragma omp parallel
14487 for (int i = 0; i < 10; ++i)
14490 #pragma omp target parallel for
14491 for (int i = 0; i < 10; ++i) {
14492 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
14494 bar();
14497 #pragma omp target parallel for
14498 for (int i = 0; i < 10; ++i) {
14499 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target parallel for region}}
14501 bar();
14504 #pragma omp target parallel for
14505 for (int i = 0; i < 10; ++i) {
14506 #pragma omp single // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
14508 bar();
14512 #pragma omp target parallel for
14513 for (int i = 0; i < 10; ++i) {
14514 #pragma omp master // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
14516 bar();
14520 #pragma omp target parallel for
14521 for (int i = 0; i < 10; ++i) {
14522 #pragma omp critical
14524 bar();
14528 #pragma omp target parallel for
14529 for (int i = 0; i < 10; ++i) {
14530 #pragma omp parallel
14532 #pragma omp single // OK
14534 bar();
14536 #pragma omp for // OK
14537 for (int i = 0; i < 10; ++i)
14539 #pragma omp for simd // OK
14540 for (int i = 0; i < 10; ++i)
14542 #pragma omp sections // OK
14544 bar();
14548 #pragma omp target parallel for
14549 for (int i = 0; i < 10; ++i) {
14550 #pragma omp parallel for
14551 for (int i = 0; i < 10; ++i)
14554 #pragma omp target parallel for
14555 for (int i = 0; i < 10; ++i) {
14556 #pragma omp parallel for simd
14557 for (int i = 0; i < 10; ++i)
14560 #pragma omp target parallel for
14561 for (int i = 0; i < 10; ++i) {
14562 #pragma omp parallel sections
14564 bar();
14567 #pragma omp target parallel for
14568 for (int i = 0; i < 10; ++i) {
14569 #pragma omp task
14571 bar();
14574 #pragma omp target parallel for
14575 for (int i = 0; i < 10; ++i) {
14576 #pragma omp taskyield
14577 bar();
14579 #pragma omp target parallel for
14580 for (int i = 0; i < 10; ++i) {
14581 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
14582 bar();
14584 #pragma omp target parallel for
14585 for (int i = 0; i < 10; ++i) {
14586 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target parallel for' region}}
14587 bar();
14589 #pragma omp target parallel for
14590 for (int i = 0; i < 10; ++i) {
14591 #pragma omp taskwait
14592 bar();
14594 #pragma omp target parallel for
14595 for (int i = 0; i < 10; ++i) {
14596 #pragma omp flush
14597 bar();
14599 #pragma omp target parallel for
14600 for (int i = 0; i < 10; ++i) {
14601 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
14602 bar();
14604 #pragma omp target parallel for ordered
14605 for (int i = 0; i < 10; ++i) {
14606 #pragma omp ordered // OK
14607 bar();
14609 #pragma omp target parallel for
14610 for (int i = 0; i < 10; ++i) {
14611 #pragma omp atomic
14612 ++a;
14614 #pragma omp target parallel for
14615 for (int i = 0; i < 10; ++i) {
14616 #pragma omp target // expected-error {{region cannot be nested inside 'target parallel for' region}}
14617 ++a;
14619 #pragma omp target parallel for
14620 for (int i = 0; i < 10; ++i) {
14621 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel for' region}}
14622 ++a;
14624 #pragma omp target parallel for
14625 for (int i = 0; i < 10; ++i) {
14626 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target parallel for' region}}
14627 for (int i = 0; i < 10; ++i)
14630 #pragma omp target parallel for
14631 for (int i = 0; i < 10; ++i) {
14632 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
14633 ++a;
14635 #pragma omp target parallel for
14636 for (int i = 0; i < 10; ++i) {
14637 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
14638 ++a;
14640 #pragma omp target parallel for
14641 for (int i = 0; i < 10; ++i) {
14642 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
14643 ++a;
14645 #pragma omp target parallel for
14646 for (int i = 0; i < 10; ++i) {
14647 #pragma omp taskloop
14648 for (int i = 0; i < 10; ++i)
14649 ++a;
14651 #pragma omp target parallel for
14652 for (int i = 0; i < 10; ++i) {
14653 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
14654 for (int j = 0; j < 10; ++j)
14657 #pragma omp target parallel for
14658 for (int i = 0; i < 10; ++i) {
14659 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target parallel for' region}}
14660 a++;
14662 #pragma omp target parallel for
14663 for (int i = 0; i < 10; ++i) {
14664 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
14665 for (int j = 0; j < 10; ++j)
14668 #pragma omp target parallel for
14669 for (int i = 0; i < 10; ++i) {
14670 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
14671 for (int j = 0; j < 10; ++j)
14674 #pragma omp target parallel for
14675 for (int i = 0; i < 10; ++i) {
14676 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
14677 for (int j = 0; j < 10; ++j)
14680 #pragma omp target parallel for
14681 for (int i = 0; i < 10; ++i) {
14682 #pragma omp target simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
14683 for (int j = 0; j < 10; ++j)
14686 #pragma omp target parallel for
14687 for (int i = 0; i < 10; ++i) {
14688 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
14689 for (int j = 0; j < 10; ++j)
14692 #pragma omp target parallel for
14693 for (int i = 0; i < 10; ++i) {
14694 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
14695 for (int j = 0; j < 10; ++j)
14698 #pragma omp target parallel for
14699 for (int i = 0; i < 10; ++i) {
14700 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
14701 for (int j = 0; j < 10; ++j)
14704 #pragma omp target parallel for
14705 for (int i = 0; i < 10; ++i) {
14706 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
14707 for (int j = 0; j < 10; ++j)
14710 #pragma omp target parallel for
14711 for (int i = 0; i < 10; ++i) {
14712 #pragma omp target teams // expected-error {{region cannot be nested inside 'target parallel for' region}}
14713 a++;
14715 #pragma omp target parallel for
14716 for (int i = 0; i < 10; ++i) {
14717 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target parallel for' region}}
14718 for (int j = 0; j < 10; ++j)
14721 #pragma omp target parallel for
14722 for (int i = 0; i < 10; ++i) {
14723 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target parallel for' region}}
14724 for (int j = 0; j < 10; ++j)
14727 #pragma omp target parallel for
14728 for (int i = 0; i < 10; ++i) {
14729 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
14730 for (int j = 0; j < 10; ++j)
14733 #pragma omp target parallel for
14734 for (int i = 0; i < 10; ++i) {
14735 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target parallel for' region}}
14736 for (int j = 0; j < 10; ++j)
14740 // TEAMS DIRECTIVE
14741 #pragma omp target
14742 #pragma omp teams
14743 #pragma omp parallel
14744 bar();
14745 #pragma omp target
14746 #pragma omp teams
14747 #pragma omp for // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
14748 for (int i = 0; i < 10; ++i)
14750 #pragma omp target
14751 #pragma omp teams
14752 #pragma omp simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp simd' directive into a parallel region?}}
14753 for (int i = 0; i < 10; ++i)
14755 #pragma omp target
14756 #pragma omp teams
14757 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
14758 for (int i = 0; i < 10; ++i)
14760 #pragma omp target
14761 #pragma omp teams
14762 #pragma omp sections // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
14764 bar();
14766 #pragma omp target
14767 #pragma omp teams
14768 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams region}}
14770 bar();
14772 #pragma omp target
14773 #pragma omp teams
14774 #pragma omp single // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
14775 bar();
14777 #pragma omp target
14778 #pragma omp teams
14779 #pragma omp master // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp master' directive into a parallel region?}}
14781 bar();
14783 #pragma omp target
14784 #pragma omp teams
14785 #pragma omp critical // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp critical' directive into a parallel region?}}
14787 bar();
14789 #pragma omp target
14790 #pragma omp teams
14791 #pragma omp parallel for
14792 for (int i = 0; i < 10; ++i)
14794 #pragma omp target
14795 #pragma omp teams
14796 #pragma omp parallel for simd
14797 for (int i = 0; i < 10; ++i)
14799 #pragma omp target
14800 #pragma omp teams
14801 #pragma omp parallel sections
14803 bar();
14805 #pragma omp target
14806 #pragma omp teams
14807 #pragma omp task // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp task' directive into a parallel region?}}
14809 bar();
14811 #pragma omp target
14812 #pragma omp teams
14814 #pragma omp taskyield // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskyield' directive into a parallel region?}}
14815 bar();
14817 #pragma omp target
14818 #pragma omp teams
14820 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp barrier' directive into a parallel region?}}
14821 bar();
14823 #pragma omp target
14824 #pragma omp teams
14826 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
14827 bar();
14829 #pragma omp target
14830 #pragma omp teams
14832 #pragma omp taskwait // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskwait' directive into a parallel region?}}
14833 bar();
14835 #pragma omp target
14836 #pragma omp teams
14838 #pragma omp flush // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp flush' directive into a parallel region?}}
14839 bar();
14841 #pragma omp target
14842 #pragma omp teams
14844 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
14845 bar();
14847 #pragma omp target
14848 #pragma omp teams
14850 #pragma omp atomic // omp-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp atomic' directive into a parallel region?}}
14851 ++a;
14853 #pragma omp target
14854 #pragma omp teams
14856 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
14857 ++a;
14859 #pragma omp target
14860 #pragma omp teams
14862 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
14863 ++a;
14865 #pragma omp target
14866 #pragma omp teams
14867 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
14868 for (int i = 0; i < 10; ++i)
14870 #pragma omp target
14871 #pragma omp teams
14873 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
14875 #pragma omp target
14876 #pragma omp teams
14878 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
14880 #pragma omp target
14881 #pragma omp teams
14883 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
14884 ++a;
14886 #pragma omp target
14887 #pragma omp teams
14889 #pragma omp taskloop // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp taskloop' directive into a parallel region?}}
14890 for (int i = 0; i < 10; ++i)
14891 ++a;
14893 #pragma omp target
14894 #pragma omp teams
14895 #pragma omp distribute
14896 for (int i = 0; i < 10; ++i)
14898 #pragma omp target
14899 #pragma omp teams
14900 #pragma omp distribute
14901 for (int i = 0; i < 10; ++i)
14903 #pragma omp distribute
14904 for (int j = 0; j < 10; ++j)
14906 #pragma omp target
14907 #pragma omp teams
14909 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
14910 ++a;
14912 #pragma omp target
14913 #pragma omp teams
14914 #pragma omp distribute parallel for
14915 for (int i = 0; i < 10; ++i)
14917 #pragma omp target
14918 #pragma omp teams
14920 #pragma omp distribute parallel for
14921 for (int i = 0; i < 10; ++i)
14923 #pragma omp distribute parallel for
14924 for (int j = 0; j < 10; ++j)
14927 #pragma omp target
14928 #pragma omp teams
14930 #pragma omp distribute parallel for simd
14931 for (int i = 0; i < 10; ++i)
14933 #pragma omp distribute parallel for simd
14934 for (int j = 0; j < 10; ++j)
14937 #pragma omp target
14938 #pragma omp teams
14940 #pragma omp distribute simd
14941 for (int i = 0; i < 10; ++i)
14943 #pragma omp distribute simd
14944 for (int j = 0; j < 10; ++j)
14947 #pragma omp target
14948 #pragma omp teams
14950 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
14951 for (int i = 0; i < 10; ++i)
14954 #pragma omp target
14955 #pragma omp teams
14957 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
14958 for (int i = 0; i < 10; ++i)
14961 #pragma omp target
14962 #pragma omp teams
14964 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
14965 for (int i = 0; i < 10; ++i)
14968 #pragma omp target
14969 #pragma omp teams
14971 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
14972 for (int i = 0; i < 10; ++i)
14975 #pragma omp target
14976 #pragma omp teams
14978 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
14979 for (int i = 0; i < 10; ++i)
14982 #pragma omp target
14983 #pragma omp teams
14985 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
14986 a++;
14988 #pragma omp target
14989 #pragma omp teams
14991 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
14992 for (int i = 0; i < 10; ++i)
14995 #pragma omp target
14996 #pragma omp teams
14998 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
14999 for (int i = 0; i < 10; ++i)
15002 #pragma omp target
15003 #pragma omp teams
15005 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
15006 for (int i = 0; i < 10; ++i)
15009 #pragma omp target
15010 #pragma omp teams
15012 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
15013 for (int i = 0; i < 10; ++i)
15017 // TASKLOOP DIRECTIVE
15018 #pragma omp taskloop
15019 for (int i = 0; i < 10; ++i) {
15020 #pragma omp for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
15021 for (int i = 0; i < 10; ++i)
15024 #pragma omp taskloop
15025 for (int i = 0; i < 10; ++i) {
15026 #pragma omp simd
15027 for (int i = 0; i < 10; ++i)
15030 #pragma omp taskloop
15031 for (int i = 0; i < 10; ++i) {
15032 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
15033 for (int i = 0; i < 10; ++i)
15036 #pragma omp taskloop
15037 for (int i = 0; i < 10; ++i) {
15038 #pragma omp parallel
15039 for (int i = 0; i < 10; ++i)
15042 #pragma omp taskloop
15043 for (int i = 0; i < 10; ++i) {
15044 #pragma omp sections // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
15046 bar();
15049 #pragma omp taskloop
15050 for (int i = 0; i < 10; ++i) {
15051 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a taskloop region}}
15053 bar();
15056 #pragma omp taskloop
15057 for (int i = 0; i < 10; ++i) {
15058 #pragma omp single // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
15060 bar();
15064 #pragma omp taskloop
15065 for (int i = 0; i < 10; ++i) {
15066 #pragma omp master // expected-error {{region cannot be closely nested inside 'taskloop' region}}
15068 bar();
15071 #pragma omp taskloop
15072 for (int i = 0; i < 10; ++i) {
15073 #pragma omp critical
15075 bar();
15078 #pragma omp taskloop
15079 for (int i = 0; i < 10; ++i) {
15080 #pragma omp parallel
15082 #pragma omp single // OK
15084 bar();
15086 #pragma omp for // OK
15087 for (int i = 0; i < 10; ++i)
15089 #pragma omp sections // OK
15091 bar();
15095 #pragma omp taskloop
15096 for (int i = 0; i < 10; ++i) {
15097 #pragma omp parallel for
15098 for (int i = 0; i < 10; ++i)
15101 #pragma omp taskloop
15102 for (int i = 0; i < 10; ++i) {
15103 #pragma omp parallel for simd
15104 for (int i = 0; i < 10; ++i)
15107 #pragma omp taskloop
15108 for (int i = 0; i < 10; ++i) {
15109 #pragma omp parallel sections
15111 bar();
15114 #pragma omp taskloop
15115 for (int i = 0; i < 10; ++i) {
15116 #pragma omp task
15118 bar();
15121 #pragma omp taskloop
15122 for (int i = 0; i < 10; ++i) {
15123 #pragma omp taskyield
15124 bar();
15126 #pragma omp taskloop
15127 for (int i = 0; i < 10; ++i) {
15128 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'taskloop' region}}
15129 bar();
15131 #pragma omp taskloop
15132 for (int i = 0; i < 10; ++i) {
15133 #pragma omp scan // expected-error {{region cannot be closely nested inside 'taskloop' region}}
15134 bar();
15136 #pragma omp taskloop
15137 for (int i = 0; i < 10; ++i) {
15138 #pragma omp taskwait
15139 bar();
15141 #pragma omp taskloop
15142 for (int i = 0; i < 10; ++i) {
15143 #pragma omp flush
15144 bar();
15146 #pragma omp taskloop
15147 for (int i = 0; i < 10; ++i) {
15148 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
15149 bar();
15151 #pragma omp taskloop
15152 for (int i = 0; i < 10; ++i) {
15153 #pragma omp atomic
15154 ++a;
15156 #pragma omp taskloop
15157 for (int i = 0; i < 10; ++i) {
15158 #pragma omp target
15159 ++a;
15161 #pragma omp taskloop
15162 for (int i = 0; i < 10; ++i) {
15163 #pragma omp target parallel
15164 ++a;
15166 #pragma omp taskloop
15167 for (int i = 0; i < 10; ++i) {
15168 #pragma omp target parallel for
15169 for (int i = 0; i < 10; ++i)
15172 #pragma omp taskloop
15173 for (int i = 0; i < 10; ++i) {
15174 #pragma omp target enter data map(to: a)
15175 ++a;
15177 #pragma omp taskloop
15178 for (int i = 0; i < 10; ++i) {
15179 #pragma omp target exit data map(from: a)
15180 ++a;
15182 #pragma omp taskloop
15183 for (int i = 0; i < 10; ++i) {
15184 #pragma omp teams // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
15185 ++a;
15187 #pragma omp taskloop
15188 for (int i = 0; i < 10; ++i) {
15189 #pragma omp taskloop
15190 for (int i = 0; i < 10; ++i)
15191 ++a;
15193 #pragma omp taskloop
15194 for (int i = 0; i < 10; ++i) {
15195 #pragma omp target update to(a)
15196 ++a;
15198 #pragma omp taskloop
15199 for (int i = 0; i < 10; ++i) {
15200 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
15201 for (int i = 0; i < 10; ++i)
15204 #pragma omp taskloop
15205 for (int i = 0; i < 10; ++i) {
15206 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
15207 for (int i = 0; i < 10; ++i)
15210 #pragma omp taskloop
15211 for (int i = 0; i < 10; ++i) {
15212 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
15213 for (int i = 0; i < 10; ++i)
15216 #pragma omp taskloop
15217 for (int i = 0; i < 10; ++i) {
15218 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
15219 for (int i = 0; i < 10; ++i)
15222 #pragma omp taskloop
15223 for (int i = 0; i < 10; ++i) {
15224 #pragma omp target simd // OK
15225 for (int i = 0; i < 10; ++i)
15228 #pragma omp taskloop
15229 for (int i = 0; i < 10; ++i) {
15230 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
15231 for (int i = 0; i < 10; ++i)
15234 #pragma omp taskloop
15235 for (int i = 0; i < 10; ++i) {
15236 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
15237 for (int i = 0; i < 10; ++i)
15240 #pragma omp taskloop
15241 for (int i = 0; i < 10; ++i) {
15242 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
15243 for (int i = 0; i < 10; ++i)
15246 #pragma omp taskloop
15247 for (int i = 0; i < 10; ++i) {
15248 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'taskloop' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
15249 for (int i = 0; i < 10; ++i)
15252 #pragma omp taskloop
15253 for (int i = 0; i < 10; ++i) {
15254 #pragma omp target teams // OK
15255 a++;
15257 #pragma omp taskloop
15258 for (int i = 0; i < 10; ++i) {
15259 #pragma omp target teams distribute // OK
15260 for (int i = 0; i < 10; ++i)
15263 #pragma omp taskloop
15264 for (int i = 0; i < 10; ++i) {
15265 #pragma omp target teams distribute parallel for // OK
15266 for (int i = 0; i < 10; ++i)
15269 #pragma omp taskloop
15270 for (int i = 0; i < 10; ++i) {
15271 #pragma omp target teams distribute parallel for simd // OK
15272 for (int i = 0; i < 10; ++i)
15275 #pragma omp taskloop
15276 for (int i = 0; i < 10; ++i) {
15277 #pragma omp target teams distribute simd // OK
15278 for (int i = 0; i < 10; ++i)
15282 // DISTRIBUTE DIRECTIVE
15283 #pragma omp target
15284 #pragma omp teams
15285 #pragma omp distribute
15286 for (int i = 0; i < 10; ++i) {
15287 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
15288 for (int i = 0; i < 10; ++i)
15291 #pragma omp target
15292 #pragma omp teams
15293 #pragma omp distribute
15294 for (int i = 0; i < 10; ++i) {
15295 #pragma omp for
15296 for (int i = 0; i < 10; ++i)
15299 #pragma omp target
15300 #pragma omp teams
15301 #pragma omp distribute
15302 for (int i = 0; i < 10; ++i) {
15303 #pragma omp simd
15304 for (int i = 0; i < 10; ++i)
15307 #pragma omp target
15308 #pragma omp teams
15309 #pragma omp distribute
15310 for (int i = 0; i < 10; ++i) {
15311 #pragma omp for simd
15312 for (int i = 0; i < 10; ++i)
15315 #pragma omp target
15316 #pragma omp teams
15317 #pragma omp distribute
15318 for (int i = 0; i < 10; ++i) {
15319 #pragma omp parallel
15320 for (int i = 0; i < 10; ++i)
15323 #pragma omp target
15324 #pragma omp teams
15325 #pragma omp distribute
15326 for (int i = 0; i < 10; ++i) {
15327 #pragma omp sections
15329 bar();
15332 #pragma omp target
15333 #pragma omp teams
15334 #pragma omp distribute
15335 for (int i = 0; i < 10; ++i) {
15336 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a distribute region}}
15338 bar();
15341 #pragma omp target
15342 #pragma omp teams
15343 #pragma omp distribute
15344 for (int i = 0; i < 10; ++i) {
15345 #pragma omp single
15347 bar();
15350 #pragma omp target
15351 #pragma omp teams
15352 #pragma omp distribute
15353 for (int i = 0; i < 10; ++i) {
15354 #pragma omp master
15356 bar();
15359 #pragma omp target
15360 #pragma omp teams
15361 #pragma omp distribute
15362 for (int i = 0; i < 10; ++i) {
15363 #pragma omp critical
15365 bar();
15368 #pragma omp target
15369 #pragma omp teams
15370 #pragma omp distribute
15371 for (int i = 0; i < 10; ++i) {
15372 #pragma omp parallel
15374 #pragma omp single
15376 bar();
15380 #pragma omp target
15381 #pragma omp teams
15382 #pragma omp distribute
15383 for (int i = 0; i < 10; ++i) {
15384 #pragma omp parallel for
15385 for (int i = 0; i < 10; ++i)
15388 #pragma omp target
15389 #pragma omp teams
15390 #pragma omp distribute
15391 for (int i = 0; i < 10; ++i) {
15392 #pragma omp parallel for simd
15393 for (int i = 0; i < 10; ++i)
15396 #pragma omp target
15397 #pragma omp teams
15398 #pragma omp distribute
15399 for (int i = 0; i < 10; ++i) {
15400 #pragma omp parallel sections
15402 bar();
15405 #pragma omp target
15406 #pragma omp teams
15407 #pragma omp distribute
15408 for (int i = 0; i < 10; ++i) {
15409 #pragma omp task
15411 bar();
15414 #pragma omp target
15415 #pragma omp teams
15416 #pragma omp distribute
15417 for (int i = 0; i < 10; ++i) {
15418 #pragma omp taskyield
15419 bar();
15421 #pragma omp target
15422 #pragma omp teams
15423 #pragma omp distribute
15424 for (int i = 0; i < 10; ++i) {
15425 #pragma omp barrier
15426 bar();
15428 #pragma omp target
15429 #pragma omp teams
15430 #pragma omp distribute
15431 for (int i = 0; i < 10; ++i) {
15432 #pragma omp scan // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
15433 bar();
15435 #pragma omp target
15436 #pragma omp teams
15437 #pragma omp distribute
15438 for (int i = 0; i < 10; ++i) {
15439 #pragma omp taskwait
15440 bar();
15442 #pragma omp target
15443 #pragma omp teams
15444 #pragma omp distribute
15445 for (int i = 0; i < 10; ++i) {
15446 #pragma omp flush
15447 bar();
15449 #pragma omp target
15450 #pragma omp teams
15451 #pragma omp distribute
15452 for (int i = 0; i < 10; ++i) {
15453 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
15454 bar();
15456 #pragma omp target
15457 #pragma omp teams
15458 #pragma omp distribute
15459 for (int i = 0; i < 10; ++i) {
15460 #pragma omp atomic
15461 ++a;
15463 #pragma omp target
15464 #pragma omp teams
15465 #pragma omp distribute
15466 for (int i = 0; i < 10; ++i) {
15467 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
15468 ++a;
15470 #pragma omp target
15471 #pragma omp teams
15472 #pragma omp distribute
15473 for (int i = 0; i < 10; ++i) {
15474 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
15475 ++a;
15477 #pragma omp target
15478 #pragma omp teams
15479 #pragma omp distribute
15480 for (int i = 0; i < 10; ++i) {
15481 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
15482 for (int i = 0; i < 10; ++i)
15485 #pragma omp target
15486 #pragma omp teams
15487 #pragma omp distribute
15488 for (int i = 0; i < 10; ++i) {
15489 #pragma omp teams // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
15490 ++a;
15492 #pragma omp target
15493 #pragma omp teams
15494 #pragma omp distribute
15495 for (int i = 0; i < 10; ++i) {
15496 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
15497 ++a;
15499 #pragma omp target
15500 #pragma omp teams
15501 #pragma omp distribute
15502 for (int i = 0; i < 10; ++i) {
15503 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
15504 ++a;
15506 #pragma omp target
15507 #pragma omp teams
15508 #pragma omp distribute
15509 for (int i = 0; i < 10; ++i) {
15510 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
15511 ++a;
15513 #pragma omp target
15514 #pragma omp teams
15515 #pragma omp distribute
15516 for (int i = 0; i < 10; ++i) {
15517 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
15518 for (int i = 0; i < 10; ++i)
15519 ++a;
15521 #pragma omp target
15522 #pragma omp teams
15523 #pragma omp distribute
15524 for (int i = 0; i < 10; ++i) {
15525 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
15526 for (int i = 0; i < 10; ++i)
15527 ++a;
15529 #pragma omp target
15530 #pragma omp teams
15531 #pragma omp distribute
15532 for (int i = 0; i < 10; ++i) {
15533 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
15534 for (int i = 0; i < 10; ++i)
15535 ++a;
15537 #pragma omp target
15538 #pragma omp teams
15539 #pragma omp distribute
15540 for (int i = 0; i < 10; ++i) {
15541 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
15542 for (int i = 0; i < 10; ++i)
15543 ++a;
15545 #pragma omp target
15546 #pragma omp teams
15547 #pragma omp distribute
15548 for (int i = 0; i < 10; ++i) {
15549 #pragma omp target parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
15550 for (int i = 0; i < 10; ++i)
15551 ++a;
15553 #pragma omp target
15554 #pragma omp teams
15555 #pragma omp distribute
15556 for (int i = 0; i < 10; ++i) {
15557 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
15558 for (int i = 0; i < 10; ++i)
15559 ++a;
15561 #pragma omp target
15562 #pragma omp teams
15563 #pragma omp distribute
15564 for (int i = 0; i < 10; ++i) {
15565 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
15566 for (int i = 0; i < 10; ++i)
15567 ++a;
15569 #pragma omp target
15570 #pragma omp teams
15571 #pragma omp distribute
15572 for (int i = 0; i < 10; ++i) {
15573 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
15574 for (int i = 0; i < 10; ++i)
15575 ++a;
15577 #pragma omp target
15578 #pragma omp teams
15579 #pragma omp distribute
15580 for (int i = 0; i < 10; ++i) {
15581 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
15582 for (int i = 0; i < 10; ++i)
15583 ++a;
15585 #pragma omp target
15586 #pragma omp teams
15587 #pragma omp distribute
15588 for (int i = 0; i < 10; ++i) {
15589 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
15590 for (int i = 0; i < 10; ++i)
15591 ++a;
15593 #pragma omp target
15594 #pragma omp teams
15595 #pragma omp distribute
15596 for (int i = 0; i < 10; ++i) {
15597 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
15598 for (int i = 0; i < 10; ++i)
15599 ++a;
15602 // DISTRIBUTE PARALLEL FOR DIRECTIVE
15603 #pragma omp target
15604 #pragma omp teams
15605 #pragma omp distribute parallel for
15606 for (int i = 0; i < 10; ++i) {
15607 #pragma omp distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for' directive into a teams region?}}
15608 for (int i = 0; i < 10; ++i)
15612 #pragma omp target
15613 #pragma omp teams
15614 #pragma omp distribute parallel for
15615 for (int i = 0; i < 10; ++i) {
15616 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
15617 for (int i = 0; i < 10; ++i)
15620 #pragma omp target
15621 #pragma omp teams
15622 #pragma omp distribute parallel for
15623 for (int i = 0; i < 10; ++i) {
15624 #pragma omp for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
15625 for (int i = 0; i < 10; ++i)
15628 #pragma omp target
15629 #pragma omp teams
15630 #pragma omp distribute parallel for
15631 for (int i = 0; i < 10; ++i) {
15632 #pragma omp simd
15633 for (int i = 0; i < 10; ++i)
15636 #pragma omp target
15637 #pragma omp teams
15638 #pragma omp distribute parallel for
15639 for (int i = 0; i < 10; ++i) {
15640 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
15641 for (int i = 0; i < 10; ++i)
15644 #pragma omp target
15645 #pragma omp teams
15646 #pragma omp distribute parallel for
15647 for (int i = 0; i < 10; ++i) {
15648 #pragma omp parallel
15649 for (int i = 0; i < 10; ++i)
15652 #pragma omp target
15653 #pragma omp teams
15654 #pragma omp distribute parallel for
15655 for (int i = 0; i < 10; ++i) {
15656 #pragma omp sections // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
15658 bar();
15661 #pragma omp target
15662 #pragma omp teams
15663 #pragma omp distribute parallel for
15664 for (int i = 0; i < 10; ++i) {
15665 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a distribute parallel for region}}
15667 bar();
15670 #pragma omp target
15671 #pragma omp teams
15672 #pragma omp distribute parallel for
15673 for (int i = 0; i < 10; ++i) {
15674 #pragma omp single // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
15676 bar();
15679 #pragma omp target
15680 #pragma omp teams
15681 #pragma omp distribute parallel for
15682 for (int i = 0; i < 10; ++i) {
15683 #pragma omp master // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
15685 bar();
15688 #pragma omp target
15689 #pragma omp teams
15690 #pragma omp distribute parallel for
15691 for (int i = 0; i < 10; ++i) {
15692 #pragma omp critical
15694 bar();
15697 #pragma omp target
15698 #pragma omp teams
15699 #pragma omp distribute parallel for
15700 for (int i = 0; i < 10; ++i) {
15701 #pragma omp parallel
15703 #pragma omp single
15705 bar();
15709 #pragma omp target
15710 #pragma omp teams
15711 #pragma omp distribute parallel for
15712 for (int i = 0; i < 10; ++i) {
15713 #pragma omp parallel for
15714 for (int i = 0; i < 10; ++i)
15717 #pragma omp target
15718 #pragma omp teams
15719 #pragma omp distribute parallel for
15720 for (int i = 0; i < 10; ++i) {
15721 #pragma omp parallel for simd
15722 for (int i = 0; i < 10; ++i)
15725 #pragma omp target
15726 #pragma omp teams
15727 #pragma omp distribute parallel for
15728 for (int i = 0; i < 10; ++i) {
15729 #pragma omp parallel sections
15731 bar();
15734 #pragma omp target
15735 #pragma omp teams
15736 #pragma omp distribute parallel for
15737 for (int i = 0; i < 10; ++i) {
15738 #pragma omp task
15740 bar();
15743 #pragma omp target
15744 #pragma omp teams
15745 #pragma omp distribute parallel for
15746 for (int i = 0; i < 10; ++i) {
15747 #pragma omp taskyield
15748 bar();
15750 #pragma omp target
15751 #pragma omp teams
15752 #pragma omp distribute parallel for
15753 for (int i = 0; i < 10; ++i) {
15754 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
15755 bar();
15757 #pragma omp target
15758 #pragma omp teams
15759 #pragma omp distribute parallel for
15760 for (int i = 0; i < 10; ++i) {
15761 #pragma omp scan // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
15762 bar();
15764 #pragma omp target
15765 #pragma omp teams
15766 #pragma omp distribute parallel for
15767 for (int i = 0; i < 10; ++i) {
15768 #pragma omp taskwait
15769 bar();
15771 #pragma omp target
15772 #pragma omp teams
15773 #pragma omp distribute parallel for
15774 for (int i = 0; i < 10; ++i) {
15775 #pragma omp flush
15776 bar();
15778 #pragma omp target
15779 #pragma omp teams
15780 #pragma omp distribute parallel for
15781 for (int i = 0; i < 10; ++i) {
15782 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
15783 bar();
15785 #pragma omp target
15786 #pragma omp teams
15787 #pragma omp distribute parallel for
15788 for (int i = 0; i < 10; ++i) {
15789 #pragma omp atomic
15790 ++a;
15792 #pragma omp target
15793 #pragma omp teams
15794 #pragma omp distribute parallel for
15795 for (int i = 0; i < 10; ++i) {
15796 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
15797 ++a;
15799 #pragma omp target
15800 #pragma omp teams
15801 #pragma omp distribute parallel for
15802 for (int i = 0; i < 10; ++i) {
15803 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
15804 ++a;
15806 #pragma omp target
15807 #pragma omp teams
15808 #pragma omp distribute parallel for
15809 for (int i = 0; i < 10; ++i) {
15810 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
15811 for (int i = 0; i < 10; ++i)
15814 #pragma omp target
15815 #pragma omp teams
15816 #pragma omp distribute parallel for
15817 for (int i = 0; i < 10; ++i) {
15818 #pragma omp teams // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
15819 ++a;
15821 #pragma omp target
15822 #pragma omp teams
15823 #pragma omp distribute parallel for
15824 for (int i = 0; i < 10; ++i) {
15825 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
15826 ++a;
15828 #pragma omp target
15829 #pragma omp teams
15830 #pragma omp distribute parallel for
15831 for (int i = 0; i < 10; ++i) {
15832 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
15833 ++a;
15835 #pragma omp target
15836 #pragma omp teams
15837 #pragma omp distribute parallel for
15838 for (int i = 0; i < 10; ++i) {
15839 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
15840 ++a;
15842 #pragma omp target
15843 #pragma omp teams
15844 #pragma omp distribute parallel for
15845 for (int i = 0; i < 10; ++i) {
15846 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
15847 for (int i = 0; i < 10; ++i)
15848 ++a;
15850 #pragma omp target
15851 #pragma omp teams
15852 #pragma omp distribute parallel for
15853 for (int i = 0; i < 10; ++i) {
15854 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
15855 for (int i = 0; i < 10; ++i)
15856 ++a;
15858 #pragma omp target
15859 #pragma omp teams
15860 #pragma omp distribute parallel for
15861 for (int i = 0; i < 10; ++i) {
15862 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
15863 for (int i = 0; i < 10; ++i)
15864 ++a;
15866 #pragma omp target
15867 #pragma omp teams
15868 #pragma omp distribute parallel for
15869 for (int i = 0; i < 10; ++i) {
15870 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
15871 for (int i = 0; i < 10; ++i)
15872 ++a;
15874 #pragma omp target
15875 #pragma omp teams
15876 #pragma omp distribute parallel for
15877 for (int i = 0; i < 10; ++i) {
15878 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
15879 for (int i = 0; i < 10; ++i)
15880 ++a;
15882 #pragma omp target
15883 #pragma omp teams
15884 #pragma omp distribute parallel for
15885 for (int i = 0; i < 10; ++i) {
15886 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
15887 for (int i = 0; i < 10; ++i)
15888 ++a;
15890 #pragma omp target
15891 #pragma omp teams
15892 #pragma omp distribute parallel for
15893 for (int i = 0; i < 10; ++i) {
15894 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
15895 ++a;
15897 #pragma omp target
15898 #pragma omp teams
15899 #pragma omp distribute parallel for
15900 for (int i = 0; i < 10; ++i) {
15901 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
15902 for (int i = 0; i < 10; ++i)
15903 ++a;
15905 #pragma omp target
15906 #pragma omp teams
15907 #pragma omp distribute parallel for
15908 for (int i = 0; i < 10; ++i) {
15909 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
15910 for (int i = 0; i < 10; ++i)
15911 ++a;
15913 #pragma omp target
15914 #pragma omp teams
15915 #pragma omp distribute parallel for
15916 for (int i = 0; i < 10; ++i) {
15917 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
15918 for (int i = 0; i < 10; ++i)
15919 ++a;
15921 #pragma omp target
15922 #pragma omp teams
15923 #pragma omp distribute parallel for
15924 for (int i = 0; i < 10; ++i) {
15925 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
15926 for (int i = 0; i < 10; ++i)
15927 ++a;
15930 // DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
15931 #pragma omp target
15932 #pragma omp teams
15933 #pragma omp distribute parallel for simd
15934 for (int i = 0; i < 10; ++i) {
15935 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15936 for (int i = 0; i < 10; ++i)
15939 #pragma omp target
15940 #pragma omp teams
15941 #pragma omp distribute parallel for simd
15942 for (int i = 0; i < 10; ++i) {
15943 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15944 for (int i = 0; i < 10; ++i)
15947 #pragma omp target
15948 #pragma omp teams
15949 #pragma omp distribute parallel for simd
15950 for (int i = 0; i < 10; ++i) {
15951 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15952 for (int i = 0; i < 10; ++i)
15955 #pragma omp target
15956 #pragma omp teams
15957 #pragma omp distribute parallel for simd
15958 for (int i = 0; i < 10; ++i) {
15959 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
15960 for (int i = 0; i < 10; ++i)
15963 #pragma omp target
15964 #pragma omp teams
15965 #pragma omp distribute parallel for simd
15966 for (int i = 0; i < 10; ++i) {
15967 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15968 for (int i = 0; i < 10; ++i)
15971 #pragma omp target
15972 #pragma omp teams
15973 #pragma omp distribute parallel for simd
15974 for (int i = 0; i < 10; ++i) {
15975 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15976 for (int i = 0; i < 10; ++i)
15979 #pragma omp target
15980 #pragma omp teams
15981 #pragma omp distribute parallel for simd
15982 for (int i = 0; i < 10; ++i) {
15983 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15985 bar();
15988 #pragma omp target
15989 #pragma omp teams
15990 #pragma omp distribute parallel for simd
15991 for (int i = 0; i < 10; ++i) {
15992 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
15994 bar();
15997 #pragma omp target
15998 #pragma omp teams
15999 #pragma omp distribute parallel for simd
16000 for (int i = 0; i < 10; ++i) {
16001 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16003 bar();
16006 #pragma omp target
16007 #pragma omp teams
16008 #pragma omp distribute parallel for simd
16009 for (int i = 0; i < 10; ++i) {
16010 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16012 bar();
16015 #pragma omp target
16016 #pragma omp teams
16017 #pragma omp distribute parallel for simd
16018 for (int i = 0; i < 10; ++i) {
16019 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16021 bar();
16024 #pragma omp target
16025 #pragma omp teams
16026 #pragma omp distribute parallel for simd
16027 for (int i = 0; i < 10; ++i) {
16028 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16030 #pragma omp single
16032 bar();
16036 #pragma omp target
16037 #pragma omp teams
16038 #pragma omp distribute parallel for simd
16039 for (int i = 0; i < 10; ++i) {
16040 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16041 for (int i = 0; i < 10; ++i)
16044 #pragma omp target
16045 #pragma omp teams
16046 #pragma omp distribute parallel for simd
16047 for (int i = 0; i < 10; ++i) {
16048 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16049 for (int i = 0; i < 10; ++i)
16052 #pragma omp target
16053 #pragma omp teams
16054 #pragma omp distribute parallel for simd
16055 for (int i = 0; i < 10; ++i) {
16056 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16058 bar();
16061 #pragma omp target
16062 #pragma omp teams
16063 #pragma omp distribute parallel for simd
16064 for (int i = 0; i < 10; ++i) {
16065 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16067 bar();
16070 #pragma omp target
16071 #pragma omp teams
16072 #pragma omp distribute parallel for simd
16073 for (int i = 0; i < 10; ++i) {
16074 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16075 bar();
16077 #pragma omp target
16078 #pragma omp teams
16079 #pragma omp distribute parallel for simd
16080 for (int i = 0; i < 10; ++i) {
16081 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16082 bar();
16084 #pragma omp target
16085 #pragma omp teams
16086 #pragma omp distribute parallel for simd
16087 for (int i = 0; i < 10; ++i) {
16088 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
16089 bar();
16091 #pragma omp target
16092 #pragma omp teams
16093 #pragma omp distribute parallel for simd
16094 for (int i = 0; i < 10; ++i) {
16095 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16096 bar();
16098 #pragma omp target
16099 #pragma omp teams
16100 #pragma omp distribute parallel for simd
16101 for (int i = 0; i < 10; ++i) {
16102 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16103 bar();
16105 #pragma omp target
16106 #pragma omp teams
16107 #pragma omp distribute parallel for simd
16108 for (int i = 0; i < 10; ++i) {
16109 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16110 bar();
16112 #pragma omp target
16113 #pragma omp teams
16114 #pragma omp distribute parallel for simd
16115 for (int i = 0; i < 10; ++i) {
16116 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
16117 ++a;
16119 #pragma omp target
16120 #pragma omp teams
16121 #pragma omp distribute parallel for simd
16122 for (int i = 0; i < 10; ++i) {
16123 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16124 ++a;
16126 #pragma omp target
16127 #pragma omp teams
16128 #pragma omp distribute parallel for simd
16129 for (int i = 0; i < 10; ++i) {
16130 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16131 ++a;
16133 #pragma omp target
16134 #pragma omp teams
16135 #pragma omp distribute parallel for simd
16136 for (int i = 0; i < 10; ++i) {
16137 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16138 ++a;
16140 #pragma omp target
16141 #pragma omp teams
16142 #pragma omp distribute parallel for simd
16143 for (int i = 0; i < 10; ++i) {
16144 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16145 ++a;
16147 #pragma omp target
16148 #pragma omp teams
16149 #pragma omp distribute parallel for simd
16150 for (int i = 0; i < 10; ++i) {
16151 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16152 ++a;
16154 #pragma omp target
16155 #pragma omp teams
16156 #pragma omp distribute parallel for simd
16157 for (int i = 0; i < 10; ++i) {
16158 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16159 ++a;
16161 #pragma omp target
16162 #pragma omp teams
16163 #pragma omp distribute parallel for simd
16164 for (int i = 0; i < 10; ++i) {
16165 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16166 for (int i = 0; i < 10; ++i)
16169 #pragma omp target
16170 #pragma omp teams
16171 #pragma omp distribute parallel for simd
16172 for (int i = 0; i < 10; ++i) {
16173 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16174 for (int i = 0; i < 10; ++i)
16177 #pragma omp target
16178 #pragma omp teams
16179 #pragma omp distribute parallel for simd
16180 for (int i = 0; i < 10; ++i) {
16181 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16182 for (int i = 0; i < 10; ++i)
16185 #pragma omp target
16186 #pragma omp teams
16187 #pragma omp distribute parallel for simd
16188 for (int i = 0; i < 10; ++i) {
16189 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16190 for (int i = 0; i < 10; ++i)
16193 #pragma omp target
16194 #pragma omp teams
16195 #pragma omp distribute parallel for simd
16196 for (int i = 0; i < 10; ++i) {
16197 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16198 for (int i = 0; i < 10; ++i)
16201 #pragma omp target
16202 #pragma omp teams
16203 #pragma omp distribute parallel for simd
16204 for (int i = 0; i < 10; ++i) {
16205 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16206 for (int i = 0; i < 10; ++i)
16209 #pragma omp target
16210 #pragma omp teams
16211 #pragma omp distribute parallel for simd
16212 for (int i = 0; i < 10; ++i) {
16213 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16214 a++;
16216 #pragma omp target
16217 #pragma omp teams
16218 #pragma omp distribute parallel for simd
16219 for (int i = 0; i < 10; ++i) {
16220 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16221 for (int i = 0; i < 10; ++i)
16224 #pragma omp target
16225 #pragma omp teams
16226 #pragma omp distribute parallel for simd
16227 for (int i = 0; i < 10; ++i) {
16228 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16229 for (int i = 0; i < 10; ++i)
16232 #pragma omp target
16233 #pragma omp teams
16234 #pragma omp distribute parallel for simd
16235 for (int i = 0; i < 10; ++i) {
16236 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16237 for (int i = 0; i < 10; ++i)
16240 #pragma omp target
16241 #pragma omp teams
16242 #pragma omp distribute parallel for simd
16243 for (int i = 0; i < 10; ++i) {
16244 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16245 for (int i = 0; i < 10; ++i)
16249 // DISTRIBUTE SIMD DIRECTIVE
16250 #pragma omp target
16251 #pragma omp teams
16252 #pragma omp distribute simd
16253 for (int i = 0; i < 10; ++i) {
16254 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16255 for (int i = 0; i < 10; ++i)
16258 #pragma omp target
16259 #pragma omp teams
16260 #pragma omp distribute simd
16261 for (int i = 0; i < 10; ++i) {
16262 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16263 for (int i = 0; i < 10; ++i)
16266 #pragma omp target
16267 #pragma omp teams
16268 #pragma omp distribute simd
16269 for (int i = 0; i < 10; ++i) {
16270 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16271 for (int i = 0; i < 10; ++i)
16274 #pragma omp target
16275 #pragma omp teams
16276 #pragma omp distribute simd
16277 for (int i = 0; i < 10; ++i) {
16278 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
16279 for (int i = 0; i < 10; ++i)
16282 #pragma omp target
16283 #pragma omp teams
16284 #pragma omp distribute simd
16285 for (int i = 0; i < 10; ++i) {
16286 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16287 for (int i = 0; i < 10; ++i)
16290 #pragma omp target
16291 #pragma omp teams
16292 #pragma omp distribute simd
16293 for (int i = 0; i < 10; ++i) {
16294 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16295 for (int i = 0; i < 10; ++i)
16298 #pragma omp target
16299 #pragma omp teams
16300 #pragma omp distribute simd
16301 for (int i = 0; i < 10; ++i) {
16302 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16304 bar();
16307 #pragma omp target
16308 #pragma omp teams
16309 #pragma omp distribute simd
16310 for (int i = 0; i < 10; ++i) {
16311 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16313 bar();
16316 #pragma omp target
16317 #pragma omp teams
16318 #pragma omp distribute simd
16319 for (int i = 0; i < 10; ++i) {
16320 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16322 bar();
16325 #pragma omp target
16326 #pragma omp teams
16327 #pragma omp distribute simd
16328 for (int i = 0; i < 10; ++i) {
16329 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16331 bar();
16334 #pragma omp target
16335 #pragma omp teams
16336 #pragma omp distribute simd
16337 for (int i = 0; i < 10; ++i) {
16338 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16340 bar();
16343 #pragma omp target
16344 #pragma omp teams
16345 #pragma omp distribute simd
16346 for (int i = 0; i < 10; ++i) {
16347 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16349 #pragma omp single
16351 bar();
16355 #pragma omp target
16356 #pragma omp teams
16357 #pragma omp distribute simd
16358 for (int i = 0; i < 10; ++i) {
16359 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16360 for (int i = 0; i < 10; ++i)
16363 #pragma omp target
16364 #pragma omp teams
16365 #pragma omp distribute simd
16366 for (int i = 0; i < 10; ++i) {
16367 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16368 for (int i = 0; i < 10; ++i)
16371 #pragma omp target
16372 #pragma omp teams
16373 #pragma omp distribute simd
16374 for (int i = 0; i < 10; ++i) {
16375 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16377 bar();
16380 #pragma omp target
16381 #pragma omp teams
16382 #pragma omp distribute simd
16383 for (int i = 0; i < 10; ++i) {
16384 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16386 bar();
16389 #pragma omp target
16390 #pragma omp teams
16391 #pragma omp distribute simd
16392 for (int i = 0; i < 10; ++i) {
16393 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16394 bar();
16396 #pragma omp target
16397 #pragma omp teams
16398 #pragma omp distribute simd
16399 for (int i = 0; i < 10; ++i) {
16400 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16401 bar();
16403 #pragma omp target
16404 #pragma omp teams
16405 #pragma omp distribute simd
16406 for (int i = 0; i < 10; ++i) {
16407 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
16408 bar();
16410 #pragma omp target
16411 #pragma omp teams
16412 #pragma omp distribute simd
16413 for (int i = 0; i < 10; ++i) {
16414 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16415 bar();
16417 #pragma omp target
16418 #pragma omp teams
16419 #pragma omp distribute simd
16420 for (int i = 0; i < 10; ++i) {
16421 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16422 bar();
16424 #pragma omp target
16425 #pragma omp teams
16426 #pragma omp distribute simd
16427 for (int i = 0; i < 10; ++i) {
16428 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16429 bar();
16431 #pragma omp target
16432 #pragma omp teams
16433 #pragma omp distribute simd
16434 for (int i = 0; i < 10; ++i) {
16435 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
16436 ++a;
16438 #pragma omp target
16439 #pragma omp teams
16440 #pragma omp distribute simd
16441 for (int i = 0; i < 10; ++i) {
16442 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16443 ++a;
16445 #pragma omp target
16446 #pragma omp teams
16447 #pragma omp distribute simd
16448 for (int i = 0; i < 10; ++i) {
16449 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16450 ++a;
16452 #pragma omp target
16453 #pragma omp teams
16454 #pragma omp distribute simd
16455 for (int i = 0; i < 10; ++i) {
16456 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16457 ++a;
16459 #pragma omp target
16460 #pragma omp teams
16461 #pragma omp distribute simd
16462 for (int i = 0; i < 10; ++i) {
16463 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16464 ++a;
16466 #pragma omp target
16467 #pragma omp teams
16468 #pragma omp distribute simd
16469 for (int i = 0; i < 10; ++i) {
16470 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16471 ++a;
16473 #pragma omp target
16474 #pragma omp teams
16475 #pragma omp distribute simd
16476 for (int i = 0; i < 10; ++i) {
16477 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16478 ++a;
16480 #pragma omp target
16481 #pragma omp teams
16482 #pragma omp distribute simd
16483 for (int i = 0; i < 10; ++i) {
16484 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16485 for (int i = 0; i < 10; ++i)
16488 #pragma omp target
16489 #pragma omp teams
16490 #pragma omp distribute simd
16491 for (int i = 0; i < 10; ++i) {
16492 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16493 for (int i = 0; i < 10; ++i)
16496 #pragma omp target
16497 #pragma omp teams
16498 #pragma omp distribute simd
16499 for (int i = 0; i < 10; ++i) {
16500 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16501 for (int i = 0; i < 10; ++i)
16504 #pragma omp target
16505 #pragma omp teams
16506 #pragma omp distribute simd
16507 for (int i = 0; i < 10; ++i) {
16508 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16509 for (int i = 0; i < 10; ++i)
16512 #pragma omp target
16513 #pragma omp teams
16514 #pragma omp distribute simd
16515 for (int i = 0; i < 10; ++i) {
16516 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16517 for (int i = 0; i < 10; ++i)
16520 #pragma omp target
16521 #pragma omp teams
16522 #pragma omp distribute simd
16523 for (int i = 0; i < 10; ++i) {
16524 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16525 for (int i = 0; i < 10; ++i)
16528 #pragma omp target
16529 #pragma omp teams
16530 #pragma omp distribute simd
16531 for (int i = 0; i < 10; ++i) {
16532 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16533 a++;
16535 #pragma omp target
16536 #pragma omp teams
16537 #pragma omp distribute simd
16538 for (int i = 0; i < 10; ++i) {
16539 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16540 for (int i = 0; i < 10; ++i)
16543 #pragma omp target
16544 #pragma omp teams
16545 #pragma omp distribute simd
16546 for (int i = 0; i < 10; ++i) {
16547 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16548 for (int i = 0; i < 10; ++i)
16551 #pragma omp target
16552 #pragma omp teams
16553 #pragma omp distribute simd
16554 for (int i = 0; i < 10; ++i) {
16555 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16556 for (int i = 0; i < 10; ++i)
16559 #pragma omp target
16560 #pragma omp teams
16561 #pragma omp distribute simd
16562 for (int i = 0; i < 10; ++i) {
16563 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16564 for (int i = 0; i < 10; ++i)
16568 // TARGET SIMD DIRECTIVE
16569 #pragma omp target simd
16570 for (int i = 0; i < 10; ++i) {
16571 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16572 for (int i = 0; i < 10; ++i)
16575 #pragma omp target simd
16576 for (int i = 0; i < 10; ++i) {
16577 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16578 for (int i = 0; i < 10; ++i)
16581 #pragma omp target simd
16582 for (int i = 0; i < 10; ++i) {
16583 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16584 for (int i = 0; i < 10; ++i)
16587 #pragma omp target simd
16588 for (int i = 0; i < 10; ++i) {
16589 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
16590 for (int i = 0; i < 10; ++i)
16593 #pragma omp target simd
16594 for (int i = 0; i < 10; ++i) {
16595 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16596 for (int i = 0; i < 10; ++i)
16599 #pragma omp target simd
16600 for (int i = 0; i < 10; ++i) {
16601 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16602 for (int i = 0; i < 10; ++i)
16605 #pragma omp target simd
16606 for (int i = 0; i < 10; ++i) {
16607 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16609 bar();
16612 #pragma omp target simd
16613 for (int i = 0; i < 10; ++i) {
16614 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16616 bar();
16619 #pragma omp target simd
16620 for (int i = 0; i < 10; ++i) {
16621 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16623 bar();
16626 #pragma omp target simd
16627 for (int i = 0; i < 10; ++i) {
16628 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16630 bar();
16633 #pragma omp target simd
16634 for (int i = 0; i < 10; ++i) {
16635 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16637 bar();
16640 #pragma omp target simd
16641 for (int i = 0; i < 10; ++i) {
16642 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16644 #pragma omp single
16646 bar();
16650 #pragma omp target simd
16651 for (int i = 0; i < 10; ++i) {
16652 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16653 for (int i = 0; i < 10; ++i)
16656 #pragma omp target simd
16657 for (int i = 0; i < 10; ++i) {
16658 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16659 for (int i = 0; i < 10; ++i)
16662 #pragma omp target simd
16663 for (int i = 0; i < 10; ++i) {
16664 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16666 bar();
16669 #pragma omp target simd
16670 for (int i = 0; i < 10; ++i) {
16671 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16673 bar();
16676 #pragma omp target simd
16677 for (int i = 0; i < 10; ++i) {
16678 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16679 bar();
16681 #pragma omp target simd
16682 for (int i = 0; i < 10; ++i) {
16683 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16684 bar();
16686 #pragma omp target simd
16687 for (int i = 0; i < 10; ++i) {
16688 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
16689 bar();
16691 #pragma omp target simd
16692 for (int i = 0; i < 10; ++i) {
16693 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16694 bar();
16696 #pragma omp target simd
16697 for (int i = 0; i < 10; ++i) {
16698 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16699 bar();
16701 #pragma omp target simd
16702 for (int i = 0; i < 10; ++i) {
16703 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16704 bar();
16706 #pragma omp target simd
16707 for (int i = 0; i < 10; ++i) {
16708 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
16709 ++a;
16711 #pragma omp target simd
16712 for (int i = 0; i < 10; ++i) {
16713 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16714 ++a;
16716 #pragma omp target simd
16717 for (int i = 0; i < 10; ++i) {
16718 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16719 ++a;
16721 #pragma omp target simd
16722 for (int i = 0; i < 10; ++i) {
16723 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16724 ++a;
16726 #pragma omp target simd
16727 for (int i = 0; i < 10; ++i) {
16728 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16729 ++a;
16731 #pragma omp target simd
16732 for (int i = 0; i < 10; ++i) {
16733 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16734 ++a;
16736 #pragma omp target simd
16737 for (int i = 0; i < 10; ++i) {
16738 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16739 ++a;
16741 #pragma omp target simd
16742 for (int i = 0; i < 10; ++i) {
16743 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16744 for (int i = 0; i < 10; ++i)
16747 #pragma omp target simd
16748 for (int i = 0; i < 10; ++i) {
16749 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16750 for (int i = 0; i < 10; ++i)
16753 #pragma omp target simd
16754 for (int i = 0; i < 10; ++i) {
16755 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16756 for (int i = 0; i < 10; ++i)
16759 #pragma omp target simd
16760 for (int i = 0; i < 10; ++i) {
16761 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16762 for (int i = 0; i < 10; ++i)
16765 #pragma omp target simd
16766 for (int i = 0; i < 10; ++i) {
16767 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16768 for (int i = 0; i < 10; ++i)
16771 #pragma omp target simd
16772 for (int i = 0; i < 10; ++i) {
16773 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16774 for (int i = 0; i < 10; ++i)
16777 #pragma omp target simd
16778 for (int i = 0; i < 10; ++i) {
16779 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16780 a++;
16782 #pragma omp target simd
16783 for (int i = 0; i < 10; ++i) {
16784 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16785 for (int i = 0; i < 10; ++i)
16788 #pragma omp target simd
16789 for (int i = 0; i < 10; ++i) {
16790 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16791 for (int i = 0; i < 10; ++i)
16794 #pragma omp target simd
16795 for (int i = 0; i < 10; ++i) {
16796 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16797 for (int i = 0; i < 10; ++i)
16800 #pragma omp target simd
16801 for (int i = 0; i < 10; ++i) {
16802 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
16803 for (int i = 0; i < 10; ++i)
16807 // TEAMS DISTRIBUTE DIRECTIVE
16808 #pragma omp teams distribute // omp45-error {{orphaned 'omp teams distribute' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
16809 for (int i = 0; i < 10; ++i)
16811 #pragma omp target
16812 #pragma omp teams distribute
16813 for (int i = 0; i < 10; ++i) {
16814 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
16815 for (int i = 0; i < 10; ++i)
16818 #pragma omp target
16819 #pragma omp teams distribute
16820 for (int i = 0; i < 10; ++i) {
16821 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
16822 for (int i = 0; i < 10; ++i)
16825 #pragma omp target
16826 #pragma omp teams distribute
16827 for (int i = 0; i < 10; ++i) {
16828 #pragma omp for // OK
16829 for (int i = 0; i < 10; ++i)
16832 #pragma omp target
16833 #pragma omp teams distribute
16834 for (int i = 0; i < 10; ++i) {
16835 #pragma omp simd // OK
16836 for (int i = 0; i < 10; ++i)
16839 #pragma omp target
16840 #pragma omp teams distribute
16841 for (int i = 0; i < 10; ++i) {
16842 #pragma omp for simd // OK
16843 for (int i = 0; i < 10; ++i)
16846 #pragma omp target
16847 #pragma omp teams distribute
16848 for (int i = 0; i < 10; ++i) {
16849 #pragma omp parallel // OK
16850 for (int i = 0; i < 10; ++i)
16853 #pragma omp target
16854 #pragma omp teams distribute
16855 for (int i = 0; i < 10; ++i) {
16856 #pragma omp sections // OK
16858 bar();
16861 #pragma omp target
16862 #pragma omp teams distribute
16863 for (int i = 0; i < 10; ++i) {
16864 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams distribute region}}
16866 bar();
16869 #pragma omp target
16870 #pragma omp teams distribute
16871 for (int i = 0; i < 10; ++i) {
16872 #pragma omp single // OK
16874 bar();
16877 #pragma omp target
16878 #pragma omp teams distribute
16879 for (int i = 0; i < 10; ++i) {
16880 #pragma omp master // OK
16882 bar();
16885 #pragma omp target
16886 #pragma omp teams distribute
16887 for (int i = 0; i < 10; ++i) {
16888 #pragma omp critical // OK
16890 bar();
16893 #pragma omp target
16894 #pragma omp teams distribute
16895 for (int i = 0; i < 10; ++i) {
16896 #pragma omp parallel // OK
16898 #pragma omp single
16900 bar();
16904 #pragma omp target
16905 #pragma omp teams distribute
16906 for (int i = 0; i < 10; ++i) {
16907 #pragma omp parallel for // OK
16908 for (int i = 0; i < 10; ++i)
16911 #pragma omp target
16912 #pragma omp teams distribute
16913 for (int i = 0; i < 10; ++i) {
16914 #pragma omp parallel for simd // OK
16915 for (int i = 0; i < 10; ++i)
16918 #pragma omp target
16919 #pragma omp teams distribute
16920 for (int i = 0; i < 10; ++i) {
16921 #pragma omp parallel sections // OK
16923 bar();
16926 #pragma omp target
16927 #pragma omp teams distribute
16928 for (int i = 0; i < 10; ++i) {
16929 #pragma omp task // OK
16931 bar();
16934 #pragma omp target
16935 #pragma omp teams distribute
16936 for (int i = 0; i < 10; ++i) {
16937 #pragma omp taskyield // OK
16938 bar();
16940 #pragma omp target
16941 #pragma omp teams distribute
16942 for (int i = 0; i < 10; ++i) {
16943 #pragma omp barrier // OK
16944 bar();
16946 #pragma omp target
16947 #pragma omp teams distribute
16948 for (int i = 0; i < 10; ++i) {
16949 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
16950 bar();
16952 #pragma omp target
16953 #pragma omp teams distribute
16954 for (int i = 0; i < 10; ++i) {
16955 #pragma omp taskwait // OK
16956 bar();
16958 #pragma omp target
16959 #pragma omp teams distribute
16960 for (int i = 0; i < 10; ++i) {
16961 #pragma omp flush // OK
16962 bar();
16964 #pragma omp target
16965 #pragma omp teams distribute
16966 for (int i = 0; i < 10; ++i) {
16967 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
16968 bar();
16970 #pragma omp target
16971 #pragma omp teams distribute
16972 for (int i = 0; i < 10; ++i) {
16973 #pragma omp atomic // OK
16974 ++a;
16976 #pragma omp target
16977 #pragma omp teams distribute
16978 for (int i = 0; i < 10; ++i) {
16979 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
16980 ++a;
16982 #pragma omp target
16983 #pragma omp teams distribute
16984 for (int i = 0; i < 10; ++i) {
16985 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
16986 ++a;
16988 #pragma omp target
16989 #pragma omp teams distribute
16990 for (int i = 0; i < 10; ++i) {
16991 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
16992 for (int i = 0; i < 10; ++i)
16995 #pragma omp target
16996 #pragma omp teams distribute
16997 for (int i = 0; i < 10; ++i) {
16998 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
16999 ++a;
17001 #pragma omp target
17002 #pragma omp teams distribute
17003 for (int i = 0; i < 10; ++i) {
17004 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
17005 ++a;
17007 #pragma omp target
17008 #pragma omp teams distribute
17009 for (int i = 0; i < 10; ++i) {
17010 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
17011 ++a;
17013 #pragma omp target
17014 #pragma omp teams distribute
17015 for (int i = 0; i < 10; ++i) {
17016 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
17017 ++a;
17019 #pragma omp target
17020 #pragma omp teams distribute
17021 for (int i = 0; i < 10; ++i) {
17022 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
17023 for (int i = 0; i < 10; ++i)
17024 ++a;
17026 #pragma omp target
17027 #pragma omp teams distribute
17028 for (int i = 0; i < 10; ++i) {
17029 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
17030 for (int i = 0; i < 10; ++i)
17031 ++a;
17033 #pragma omp target
17034 #pragma omp teams distribute
17035 for (int i = 0; i < 10; ++i) {
17036 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
17037 for (int i = 0; i < 10; ++i)
17038 ++a;
17040 #pragma omp target
17041 #pragma omp teams distribute
17042 for (int i = 0; i < 10; ++i) {
17043 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
17044 for (int i = 0; i < 10; ++i)
17045 ++a;
17047 #pragma omp target
17048 #pragma omp teams distribute
17049 for (int i = 0; i < 10; ++i) {
17050 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
17051 for (int i = 0; i < 10; ++i)
17052 ++a;
17054 #pragma omp target
17055 #pragma omp teams distribute
17056 for (int i = 0; i < 10; ++i) {
17057 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
17058 for (int i = 0; i < 10; ++i)
17059 ++a;
17061 #pragma omp target
17062 #pragma omp teams distribute
17063 for (int i = 0; i < 10; ++i) {
17064 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
17065 ++a;
17067 #pragma omp target
17068 #pragma omp teams distribute
17069 for (int i = 0; i < 10; ++i) {
17070 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
17071 for (int i = 0; i < 10; ++i)
17072 ++a;
17074 #pragma omp target
17075 #pragma omp teams distribute
17076 for (int i = 0; i < 10; ++i) {
17077 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
17078 for (int i = 0; i < 10; ++i)
17079 ++a;
17081 #pragma omp target
17082 #pragma omp teams distribute
17083 for (int i = 0; i < 10; ++i) {
17084 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
17085 for (int i = 0; i < 10; ++i)
17086 ++a;
17088 #pragma omp target
17089 #pragma omp teams distribute
17090 for (int i = 0; i < 10; ++i) {
17091 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
17092 for (int i = 0; i < 10; ++i)
17093 ++a;
17096 // TEAMS DISTRIBUTE SIMD DIRECTIVE
17097 #pragma omp teams distribute simd // omp45-error {{orphaned 'omp teams distribute simd' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
17098 for (int i = 0; i < 10; ++i)
17100 #pragma omp target
17101 #pragma omp teams distribute simd
17102 for (int i = 0; i < 10; ++i) {
17103 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17104 for (int i = 0; i < 10; ++i)
17107 #pragma omp target
17108 #pragma omp teams distribute simd
17109 for (int i = 0; i < 10; ++i) {
17110 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17111 for (int i = 0; i < 10; ++i)
17114 #pragma omp target
17115 #pragma omp teams distribute simd
17116 for (int i = 0; i < 10; ++i) {
17117 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17118 for (int i = 0; i < 10; ++i)
17121 #pragma omp target
17122 #pragma omp teams distribute simd
17123 for (int i = 0; i < 10; ++i) {
17124 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
17125 for (int i = 0; i < 10; ++i)
17128 #pragma omp target
17129 #pragma omp teams distribute simd
17130 for (int i = 0; i < 10; ++i) {
17131 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17132 for (int i = 0; i < 10; ++i)
17135 #pragma omp target
17136 #pragma omp teams distribute simd
17137 for (int i = 0; i < 10; ++i) {
17138 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17139 for (int i = 0; i < 10; ++i)
17142 #pragma omp target
17143 #pragma omp teams distribute simd
17144 for (int i = 0; i < 10; ++i) {
17145 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17147 bar();
17150 #pragma omp target
17151 #pragma omp teams distribute simd
17152 for (int i = 0; i < 10; ++i) {
17153 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17155 bar();
17158 #pragma omp target
17159 #pragma omp teams distribute simd
17160 for (int i = 0; i < 10; ++i) {
17161 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17163 bar();
17166 #pragma omp target
17167 #pragma omp teams distribute simd
17168 for (int i = 0; i < 10; ++i) {
17169 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17171 bar();
17174 #pragma omp target
17175 #pragma omp teams distribute simd
17176 for (int i = 0; i < 10; ++i) {
17177 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17179 bar();
17182 #pragma omp target
17183 #pragma omp teams distribute simd
17184 for (int i = 0; i < 10; ++i) {
17185 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17187 #pragma omp single
17189 bar();
17193 #pragma omp target
17194 #pragma omp teams distribute simd
17195 for (int i = 0; i < 10; ++i) {
17196 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17197 for (int i = 0; i < 10; ++i)
17200 #pragma omp target
17201 #pragma omp teams distribute simd
17202 for (int i = 0; i < 10; ++i) {
17203 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17204 for (int i = 0; i < 10; ++i)
17207 #pragma omp target
17208 #pragma omp teams distribute simd
17209 for (int i = 0; i < 10; ++i) {
17210 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17212 bar();
17215 #pragma omp target
17216 #pragma omp teams distribute simd
17217 for (int i = 0; i < 10; ++i) {
17218 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17220 bar();
17223 #pragma omp target
17224 #pragma omp teams distribute simd
17225 for (int i = 0; i < 10; ++i) {
17226 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17227 bar();
17229 #pragma omp target
17230 #pragma omp teams distribute simd
17231 for (int i = 0; i < 10; ++i) {
17232 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17233 bar();
17235 #pragma omp target
17236 #pragma omp teams distribute simd
17237 for (int i = 0; i < 10; ++i) {
17238 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
17239 bar();
17241 #pragma omp target
17242 #pragma omp teams distribute simd
17243 for (int i = 0; i < 10; ++i) {
17244 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17245 bar();
17247 #pragma omp target
17248 #pragma omp teams distribute simd
17249 for (int i = 0; i < 10; ++i) {
17250 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17251 bar();
17253 #pragma omp target
17254 #pragma omp teams distribute simd
17255 for (int i = 0; i < 10; ++i) {
17256 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17257 bar();
17259 #pragma omp target
17260 #pragma omp teams distribute simd
17261 for (int i = 0; i < 10; ++i) {
17262 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
17263 ++a;
17265 #pragma omp target
17266 #pragma omp teams distribute simd
17267 for (int i = 0; i < 10; ++i) {
17268 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17269 ++a;
17271 #pragma omp target
17272 #pragma omp teams distribute simd
17273 for (int i = 0; i < 10; ++i) {
17274 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17275 ++a;
17277 #pragma omp target
17278 #pragma omp teams distribute simd
17279 for (int i = 0; i < 10; ++i) {
17280 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17281 for (int i = 0; i < 10; ++i)
17284 #pragma omp target
17285 #pragma omp teams distribute simd
17286 for (int i = 0; i < 10; ++i) {
17287 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17288 ++a;
17290 #pragma omp target
17291 #pragma omp teams distribute simd
17292 for (int i = 0; i < 10; ++i) {
17293 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17294 ++a;
17296 #pragma omp target
17297 #pragma omp teams distribute simd
17298 for (int i = 0; i < 10; ++i) {
17299 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17300 ++a;
17302 #pragma omp target
17303 #pragma omp teams distribute simd
17304 for (int i = 0; i < 10; ++i) {
17305 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17306 ++a;
17308 #pragma omp target
17309 #pragma omp teams distribute simd
17310 for (int i = 0; i < 10; ++i) {
17311 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17312 for (int i = 0; i < 10; ++i)
17313 ++a;
17315 #pragma omp target
17316 #pragma omp teams distribute simd
17317 for (int i = 0; i < 10; ++i) {
17318 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17319 for (int i = 0; i < 10; ++i)
17320 ++a;
17322 #pragma omp target
17323 #pragma omp teams distribute simd
17324 for (int i = 0; i < 10; ++i) {
17325 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17326 for (int i = 0; i < 10; ++i)
17327 ++a;
17329 #pragma omp target
17330 #pragma omp teams distribute simd
17331 for (int i = 0; i < 10; ++i) {
17332 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17333 for (int i = 0; i < 10; ++i)
17334 ++a;
17336 #pragma omp target
17337 #pragma omp teams distribute simd
17338 for (int i = 0; i < 10; ++i) {
17339 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17340 for (int i = 0; i < 10; ++i)
17341 ++a;
17343 #pragma omp target
17344 #pragma omp teams distribute simd
17345 for (int i = 0; i < 10; ++i) {
17346 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17347 for (int i = 0; i < 10; ++i)
17348 ++a;
17350 #pragma omp target
17351 #pragma omp teams distribute simd
17352 for (int i = 0; i < 10; ++i) {
17353 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17354 ++a;
17356 #pragma omp target
17357 #pragma omp teams distribute simd
17358 for (int i = 0; i < 10; ++i) {
17359 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17360 for (int i = 0; i < 10; ++i)
17361 ++a;
17363 #pragma omp target
17364 #pragma omp teams distribute simd
17365 for (int i = 0; i < 10; ++i) {
17366 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17367 for (int i = 0; i < 10; ++i)
17368 ++a;
17370 #pragma omp target
17371 #pragma omp teams distribute simd
17372 for (int i = 0; i < 10; ++i) {
17373 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17374 for (int i = 0; i < 10; ++i)
17375 ++a;
17377 #pragma omp target
17378 #pragma omp teams distribute simd
17379 for (int i = 0; i < 10; ++i) {
17380 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17381 for (int i = 0; i < 10; ++i)
17382 ++a;
17385 // TEAMS DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
17386 #pragma omp teams distribute parallel for simd // omp45-error {{orphaned 'omp teams distribute parallel for simd' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
17387 for (int i = 0; i < 10; ++i)
17389 #pragma omp target
17390 #pragma omp teams distribute parallel for simd
17391 for (int i = 0; i < 10; ++i) {
17392 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17393 for (int i = 0; i < 10; ++i)
17396 #pragma omp target
17397 #pragma omp teams distribute parallel for simd
17398 for (int i = 0; i < 10; ++i) {
17399 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17400 for (int i = 0; i < 10; ++i)
17403 #pragma omp target
17404 #pragma omp teams distribute parallel for simd
17405 for (int i = 0; i < 10; ++i) {
17406 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17407 for (int i = 0; i < 10; ++i)
17410 #pragma omp target
17411 #pragma omp teams distribute parallel for simd
17412 for (int i = 0; i < 10; ++i) {
17413 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
17414 for (int i = 0; i < 10; ++i)
17417 #pragma omp target
17418 #pragma omp teams distribute parallel for simd
17419 for (int i = 0; i < 10; ++i) {
17420 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17421 for (int i = 0; i < 10; ++i)
17424 #pragma omp target
17425 #pragma omp teams distribute parallel for simd
17426 for (int i = 0; i < 10; ++i) {
17427 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17428 for (int i = 0; i < 10; ++i)
17431 #pragma omp target
17432 #pragma omp teams distribute parallel for simd
17433 for (int i = 0; i < 10; ++i) {
17434 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17436 bar();
17439 #pragma omp target
17440 #pragma omp teams distribute parallel for simd
17441 for (int i = 0; i < 10; ++i) {
17442 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17444 bar();
17447 #pragma omp target
17448 #pragma omp teams distribute parallel for simd
17449 for (int i = 0; i < 10; ++i) {
17450 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17452 bar();
17455 #pragma omp target
17456 #pragma omp teams distribute parallel for simd
17457 for (int i = 0; i < 10; ++i) {
17458 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17460 bar();
17463 #pragma omp target
17464 #pragma omp teams distribute parallel for simd
17465 for (int i = 0; i < 10; ++i) {
17466 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17468 bar();
17471 #pragma omp target
17472 #pragma omp teams distribute parallel for simd
17473 for (int i = 0; i < 10; ++i) {
17474 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17476 #pragma omp single
17478 bar();
17482 #pragma omp target
17483 #pragma omp teams distribute parallel for simd
17484 for (int i = 0; i < 10; ++i) {
17485 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17486 for (int i = 0; i < 10; ++i)
17489 #pragma omp target
17490 #pragma omp teams distribute parallel for simd
17491 for (int i = 0; i < 10; ++i) {
17492 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17493 for (int i = 0; i < 10; ++i)
17496 #pragma omp target
17497 #pragma omp teams distribute parallel for simd
17498 for (int i = 0; i < 10; ++i) {
17499 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17501 bar();
17504 #pragma omp target
17505 #pragma omp teams distribute parallel for simd
17506 for (int i = 0; i < 10; ++i) {
17507 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17509 bar();
17512 #pragma omp target
17513 #pragma omp teams distribute parallel for simd
17514 for (int i = 0; i < 10; ++i) {
17515 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17516 bar();
17518 #pragma omp target
17519 #pragma omp teams distribute parallel for simd
17520 for (int i = 0; i < 10; ++i) {
17521 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17522 bar();
17524 #pragma omp target
17525 #pragma omp teams distribute parallel for simd
17526 for (int i = 0; i < 10; ++i) {
17527 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
17528 bar();
17530 #pragma omp target
17531 #pragma omp teams distribute parallel for simd
17532 for (int i = 0; i < 10; ++i) {
17533 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17534 bar();
17536 #pragma omp target
17537 #pragma omp teams distribute parallel for simd
17538 for (int i = 0; i < 10; ++i) {
17539 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17540 bar();
17542 #pragma omp target
17543 #pragma omp teams distribute parallel for simd
17544 for (int i = 0; i < 10; ++i) {
17545 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17546 bar();
17548 #pragma omp target
17549 #pragma omp teams distribute parallel for simd
17550 for (int i = 0; i < 10; ++i) {
17551 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
17552 ++a;
17554 #pragma omp target
17555 #pragma omp teams distribute parallel for simd
17556 for (int i = 0; i < 10; ++i) {
17557 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17558 ++a;
17560 #pragma omp target
17561 #pragma omp teams distribute parallel for simd
17562 for (int i = 0; i < 10; ++i) {
17563 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17564 ++a;
17566 #pragma omp target
17567 #pragma omp teams distribute parallel for simd
17568 for (int i = 0; i < 10; ++i) {
17569 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17570 for (int i = 0; i < 10; ++i)
17573 #pragma omp target
17574 #pragma omp teams distribute parallel for simd
17575 for (int i = 0; i < 10; ++i) {
17576 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17577 ++a;
17579 #pragma omp target
17580 #pragma omp teams distribute parallel for simd
17581 for (int i = 0; i < 10; ++i) {
17582 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17583 ++a;
17585 #pragma omp target
17586 #pragma omp teams distribute parallel for simd
17587 for (int i = 0; i < 10; ++i) {
17588 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17589 ++a;
17591 #pragma omp target
17592 #pragma omp teams distribute parallel for simd
17593 for (int i = 0; i < 10; ++i) {
17594 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17595 ++a;
17597 #pragma omp target
17598 #pragma omp teams distribute parallel for simd
17599 for (int i = 0; i < 10; ++i) {
17600 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17601 for (int i = 0; i < 10; ++i)
17602 ++a;
17604 #pragma omp target
17605 #pragma omp teams distribute parallel for simd
17606 for (int i = 0; i < 10; ++i) {
17607 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17608 for (int i = 0; i < 10; ++i)
17609 ++a;
17611 #pragma omp target
17612 #pragma omp teams distribute parallel for simd
17613 for (int i = 0; i < 10; ++i) {
17614 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17615 for (int i = 0; i < 10; ++i)
17616 ++a;
17618 #pragma omp target
17619 #pragma omp teams distribute parallel for simd
17620 for (int i = 0; i < 10; ++i) {
17621 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17622 for (int i = 0; i < 10; ++i)
17623 ++a;
17625 #pragma omp target
17626 #pragma omp teams distribute parallel for simd
17627 for (int i = 0; i < 10; ++i) {
17628 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17629 for (int i = 0; i < 10; ++i)
17630 ++a;
17632 #pragma omp target
17633 #pragma omp teams distribute parallel for simd
17634 for (int i = 0; i < 10; ++i) {
17635 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17636 for (int i = 0; i < 10; ++i)
17637 ++a;
17639 #pragma omp target
17640 #pragma omp teams distribute parallel for simd
17641 for (int i = 0; i < 10; ++i) {
17642 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17643 ++a;
17645 #pragma omp target
17646 #pragma omp teams distribute parallel for simd
17647 for (int i = 0; i < 10; ++i) {
17648 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17649 for (int i = 0; i < 10; ++i)
17650 ++a;
17652 #pragma omp target
17653 #pragma omp teams distribute parallel for simd
17654 for (int i = 0; i < 10; ++i) {
17655 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17656 for (int i = 0; i < 10; ++i)
17657 ++a;
17659 #pragma omp target
17660 #pragma omp teams distribute parallel for simd
17661 for (int i = 0; i < 10; ++i) {
17662 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17663 for (int i = 0; i < 10; ++i)
17664 ++a;
17666 #pragma omp target
17667 #pragma omp teams distribute parallel for simd
17668 for (int i = 0; i < 10; ++i) {
17669 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
17670 for (int i = 0; i < 10; ++i)
17671 ++a;
17674 // TEAMS DISTRIBUTE PARALLEL FOR DIRECTIVE
17675 #pragma omp teams distribute parallel for // omp45-error {{orphaned 'omp teams distribute parallel for' directives are prohibited; perhaps you forget to enclose the directive into a target region?}}
17676 for (int i = 0; i < 10; ++i)
17678 #pragma omp target
17679 #pragma omp teams distribute parallel for
17680 for (int i = 0; i < 10; ++i) {
17681 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
17682 for (int i = 0; i < 10; ++i)
17685 #pragma omp target
17686 #pragma omp teams distribute parallel for
17687 for (int i = 0; i < 10; ++i) {
17688 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
17689 for (int i = 0; i < 10; ++i)
17692 #pragma omp target
17693 #pragma omp teams distribute parallel for
17694 for (int i = 0; i < 10; ++i) {
17695 #pragma omp for // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
17696 for (int i = 0; i < 10; ++i)
17699 #pragma omp target
17700 #pragma omp teams distribute parallel for
17701 for (int i = 0; i < 10; ++i) {
17702 #pragma omp simd // OK
17703 for (int i = 0; i < 10; ++i)
17706 #pragma omp target
17707 #pragma omp teams distribute parallel for
17708 for (int i = 0; i < 10; ++i) {
17709 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
17710 for (int i = 0; i < 10; ++i)
17713 #pragma omp target
17714 #pragma omp teams distribute parallel for
17715 for (int i = 0; i < 10; ++i) {
17716 #pragma omp parallel // OK
17717 for (int i = 0; i < 10; ++i)
17720 #pragma omp target
17721 #pragma omp teams distribute parallel for
17722 for (int i = 0; i < 10; ++i) {
17723 #pragma omp sections // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
17725 bar();
17728 #pragma omp target
17729 #pragma omp teams distribute parallel for
17730 for (int i = 0; i < 10; ++i) {
17731 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a teams distribute parallel for region}}
17733 bar();
17736 #pragma omp target
17737 #pragma omp teams distribute parallel for
17738 for (int i = 0; i < 10; ++i) {
17739 #pragma omp single // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
17741 bar();
17744 #pragma omp target
17745 #pragma omp teams distribute parallel for
17746 for (int i = 0; i < 10; ++i) {
17747 #pragma omp master // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
17749 bar();
17752 #pragma omp target
17753 #pragma omp teams distribute parallel for
17754 for (int i = 0; i < 10; ++i) {
17755 #pragma omp critical // OK
17757 bar();
17760 #pragma omp target
17761 #pragma omp teams distribute parallel for
17762 for (int i = 0; i < 10; ++i) {
17763 #pragma omp parallel // OK
17765 #pragma omp single
17767 bar();
17771 #pragma omp target
17772 #pragma omp teams distribute parallel for
17773 for (int i = 0; i < 10; ++i) {
17774 #pragma omp parallel for // OK
17775 for (int i = 0; i < 10; ++i)
17778 #pragma omp target
17779 #pragma omp teams distribute parallel for
17780 for (int i = 0; i < 10; ++i) {
17781 #pragma omp parallel for simd // OK
17782 for (int i = 0; i < 10; ++i)
17785 #pragma omp target
17786 #pragma omp teams distribute parallel for
17787 for (int i = 0; i < 10; ++i) {
17788 #pragma omp parallel sections // OK
17790 bar();
17793 #pragma omp target
17794 #pragma omp teams distribute parallel for
17795 for (int i = 0; i < 10; ++i) {
17796 #pragma omp task // OK
17798 bar();
17801 #pragma omp target
17802 #pragma omp teams distribute parallel for
17803 for (int i = 0; i < 10; ++i) {
17804 #pragma omp taskyield // OK
17805 bar();
17807 #pragma omp target
17808 #pragma omp teams distribute parallel for
17809 for (int i = 0; i < 10; ++i) {
17810 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
17811 bar();
17813 #pragma omp target
17814 #pragma omp teams distribute parallel for
17815 for (int i = 0; i < 10; ++i) {
17816 #pragma omp scan // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
17817 bar();
17819 #pragma omp target
17820 #pragma omp teams distribute parallel for
17821 for (int i = 0; i < 10; ++i) {
17822 #pragma omp taskwait // OK
17823 bar();
17825 #pragma omp target
17826 #pragma omp teams distribute parallel for
17827 for (int i = 0; i < 10; ++i) {
17828 #pragma omp flush // OK
17829 bar();
17831 #pragma omp target
17832 #pragma omp teams distribute parallel for
17833 for (int i = 0; i < 10; ++i) {
17834 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
17835 bar();
17837 #pragma omp target
17838 #pragma omp teams distribute parallel for
17839 for (int i = 0; i < 10; ++i) {
17840 #pragma omp atomic // OK
17841 ++a;
17843 #pragma omp target
17844 #pragma omp teams distribute parallel for
17845 for (int i = 0; i < 10; ++i) {
17846 #pragma omp target // expected-error {{region cannot be nested inside 'target' region}}
17847 ++a;
17849 #pragma omp target
17850 #pragma omp teams distribute parallel for
17851 for (int i = 0; i < 10; ++i) {
17852 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}
17853 ++a;
17855 #pragma omp target
17856 #pragma omp teams distribute parallel for
17857 for (int i = 0; i < 10; ++i) {
17858 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target' region}}
17859 for (int i = 0; i < 10; ++i)
17862 #pragma omp target
17863 #pragma omp teams distribute parallel for
17864 for (int i = 0; i < 10; ++i) {
17865 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}
17866 ++a;
17868 #pragma omp target
17869 #pragma omp teams distribute parallel for
17870 for (int i = 0; i < 10; ++i) {
17871 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}
17872 ++a;
17874 #pragma omp target
17875 #pragma omp teams distribute parallel for
17876 for (int i = 0; i < 10; ++i) {
17877 #pragma omp teams // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
17878 ++a;
17880 #pragma omp target
17881 #pragma omp teams distribute parallel for
17882 for (int i = 0; i < 10; ++i) {
17883 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target' region}}
17884 ++a;
17886 #pragma omp target
17887 #pragma omp teams distribute parallel for
17888 for (int i = 0; i < 10; ++i) {
17889 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
17890 for (int i = 0; i < 10; ++i)
17891 ++a;
17893 #pragma omp target
17894 #pragma omp teams distribute parallel for
17895 for (int i = 0; i < 10; ++i) {
17896 #pragma omp target simd // expected-error {{region cannot be nested inside 'target' region}}
17897 for (int i = 0; i < 10; ++i)
17898 ++a;
17900 #pragma omp target
17901 #pragma omp teams distribute parallel for
17902 for (int i = 0; i < 10; ++i) {
17903 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
17904 for (int i = 0; i < 10; ++i)
17905 ++a;
17907 #pragma omp target
17908 #pragma omp teams distribute parallel for
17909 for (int i = 0; i < 10; ++i) {
17910 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
17911 for (int i = 0; i < 10; ++i)
17912 ++a;
17914 #pragma omp target
17915 #pragma omp teams distribute parallel for
17916 for (int i = 0; i < 10; ++i) {
17917 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
17918 for (int i = 0; i < 10; ++i)
17919 ++a;
17921 #pragma omp target
17922 #pragma omp teams distribute parallel for
17923 for (int i = 0; i < 10; ++i) {
17924 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
17925 for (int i = 0; i < 10; ++i)
17926 ++a;
17928 #pragma omp target
17929 #pragma omp teams distribute parallel for
17930 for (int i = 0; i < 10; ++i) {
17931 #pragma omp target teams // expected-error {{region cannot be nested inside 'target' region}}
17932 ++a;
17934 #pragma omp target
17935 #pragma omp teams distribute parallel for
17936 for (int i = 0; i < 10; ++i) {
17937 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target' region}}
17938 for (int i = 0; i < 10; ++i)
17939 ++a;
17941 #pragma omp target
17942 #pragma omp teams distribute parallel for
17943 for (int i = 0; i < 10; ++i) {
17944 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target' region}}
17945 for (int i = 0; i < 10; ++i)
17946 ++a;
17948 #pragma omp target
17949 #pragma omp teams distribute parallel for
17950 for (int i = 0; i < 10; ++i) {
17951 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target' region}}
17952 for (int i = 0; i < 10; ++i)
17953 ++a;
17955 #pragma omp target
17956 #pragma omp teams distribute parallel for
17957 for (int i = 0; i < 10; ++i) {
17958 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target' region}}
17959 for (int i = 0; i < 10; ++i)
17960 ++a;
17963 // TARGET TEAMS DIRECTIVE
17964 #pragma omp target teams
17965 #pragma omp parallel
17966 bar();
17967 #pragma omp target teams
17968 #pragma omp for // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
17969 for (int i = 0; i < 10; ++i)
17971 #pragma omp target teams
17972 #pragma omp simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp simd' directive into a parallel region?}}
17973 for (int i = 0; i < 10; ++i)
17975 #pragma omp target teams
17976 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
17977 for (int i = 0; i < 10; ++i)
17979 #pragma omp target teams
17980 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
17982 bar();
17984 #pragma omp target teams
17985 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams region}}
17987 bar();
17989 #pragma omp target teams
17990 #pragma omp single // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
17991 bar();
17993 #pragma omp target teams
17994 #pragma omp master // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp master' directive into a parallel region?}}
17996 bar();
17998 #pragma omp target teams
17999 #pragma omp critical // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp critical' directive into a parallel region?}}
18001 bar();
18003 #pragma omp target teams
18004 #pragma omp parallel for
18005 for (int i = 0; i < 10; ++i)
18007 #pragma omp target teams
18008 #pragma omp parallel for simd
18009 for (int i = 0; i < 10; ++i)
18011 #pragma omp target teams
18012 #pragma omp parallel sections
18014 bar();
18016 #pragma omp target teams
18017 #pragma omp task // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp task' directive into a parallel region?}}
18019 bar();
18021 #pragma omp target teams
18023 #pragma omp taskyield // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskyield' directive into a parallel region?}}
18024 bar();
18026 #pragma omp target teams
18028 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp barrier' directive into a parallel region?}}
18029 bar();
18031 #pragma omp target teams
18033 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
18034 bar();
18036 #pragma omp target teams
18038 #pragma omp taskwait // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskwait' directive into a parallel region?}}
18039 bar();
18041 #pragma omp target teams
18043 #pragma omp flush // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp flush' directive into a parallel region?}}
18044 bar();
18046 #pragma omp target teams
18048 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
18049 bar();
18051 #pragma omp target teams
18053 #pragma omp atomic // omp-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp atomic' directive into a parallel region?}}
18054 ++a;
18056 #pragma omp target teams
18058 #pragma omp target // expected-error {{region cannot be nested inside 'target teams' region}}
18059 ++a;
18061 #pragma omp target teams
18063 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams' region}}
18064 ++a;
18066 #pragma omp target teams
18067 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams' region}}
18068 for (int i = 0; i < 10; ++i)
18070 #pragma omp target teams
18072 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams' region}}
18074 #pragma omp target teams
18076 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams' region}}
18078 #pragma omp target teams
18080 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
18081 ++a;
18083 #pragma omp target teams
18085 #pragma omp taskloop // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp taskloop' directive into a parallel region?}}
18086 for (int i = 0; i < 10; ++i)
18087 ++a;
18089 #pragma omp target teams
18090 #pragma omp distribute
18091 for (int i = 0; i < 10; ++i)
18093 #pragma omp target teams
18095 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams' region}}
18096 ++a;
18098 #pragma omp target teams
18099 #pragma omp distribute parallel for
18100 for (int i = 0; i < 10; ++i)
18102 #pragma omp target teams
18104 #pragma omp distribute parallel for
18105 for (int i = 0; i < 10; ++i)
18107 #pragma omp distribute parallel for
18108 for (int j = 0; j < 10; ++j)
18111 #pragma omp target teams
18113 #pragma omp distribute parallel for simd
18114 for (int i = 0; i < 10; ++i)
18116 #pragma omp distribute parallel for simd
18117 for (int j = 0; j < 10; ++j)
18120 #pragma omp target teams
18122 #pragma omp distribute simd
18123 for (int i = 0; i < 10; ++i)
18125 #pragma omp distribute simd
18126 for (int j = 0; j < 10; ++j)
18129 #pragma omp target teams
18131 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams' region}}
18132 for (int i = 0; i < 10; ++i)
18135 #pragma omp target teams
18137 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
18138 for (int i = 0; i < 10; ++i)
18141 #pragma omp target teams
18143 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
18144 for (int i = 0; i < 10; ++i)
18147 #pragma omp target teams
18149 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
18150 for (int i = 0; i < 10; ++i)
18153 #pragma omp target teams
18155 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
18156 for (int i = 0; i < 10; ++i)
18159 #pragma omp target teams
18161 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams' region}}
18162 a++;
18164 #pragma omp target teams
18166 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams' region}}
18167 for (int i = 0; i < 10; ++i)
18170 #pragma omp target teams
18172 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams' region}}
18173 for (int i = 0; i < 10; ++i)
18176 #pragma omp target teams
18178 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams' region}}
18179 for (int i = 0; i < 10; ++i)
18182 #pragma omp target teams
18184 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams' region}}
18185 for (int i = 0; i < 10; ++i)
18189 // TARGET TEAMS DISTRIBUTE DIRECTIVE
18190 #pragma omp target teams distribute // OK
18191 for (int i = 0; i < 10; ++i)
18193 #pragma omp target teams distribute
18194 for (int i = 0; i < 10; ++i) {
18195 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
18196 for (int i = 0; i < 10; ++i)
18199 #pragma omp target teams distribute
18200 for (int i = 0; i < 10; ++i) {
18201 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
18202 for (int i = 0; i < 10; ++i)
18205 #pragma omp target teams distribute
18206 for (int i = 0; i < 10; ++i) {
18207 #pragma omp for // OK
18208 for (int i = 0; i < 10; ++i)
18211 #pragma omp target teams distribute
18212 for (int i = 0; i < 10; ++i) {
18213 #pragma omp simd // OK
18214 for (int i = 0; i < 10; ++i)
18217 #pragma omp target teams distribute
18218 for (int i = 0; i < 10; ++i) {
18219 #pragma omp for simd // OK
18220 for (int i = 0; i < 10; ++i)
18223 #pragma omp target teams distribute
18224 for (int i = 0; i < 10; ++i) {
18225 #pragma omp parallel // OK
18226 for (int i = 0; i < 10; ++i)
18229 #pragma omp target teams distribute
18230 for (int i = 0; i < 10; ++i) {
18231 #pragma omp sections // OK
18233 bar();
18236 #pragma omp target teams distribute
18237 for (int i = 0; i < 10; ++i) {
18238 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams distribute region}}
18240 bar();
18243 #pragma omp target teams distribute
18244 for (int i = 0; i < 10; ++i) {
18245 #pragma omp single // OK
18247 bar();
18250 #pragma omp target teams distribute
18251 for (int i = 0; i < 10; ++i) {
18252 #pragma omp master // OK
18254 bar();
18257 #pragma omp target teams distribute
18258 for (int i = 0; i < 10; ++i) {
18259 #pragma omp critical // OK
18261 bar();
18264 #pragma omp target teams distribute
18265 for (int i = 0; i < 10; ++i) {
18266 #pragma omp parallel // OK
18268 #pragma omp single
18270 bar();
18274 #pragma omp target teams distribute
18275 for (int i = 0; i < 10; ++i) {
18276 #pragma omp parallel for // OK
18277 for (int i = 0; i < 10; ++i)
18280 #pragma omp target teams distribute
18281 for (int i = 0; i < 10; ++i) {
18282 #pragma omp parallel for simd // OK
18283 for (int i = 0; i < 10; ++i)
18286 #pragma omp target teams distribute
18287 for (int i = 0; i < 10; ++i) {
18288 #pragma omp parallel sections // OK
18290 bar();
18293 #pragma omp target teams distribute
18294 for (int i = 0; i < 10; ++i) {
18295 #pragma omp task // OK
18297 bar();
18300 #pragma omp target teams distribute
18301 for (int i = 0; i < 10; ++i) {
18302 #pragma omp taskyield // OK
18303 bar();
18305 #pragma omp target teams distribute
18306 for (int i = 0; i < 10; ++i) {
18307 #pragma omp barrier // OK
18308 bar();
18310 #pragma omp target teams distribute
18311 for (int i = 0; i < 10; ++i) {
18312 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
18313 bar();
18315 #pragma omp target teams distribute
18316 for (int i = 0; i < 10; ++i) {
18317 #pragma omp taskwait // OK
18318 bar();
18320 #pragma omp target teams distribute
18321 for (int i = 0; i < 10; ++i) {
18322 #pragma omp flush // OK
18323 bar();
18325 #pragma omp target teams distribute
18326 for (int i = 0; i < 10; ++i) {
18327 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
18328 bar();
18330 #pragma omp target teams distribute
18331 for (int i = 0; i < 10; ++i) {
18332 #pragma omp atomic // OK
18333 ++a;
18335 #pragma omp target teams distribute
18336 for (int i = 0; i < 10; ++i) {
18337 #pragma omp target // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18338 ++a;
18340 #pragma omp target teams distribute
18341 for (int i = 0; i < 10; ++i) {
18342 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18343 ++a;
18345 #pragma omp target teams distribute
18346 for (int i = 0; i < 10; ++i) {
18347 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18348 for (int i = 0; i < 10; ++i)
18351 #pragma omp target teams distribute
18352 for (int i = 0; i < 10; ++i) {
18353 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18354 ++a;
18356 #pragma omp target teams distribute
18357 for (int i = 0; i < 10; ++i) {
18358 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18359 ++a;
18361 #pragma omp target teams distribute
18362 for (int i = 0; i < 10; ++i) {
18363 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
18364 ++a;
18366 #pragma omp target teams distribute
18367 for (int i = 0; i < 10; ++i) {
18368 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18369 ++a;
18371 #pragma omp target teams distribute
18372 for (int i = 0; i < 10; ++i) {
18373 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
18374 for (int i = 0; i < 10; ++i)
18375 ++a;
18377 #pragma omp target teams distribute
18378 for (int i = 0; i < 10; ++i) {
18379 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18380 for (int i = 0; i < 10; ++i)
18381 ++a;
18383 #pragma omp target teams distribute
18384 for (int i = 0; i < 10; ++i) {
18385 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
18386 for (int i = 0; i < 10; ++i)
18387 ++a;
18389 #pragma omp target teams distribute
18390 for (int i = 0; i < 10; ++i) {
18391 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
18392 for (int i = 0; i < 10; ++i)
18393 ++a;
18395 #pragma omp target teams distribute
18396 for (int i = 0; i < 10; ++i) {
18397 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
18398 for (int i = 0; i < 10; ++i)
18399 ++a;
18401 #pragma omp target teams distribute
18402 for (int i = 0; i < 10; ++i) {
18403 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams distribute' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
18404 for (int i = 0; i < 10; ++i)
18405 ++a;
18407 #pragma omp target teams distribute
18408 for (int i = 0; i < 10; ++i) {
18409 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18410 ++a;
18412 #pragma omp target teams distribute
18413 for (int i = 0; i < 10; ++i) {
18414 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18415 for (int i = 0; i < 10; ++i)
18416 ++a;
18418 #pragma omp target teams distribute
18419 for (int i = 0; i < 10; ++i) {
18420 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18421 for (int i = 0; i < 10; ++i)
18422 ++a;
18424 #pragma omp target teams distribute
18425 for (int i = 0; i < 10; ++i) {
18426 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18427 for (int i = 0; i < 10; ++i)
18428 ++a;
18430 #pragma omp target teams distribute
18431 for (int i = 0; i < 10; ++i) {
18432 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams distribute' region}}
18433 for (int i = 0; i < 10; ++i)
18434 ++a;
18437 // TARGET TEAMS DISTRIBUTE PARALLEL FOR DIRECTIVE
18438 #pragma omp target teams distribute parallel for // OK
18439 for (int i = 0; i < 10; ++i)
18441 #pragma omp target teams distribute parallel for
18442 for (int i = 0; i < 10; ++i) {
18443 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
18444 for (int i = 0; i < 10; ++i)
18447 #pragma omp target teams distribute parallel for
18448 for (int i = 0; i < 10; ++i) {
18449 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
18450 for (int i = 0; i < 10; ++i)
18453 #pragma omp target teams distribute parallel for
18454 for (int i = 0; i < 10; ++i) {
18455 #pragma omp for // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
18456 for (int i = 0; i < 10; ++i)
18459 #pragma omp target teams distribute parallel for
18460 for (int i = 0; i < 10; ++i) {
18461 #pragma omp simd // OK
18462 for (int i = 0; i < 10; ++i)
18465 #pragma omp target teams distribute parallel for
18466 for (int i = 0; i < 10; ++i) {
18467 #pragma omp for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp for simd' directive into a parallel region?}}
18468 for (int i = 0; i < 10; ++i)
18471 #pragma omp target teams distribute parallel for
18472 for (int i = 0; i < 10; ++i) {
18473 #pragma omp parallel // OK
18474 for (int i = 0; i < 10; ++i)
18477 #pragma omp target teams distribute parallel for
18478 for (int i = 0; i < 10; ++i) {
18479 #pragma omp sections // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
18481 bar();
18484 #pragma omp target teams distribute parallel for
18485 for (int i = 0; i < 10; ++i) {
18486 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a target teams distribute parallel for region}}
18488 bar();
18491 #pragma omp target teams distribute parallel for
18492 for (int i = 0; i < 10; ++i) {
18493 #pragma omp single // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
18495 bar();
18498 #pragma omp target teams distribute parallel for
18499 for (int i = 0; i < 10; ++i) {
18500 #pragma omp master // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
18502 bar();
18505 #pragma omp target teams distribute parallel for
18506 for (int i = 0; i < 10; ++i) {
18507 #pragma omp critical // OK
18509 bar();
18512 #pragma omp target teams distribute parallel for
18513 for (int i = 0; i < 10; ++i) {
18514 #pragma omp parallel // OK
18516 #pragma omp single
18518 bar();
18522 #pragma omp target teams distribute parallel for
18523 for (int i = 0; i < 10; ++i) {
18524 #pragma omp parallel for // OK
18525 for (int i = 0; i < 10; ++i)
18528 #pragma omp target teams distribute parallel for
18529 for (int i = 0; i < 10; ++i) {
18530 #pragma omp parallel for simd // OK
18531 for (int i = 0; i < 10; ++i)
18534 #pragma omp target teams distribute parallel for
18535 for (int i = 0; i < 10; ++i) {
18536 #pragma omp parallel sections // OK
18538 bar();
18541 #pragma omp target teams distribute parallel for
18542 for (int i = 0; i < 10; ++i) {
18543 #pragma omp task // OK
18545 bar();
18548 #pragma omp target teams distribute parallel for
18549 for (int i = 0; i < 10; ++i) {
18550 #pragma omp taskyield // OK
18551 bar();
18553 #pragma omp target teams distribute parallel for
18554 for (int i = 0; i < 10; ++i) {
18555 #pragma omp barrier // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
18556 bar();
18558 #pragma omp target teams distribute parallel for
18559 for (int i = 0; i < 10; ++i) {
18560 #pragma omp scan // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
18561 bar();
18563 #pragma omp target teams distribute parallel for
18564 for (int i = 0; i < 10; ++i) {
18565 #pragma omp taskwait // OK
18566 bar();
18568 #pragma omp target teams distribute parallel for
18569 for (int i = 0; i < 10; ++i) {
18570 #pragma omp flush // OK
18571 bar();
18573 #pragma omp target teams distribute parallel for
18574 for (int i = 0; i < 10; ++i) {
18575 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
18576 bar();
18578 #pragma omp target teams distribute parallel for
18579 for (int i = 0; i < 10; ++i) {
18580 #pragma omp atomic // OK
18581 ++a;
18583 #pragma omp target teams distribute parallel for
18584 for (int i = 0; i < 10; ++i) {
18585 #pragma omp target // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18586 ++a;
18588 #pragma omp target teams distribute parallel for
18589 for (int i = 0; i < 10; ++i) {
18590 #pragma omp target parallel // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18591 ++a;
18593 #pragma omp target teams distribute parallel for
18594 for (int i = 0; i < 10; ++i) {
18595 #pragma omp target parallel for // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18596 for (int i = 0; i < 10; ++i)
18599 #pragma omp target teams distribute parallel for
18600 for (int i = 0; i < 10; ++i) {
18601 #pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18602 ++a;
18604 #pragma omp target teams distribute parallel for
18605 for (int i = 0; i < 10; ++i) {
18606 #pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18607 ++a;
18609 #pragma omp target teams distribute parallel for
18610 for (int i = 0; i < 10; ++i) {
18611 #pragma omp teams // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
18612 ++a;
18614 #pragma omp target teams distribute parallel for
18615 for (int i = 0; i < 10; ++i) {
18616 #pragma omp target update to(a) // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18617 ++a;
18619 #pragma omp target teams distribute parallel for
18620 for (int i = 0; i < 10; ++i) {
18621 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
18622 for (int i = 0; i < 10; ++i)
18623 ++a;
18625 #pragma omp target teams distribute parallel for
18626 for (int i = 0; i < 10; ++i) {
18627 #pragma omp target simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18628 for (int i = 0; i < 10; ++i)
18629 ++a;
18631 #pragma omp target teams distribute parallel for
18632 for (int i = 0; i < 10; ++i) {
18633 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
18634 for (int i = 0; i < 10; ++i)
18635 ++a;
18637 #pragma omp target teams distribute parallel for
18638 for (int i = 0; i < 10; ++i) {
18639 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
18640 for (int i = 0; i < 10; ++i)
18641 ++a;
18643 #pragma omp target teams distribute parallel for
18644 for (int i = 0; i < 10; ++i) {
18645 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
18646 for (int i = 0; i < 10; ++i)
18647 ++a;
18649 #pragma omp target teams distribute parallel for
18650 for (int i = 0; i < 10; ++i) {
18651 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
18652 for (int i = 0; i < 10; ++i)
18653 ++a;
18655 #pragma omp target teams distribute parallel for
18656 for (int i = 0; i < 10; ++i) {
18657 #pragma omp target teams // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18658 ++a;
18660 #pragma omp target teams distribute parallel for
18661 for (int i = 0; i < 10; ++i) {
18662 #pragma omp target teams distribute // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18663 for (int i = 0; i < 10; ++i)
18664 ++a;
18666 #pragma omp target teams distribute parallel for
18667 for (int i = 0; i < 10; ++i) {
18668 #pragma omp target teams distribute parallel for // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18669 for (int i = 0; i < 10; ++i)
18670 ++a;
18672 #pragma omp target teams distribute parallel for
18673 for (int i = 0; i < 10; ++i) {
18674 #pragma omp target teams distribute parallel for simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18675 for (int i = 0; i < 10; ++i)
18676 ++a;
18678 #pragma omp target teams distribute parallel for
18679 for (int i = 0; i < 10; ++i) {
18680 #pragma omp target teams distribute simd // expected-error {{region cannot be nested inside 'target teams distribute parallel for' region}}
18681 for (int i = 0; i < 10; ++i)
18682 ++a;
18685 // TARGET TEAMS DISTRIBUTE PARALLEL FOR SIMD DIRECTIVE
18686 #pragma omp target teams distribute parallel for simd // OK
18687 for (int i = 0; i < 10; ++i)
18689 #pragma omp target teams distribute parallel for simd
18690 for (int i = 0; i < 10; ++i) {
18691 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18692 for (int i = 0; i < 10; ++i)
18695 #pragma omp target teams distribute parallel for simd
18696 for (int i = 0; i < 10; ++i) {
18697 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18698 for (int i = 0; i < 10; ++i)
18701 #pragma omp target teams distribute parallel for simd
18702 for (int i = 0; i < 10; ++i) {
18703 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18704 for (int i = 0; i < 10; ++i)
18707 #pragma omp target teams distribute parallel for simd
18708 for (int i = 0; i < 10; ++i) {
18709 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
18710 for (int i = 0; i < 10; ++i)
18713 #pragma omp target teams distribute parallel for simd
18714 for (int i = 0; i < 10; ++i) {
18715 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18716 for (int i = 0; i < 10; ++i)
18719 #pragma omp target teams distribute parallel for simd
18720 for (int i = 0; i < 10; ++i) {
18721 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18722 for (int i = 0; i < 10; ++i)
18725 #pragma omp target teams distribute parallel for simd
18726 for (int i = 0; i < 10; ++i) {
18727 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18729 bar();
18732 #pragma omp target teams distribute parallel for simd
18733 for (int i = 0; i < 10; ++i) {
18734 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18736 bar();
18739 #pragma omp target teams distribute parallel for simd
18740 for (int i = 0; i < 10; ++i) {
18741 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18743 bar();
18746 #pragma omp target teams distribute parallel for simd
18747 for (int i = 0; i < 10; ++i) {
18748 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18750 bar();
18753 #pragma omp target teams distribute parallel for simd
18754 for (int i = 0; i < 10; ++i) {
18755 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18757 bar();
18760 #pragma omp target teams distribute parallel for simd
18761 for (int i = 0; i < 10; ++i) {
18762 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18764 #pragma omp single
18766 bar();
18770 #pragma omp target teams distribute parallel for simd
18771 for (int i = 0; i < 10; ++i) {
18772 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18773 for (int i = 0; i < 10; ++i)
18776 #pragma omp target teams distribute parallel for simd
18777 for (int i = 0; i < 10; ++i) {
18778 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18779 for (int i = 0; i < 10; ++i)
18782 #pragma omp target teams distribute parallel for simd
18783 for (int i = 0; i < 10; ++i) {
18784 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18786 bar();
18789 #pragma omp target teams distribute parallel for simd
18790 for (int i = 0; i < 10; ++i) {
18791 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18793 bar();
18796 #pragma omp target teams distribute parallel for simd
18797 for (int i = 0; i < 10; ++i) {
18798 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18799 bar();
18801 #pragma omp target teams distribute parallel for simd
18802 for (int i = 0; i < 10; ++i) {
18803 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18804 bar();
18806 #pragma omp target teams distribute parallel for simd
18807 for (int i = 0; i < 10; ++i) {
18808 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target teams distribute parallel for simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
18809 bar();
18811 #pragma omp target teams distribute parallel for simd
18812 for (int i = 0; i < 10; ++i) {
18813 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18814 bar();
18816 #pragma omp target teams distribute parallel for simd
18817 for (int i = 0; i < 10; ++i) {
18818 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18819 bar();
18821 #pragma omp target teams distribute parallel for simd
18822 for (int i = 0; i < 10; ++i) {
18823 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18824 bar();
18826 #pragma omp target teams distribute parallel for simd
18827 for (int i = 0; i < 10; ++i) {
18828 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
18829 ++a;
18831 #pragma omp target teams distribute parallel for simd
18832 for (int i = 0; i < 10; ++i) {
18833 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18834 ++a;
18836 #pragma omp target teams distribute parallel for simd
18837 for (int i = 0; i < 10; ++i) {
18838 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18839 ++a;
18841 #pragma omp target teams distribute parallel for simd
18842 for (int i = 0; i < 10; ++i) {
18843 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18844 for (int i = 0; i < 10; ++i)
18847 #pragma omp target teams distribute parallel for simd
18848 for (int i = 0; i < 10; ++i) {
18849 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18850 ++a;
18852 #pragma omp target teams distribute parallel for simd
18853 for (int i = 0; i < 10; ++i) {
18854 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18855 ++a;
18857 #pragma omp target teams distribute parallel for simd
18858 for (int i = 0; i < 10; ++i) {
18859 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18860 ++a;
18862 #pragma omp target teams distribute parallel for simd
18863 for (int i = 0; i < 10; ++i) {
18864 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18865 ++a;
18867 #pragma omp target teams distribute parallel for simd
18868 for (int i = 0; i < 10; ++i) {
18869 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18870 for (int i = 0; i < 10; ++i)
18871 ++a;
18873 #pragma omp target teams distribute parallel for simd
18874 for (int i = 0; i < 10; ++i) {
18875 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18876 for (int i = 0; i < 10; ++i)
18877 ++a;
18879 #pragma omp target teams distribute parallel for simd
18880 for (int i = 0; i < 10; ++i) {
18881 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18882 for (int i = 0; i < 10; ++i)
18883 ++a;
18885 #pragma omp target teams distribute parallel for simd
18886 for (int i = 0; i < 10; ++i) {
18887 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18888 for (int i = 0; i < 10; ++i)
18889 ++a;
18891 #pragma omp target teams distribute parallel for simd
18892 for (int i = 0; i < 10; ++i) {
18893 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18894 for (int i = 0; i < 10; ++i)
18895 ++a;
18897 #pragma omp target teams distribute parallel for simd
18898 for (int i = 0; i < 10; ++i) {
18899 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18900 for (int i = 0; i < 10; ++i)
18903 #pragma omp target teams distribute parallel for simd
18904 for (int i = 0; i < 10; ++i) {
18905 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18906 a++;
18908 #pragma omp target teams distribute parallel for simd
18909 for (int i = 0; i < 10; ++i) {
18910 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18911 for (int i = 0; i < 10; ++i)
18914 #pragma omp target teams distribute parallel for simd
18915 for (int i = 0; i < 10; ++i) {
18916 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18917 for (int i = 0; i < 10; ++i)
18920 #pragma omp target teams distribute parallel for simd
18921 for (int i = 0; i < 10; ++i) {
18922 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18923 for (int i = 0; i < 10; ++i)
18926 #pragma omp target teams distribute parallel for simd
18927 for (int i = 0; i < 10; ++i) {
18928 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18929 for (int i = 0; i < 10; ++i)
18933 // TARGET TEAMS DISTRIBUTE SIMD DIRECTIVE
18934 #pragma omp target teams distribute simd // OK
18935 for (int i = 0; i < 10; ++i)
18937 #pragma omp target teams distribute simd
18938 for (int i = 0; i < 10; ++i) {
18939 #pragma omp distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18940 for (int i = 0; i < 10; ++i)
18943 #pragma omp target teams distribute simd
18944 for (int i = 0; i < 10; ++i) {
18945 #pragma omp distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18946 for (int i = 0; i < 10; ++i)
18949 #pragma omp target teams distribute simd
18950 for (int i = 0; i < 10; ++i) {
18951 #pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18952 for (int i = 0; i < 10; ++i)
18955 #pragma omp target teams distribute simd
18956 for (int i = 0; i < 10; ++i) {
18957 #pragma omp simd // omp45warn-warning {{OpenMP only allows an ordered construct with the simd clause nested in a simd construct}}
18958 for (int i = 0; i < 10; ++i)
18961 #pragma omp target teams distribute simd
18962 for (int i = 0; i < 10; ++i) {
18963 #pragma omp for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18964 for (int i = 0; i < 10; ++i)
18967 #pragma omp target teams distribute simd
18968 for (int i = 0; i < 10; ++i) {
18969 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18970 for (int i = 0; i < 10; ++i)
18973 #pragma omp target teams distribute simd
18974 for (int i = 0; i < 10; ++i) {
18975 #pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18977 bar();
18980 #pragma omp target teams distribute simd
18981 for (int i = 0; i < 10; ++i) {
18982 #pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18984 bar();
18987 #pragma omp target teams distribute simd
18988 for (int i = 0; i < 10; ++i) {
18989 #pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18991 bar();
18994 #pragma omp target teams distribute simd
18995 for (int i = 0; i < 10; ++i) {
18996 #pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
18998 bar();
19001 #pragma omp target teams distribute simd
19002 for (int i = 0; i < 10; ++i) {
19003 #pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19005 bar();
19008 #pragma omp target teams distribute simd
19009 for (int i = 0; i < 10; ++i) {
19010 #pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19012 #pragma omp single
19014 bar();
19018 #pragma omp target teams distribute simd
19019 for (int i = 0; i < 10; ++i) {
19020 #pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19021 for (int i = 0; i < 10; ++i)
19024 #pragma omp target teams distribute simd
19025 for (int i = 0; i < 10; ++i) {
19026 #pragma omp parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19027 for (int i = 0; i < 10; ++i)
19030 #pragma omp target teams distribute simd
19031 for (int i = 0; i < 10; ++i) {
19032 #pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19034 bar();
19037 #pragma omp target teams distribute simd
19038 for (int i = 0; i < 10; ++i) {
19039 #pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19041 bar();
19044 #pragma omp target teams distribute simd
19045 for (int i = 0; i < 10; ++i) {
19046 #pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19047 bar();
19049 #pragma omp target teams distribute simd
19050 for (int i = 0; i < 10; ++i) {
19051 #pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19052 bar();
19054 #pragma omp target teams distribute simd
19055 for (int i = 0; i < 10; ++i) {
19056 #pragma omp scan // omp45-error {{OpenMP constructs may not be nested inside a simd region}} omp50-error {{region cannot be closely nested inside 'target teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}} omp51-error {{region cannot be closely nested inside 'target teams distribute simd' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
19057 bar();
19059 #pragma omp target teams distribute simd
19060 for (int i = 0; i < 10; ++i) {
19061 #pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19062 bar();
19064 #pragma omp target teams distribute simd
19065 for (int i = 0; i < 10; ++i) {
19066 #pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19067 bar();
19069 #pragma omp target teams distribute simd
19070 for (int i = 0; i < 10; ++i) {
19071 #pragma omp ordered // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19072 bar();
19074 #pragma omp target teams distribute simd
19075 for (int i = 0; i < 10; ++i) {
19076 #pragma omp atomic // omp45-error {{OpenMP constructs may not be nested inside a simd region}}
19077 ++a;
19079 #pragma omp target teams distribute simd
19080 for (int i = 0; i < 10; ++i) {
19081 #pragma omp target // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19082 ++a;
19084 #pragma omp target teams distribute simd
19085 for (int i = 0; i < 10; ++i) {
19086 #pragma omp target parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19087 ++a;
19089 #pragma omp target teams distribute simd
19090 for (int i = 0; i < 10; ++i) {
19091 #pragma omp target parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19092 for (int i = 0; i < 10; ++i)
19095 #pragma omp target teams distribute simd
19096 for (int i = 0; i < 10; ++i) {
19097 #pragma omp target enter data map(to: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19098 ++a;
19100 #pragma omp target teams distribute simd
19101 for (int i = 0; i < 10; ++i) {
19102 #pragma omp target exit data map(from: a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19103 ++a;
19105 #pragma omp target teams distribute simd
19106 for (int i = 0; i < 10; ++i) {
19107 #pragma omp teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19108 ++a;
19110 #pragma omp target teams distribute simd
19111 for (int i = 0; i < 10; ++i) {
19112 #pragma omp target update to(a) // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19113 ++a;
19115 #pragma omp target teams distribute simd
19116 for (int i = 0; i < 10; ++i) {
19117 #pragma omp distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19118 for (int i = 0; i < 10; ++i)
19119 ++a;
19121 #pragma omp target teams distribute simd
19122 for (int i = 0; i < 10; ++i) {
19123 #pragma omp target simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19124 for (int i = 0; i < 10; ++i)
19125 ++a;
19127 #pragma omp target teams distribute simd
19128 for (int i = 0; i < 10; ++i) {
19129 #pragma omp teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19130 for (int i = 0; i < 10; ++i)
19131 ++a;
19133 #pragma omp target teams distribute simd
19134 for (int i = 0; i < 10; ++i) {
19135 #pragma omp teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19136 for (int i = 0; i < 10; ++i)
19137 ++a;
19139 #pragma omp target teams distribute simd
19140 for (int i = 0; i < 10; ++i) {
19141 #pragma omp teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19142 for (int i = 0; i < 10; ++i)
19143 ++a;
19145 #pragma omp target teams distribute simd
19146 for (int i = 0; i < 10; ++i) {
19147 #pragma omp teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19148 for (int i = 0; i < 10; ++i)
19151 #pragma omp target teams distribute simd
19152 for (int i = 0; i < 10; ++i) {
19153 #pragma omp target teams // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19154 a++;
19156 #pragma omp target teams distribute simd
19157 for (int i = 0; i < 10; ++i) {
19158 #pragma omp target teams distribute // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19159 for (int i = 0; i < 10; ++i)
19162 #pragma omp target teams distribute simd
19163 for (int i = 0; i < 10; ++i) {
19164 #pragma omp target teams distribute parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19165 for (int i = 0; i < 10; ++i)
19168 #pragma omp target teams distribute simd
19169 for (int i = 0; i < 10; ++i) {
19170 #pragma omp target teams distribute parallel for simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19171 for (int i = 0; i < 10; ++i)
19174 #pragma omp target teams distribute simd
19175 for (int i = 0; i < 10; ++i) {
19176 #pragma omp target teams distribute simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19177 for (int i = 0; i < 10; ++i)
19181 // SCOPE DIRECTIVE
19182 #pragma omp scope
19183 #pragma omp parallel // OK
19184 bar();
19185 #pragma omp scope
19186 #pragma omp parallel for // OK
19187 for(int i = 0; i < 10; i++)
19189 #pragma omp scope
19190 #pragma omp parallel for simd // OK
19191 for(int i = 0; i < 10; i++)
19193 #pragma omp scope
19194 #pragma omp for
19195 for (int i = 0; i < 10; ++i)
19197 #pragma omp scope
19198 #pragma omp simd
19199 for (int i = 0; i < 10; ++i)
19201 #pragma omp scope
19202 #pragma omp for simd
19203 for (int i = 0; i < 10; ++i)
19205 #pragma omp scope
19206 #pragma omp sections
19208 bar();
19210 #pragma omp scope
19211 #pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a scope region}}
19213 bar();
19215 #pragma omp scope
19216 #pragma omp single
19217 bar();
19219 #pragma omp scope
19220 #pragma omp master
19222 bar();
19224 #pragma omp scope
19225 #pragma omp critical
19227 bar();
19229 #pragma omp scope
19230 #pragma omp parallel sections
19232 bar();
19234 #pragma omp scope
19235 #pragma omp parallel master
19237 bar();
19239 #pragma omp scope
19240 #pragma omp parallel masked
19242 bar();
19244 #pragma omp scope
19245 #pragma omp task
19247 bar();
19249 #pragma omp scope
19251 #pragma omp taskyield
19252 bar();
19254 #pragma omp scope
19256 #pragma omp barrier
19257 bar();
19259 #pragma omp scope
19261 #pragma omp scan // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp scan' directive into a for, simd, for simd, parallel for, or parallel for simd region?}}
19262 bar();
19264 #pragma omp scope
19266 #pragma omp taskwait
19267 bar();
19269 #pragma omp scope
19271 #pragma omp flush
19272 bar();
19274 #pragma omp scope
19276 #pragma omp ordered // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp ordered' directive into a for or a parallel for region with 'ordered' clause?}}
19277 bar();
19279 #pragma omp scope
19281 #pragma omp atomic
19282 ++a;
19284 #pragma omp scope
19286 #pragma omp target parallel
19287 ++a;
19289 #pragma omp scope
19291 #pragma omp target parallel for
19292 for (int i = 0; i < 10; ++i)
19295 #pragma omp scope
19297 #pragma omp target enter data map(to: a)
19298 ++a;
19300 #pragma omp scope
19302 #pragma omp target exit data map(from: a)
19303 ++a;
19305 #pragma omp scope
19307 #pragma omp taskloop
19308 for (int i = 0; i < 10; ++i)
19309 ++a;
19311 #pragma omp scope
19313 #pragma omp target // OK
19314 a++;
19316 #pragma omp scope
19318 #pragma omp teams // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams' directive into a target region?}}
19319 a++;
19321 #pragma omp scope
19323 #pragma omp target teams // OK
19324 a++;
19326 #pragma omp scope
19328 #pragma omp distribute // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute' directive into a teams region?}}
19329 for (int i = 0; i < 10; ++i)
19332 #pragma omp scope
19334 #pragma omp distribute parallel for simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute parallel for simd' directive into a teams region?}}
19335 for (int i = 0; i < 10; ++i)
19338 #pragma omp scope
19340 #pragma omp distribute simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp distribute simd' directive into a teams region?}}
19341 for (int i = 0; i < 10; ++i)
19344 #pragma omp scope
19346 #pragma omp target simd // OK
19347 for (int i = 0; i < 10; ++i)
19350 #pragma omp scope
19352 #pragma omp teams distribute // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute' directive into a target region?}}
19353 for (int i = 0; i < 10; ++i)
19356 #pragma omp scope
19358 #pragma omp teams distribute simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute simd' directive into a target region?}}
19359 for (int i = 0; i < 10; ++i)
19362 #pragma omp scope
19364 #pragma omp teams distribute parallel for simd // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute parallel for simd' directive into a target region?}}
19365 for (int i = 0; i < 10; ++i)
19368 #pragma omp scope
19370 #pragma omp teams distribute parallel for // expected-error {{region cannot be closely nested inside 'scope' region; perhaps you forget to enclose 'omp teams distribute parallel for' directive into a target region?}}
19371 for (int i = 0; i < 10; ++i)
19374 #pragma omp scope
19376 #pragma omp target teams // OK
19377 ++a;
19379 #pragma omp scope
19381 #pragma omp target teams distribute // OK
19382 for (int i = 0; i < 10; ++i)
19385 #pragma omp scope
19387 #pragma omp target teams distribute parallel for // OK
19388 for (int i = 0; i < 10; ++i)
19391 #pragma omp scope
19393 #pragma omp target teams distribute parallel for simd // OK
19394 for (int i = 0; i < 10; ++i)
19397 #pragma omp scope
19399 #pragma omp target teams distribute simd // OK
19400 for (int i = 0; i < 10; ++i)
19403 #pragma omp for
19404 for (int i = 0; i < 10; ++i) {
19405 #pragma omp scope // expected-error {{region cannot be closely nested inside 'for' region}}
19406 bar();
19409 #pragma omp for simd
19410 for (int i = 0; i < 10; ++i) {
19411 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19412 bar();
19415 #pragma omp sections
19417 #pragma omp scope // expected-error {{region cannot be closely nested inside 'sections' region}}
19418 bar();
19421 #pragma omp sections
19423 #pragma omp section
19425 #pragma omp scope // expected-error {{region cannot be closely nested inside 'section' region}}
19426 bar();
19430 #pragma omp single
19432 #pragma omp scope // expected-error {{region cannot be closely nested inside 'single' region}}
19433 bar();
19436 #pragma omp master
19438 #pragma omp scope // expected-error {{region cannot be closely nested inside 'master' region}}
19439 bar();
19442 #pragma omp critical
19444 #pragma omp scope // expected-error {{region cannot be closely nested inside 'critical' region}}
19445 bar();
19448 #pragma omp parallel for
19449 for (int i = 0; i < 10; ++i) {
19450 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel for' region}}
19451 bar();
19454 #pragma omp parallel for simd
19455 for (int i = 0; i < 10; ++i) {
19456 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19457 bar();
19460 #pragma omp parallel master
19462 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel master' region}}
19463 bar();
19466 #pragma omp parallel sections
19468 #pragma omp scope // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
19469 bar();
19472 #pragma omp task
19474 #pragma omp scope // expected-error {{region cannot be closely nested inside 'task' region}}
19475 bar();
19478 #pragma omp ordered
19480 #pragma omp scope // expected-error {{region cannot be closely nested inside 'ordered' region}}
19481 bar();
19484 #pragma omp atomic
19485 // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an lvalue expression with scalar type}}
19486 // expected-note@+1 {{expected an expression statement}}
19488 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside an atomic region}}
19489 bar();
19492 #pragma omp target
19493 #pragma omp teams
19495 #pragma omp scope // expected-error {{region cannot be closely nested inside 'teams' region; perhaps you forget to enclose 'omp scope' directive into a parallel region?}}
19496 bar();
19499 #pragma omp taskloop
19500 for (int i = 0; i < 10; ++i) {
19501 #pragma omp scope // expected-error {{region cannot be closely nested inside 'taskloop' region}}
19502 bar();
19505 #pragma omp target
19506 #pragma omp teams
19507 #pragma omp distribute parallel for
19508 for (int i = 0; i < 10; ++i) {
19509 #pragma omp scope // expected-error {{region cannot be closely nested inside 'distribute parallel for' region}}
19510 bar();
19513 #pragma omp target
19514 #pragma omp teams
19515 #pragma omp distribute parallel for simd
19516 for (int i = 0; i < 10; ++i) {
19517 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19518 bar();
19521 #pragma omp target simd
19522 for (int i = 0; i < 10; ++i) {
19523 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19524 bar();
19527 #pragma omp target
19528 #pragma omp teams distribute simd
19529 for (int i = 0; i < 10; ++i) {
19530 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19531 bar();
19534 #pragma omp target
19535 #pragma omp teams distribute parallel for simd
19536 for (int i = 0; i < 10; ++i) {
19537 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19538 bar();
19541 #pragma omp target
19542 #pragma omp teams distribute parallel for
19543 for (int i = 0; i < 10; ++i) {
19544 #pragma omp scope // expected-error {{region cannot be closely nested inside 'teams distribute parallel for' region}}
19545 bar();
19548 #pragma omp target teams
19550 #pragma omp scope // expected-error {{region cannot be closely nested inside 'target teams' region; perhaps you forget to enclose 'omp scope' directive into a parallel region?}}
19551 bar();
19554 #pragma omp target teams distribute parallel for
19555 for (int i = 0; i < 10; ++i) {
19556 #pragma omp scope // expected-error {{region cannot be closely nested inside 'target teams distribute parallel for' region}}
19557 bar();
19560 #pragma omp target teams distribute parallel for simd
19561 for (int i = 0; i < 10; ++i) {
19562 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19563 bar();
19566 #pragma omp target teams distribute simd
19567 for (int i = 0; i < 10; ++i) {
19568 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19569 bar();
19572 #pragma omp simd
19573 for (int i = 0; i < 10; ++i) {
19574 #pragma omp scope // expected-error {{OpenMP constructs may not be nested inside a simd region}}
19575 bar();
19578 return foo<int>();