Files
clang-p2996/flang/test/Semantics/omp-nested01.f90
Michael Kruse 58c3f20bbf [flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:

 * Define `lit_tools_dir` for flang's test configuration
 * Replace `(<command> || true)` idiom with `not <command>`
 * Add `REQUIRES: shell` on tests that invoke a shell script

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D89368
2021-06-10 05:13:44 -05:00

42 lines
826 B
Fortran

! RUN: %S/test_errors.sh %s %t %flang -fopenmp
! REQUIRES: shell
! Check OpenMP 2.17 Nesting of Regions
N = 1024
!$omp do
do i = 1, N
!ERROR: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region
!$omp do
do j = 1, N
a = 3.14
enddo
enddo
!$omp do
do i = 1, N
!$omp target
do k = 1,N
!ERROR: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region
!$omp do
do j = 1, N
a = 3.14
enddo
enddo
!$omp end target
enddo
!$omp do
do i = 1, N
!$omp parallel
do k = 1,N
!$omp do
do j = 1, N
a = 3.14
enddo
enddo
!$omp end parallel
enddo
end