[flang-commits] [flang] [Flang][OpenMP] Add checks for EXIT from associated loops (PR #91315)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Tue May 7 09:20:37 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
----------------
kiranchandramohan wrote:
Changed indentation for the whole loop nest.
https://github.com/llvm/llvm-project/pull/91315
More information about the flang-commits
mailing list