blob: 46780add84607b57f24e76c92a17270676b7dd30 [file] [edit]
! Test that non-rectangular collapsed loop nests produce a clear TODO error
! rather than generating incorrect code that crashes at runtime.
! RUN: not %flang_fc1 -emit-fir -fopenmp -fopenmp-version=50 %s -o - 2>&1 | FileCheck %s
! CHECK: not yet implemented: Non-rectangular loop nests with COLLAPSE are not yet supported
! Non-rectangular: upper bound of inner loop depends on outer IV
subroutine non_rect_ub(N)
implicit none
integer, intent(in) :: N
integer :: arr(N,N)
integer :: i, j
!$omp parallel do collapse(2)
do i = 1, N
do j = 1, i
arr(j,i) = 1
end do
end do
end subroutine