[flang-commits] [flang] [Flang][OpenMP] Add checks for EXIT from associated loops (PR #91315)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Tue May 7 05:38:51 PDT 2024
================
@@ -135,4 +137,33 @@ program omp
end do foo
!$omp end do
+ !$omp do collapse(3)
+loopk: do k=1,10
+ loopj: do j=1,10
+ loopi: do i=1,10
+ ifi : if (.true.) then
+ !ERROR: EXIT statement to non-innermost associated loop of an OpenMP DO construct
+ if (cond(i,j,k)) exit
+ if (cond(i,j,k)) exit ifi
+ !ERROR: EXIT statement to non-innermost associated loop of an OpenMP DO construct
+ if (cond(i,j,k)) exit loopi
+ !ERROR: EXIT statement to non-innermost associated loop of an OpenMP DO construct
+ if (cond(i,j,k)) exit loopj
+ end if ifi
+ end do loopi
+ end do loopj
+ end do loopk
+ !$omp end do
+
+ !$omp do collapse(2)
+loopk: do k=1,10
+ loopj: do j=1,10
----------------
luporl wrote:
Nit: check indentation.
https://github.com/llvm/llvm-project/pull/91315
More information about the flang-commits
mailing list