blob: 7cd10518d845a945d2f5d1e35ded71d0f53c855a [file]
!RUN: %python %S/../test_errors.py %s %flang -fopenmp
integer :: i, j
! ERROR: This construct requires a perfect nest of depth 2, but the associated nest is a perfect nest of depth 1
! BECAUSE: COLLAPSE clause was specified with argument 2
!$omp parallel do collapse(2)
do i = 1, 1
! BECAUSE: DO CONCURRENT loop is not a valid affected loop
do concurrent (j = 1:2)
print *, j
end do
end do
!$omp parallel do
do i = 1, 1
! This should not lead to an error because it is not part of a loop nest:
do concurrent (j = 1:2)
print *, j
end do
end do
! ERROR: This construct requires a canonical loop nest
!$omp parallel do
! BECAUSE: DO CONCURRENT loop is not a valid affected loop
do concurrent (j = 1:2)
print *, j
end do
! ERROR: This construct requires a canonical loop nest
!$omp loop
! BECAUSE: DO CONCURRENT loop is not a valid affected loop
do concurrent (j = 1:2)
print *, j
end do
! ERROR: This construct requires a perfect nest of depth 2, but the associated nest is a perfect nest of depth 1
! BECAUSE: COLLAPSE clause was specified with argument 2
!$omp loop collapse(2)
do i = 1, 1
! BECAUSE: DO CONCURRENT loop is not a valid affected loop
do concurrent (j = 1:2)
print *, j
end do
end do
end