[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-no-dowhile-in-parallel.f90
blobb5bf947a76a6517f2426282cd88cc826af8c2043
1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 ! REQUIRES: shell
4 subroutine bug48308(x,i)
5 real :: x(:)
6 integer :: i
7 !$omp parallel firstprivate(i)
8 do while (i>0)
9 x(i) = i
10 i = i - 1
11 end do
12 !$omp end parallel
13 end subroutine
15 subroutine s1(x,i)
16 real :: x(:)
17 integer :: i
18 !$omp parallel firstprivate(i)
19 do i = 10, 1, -1
20 x(i) = i
21 end do
22 !$omp end parallel
24 !$omp parallel firstprivate(i)
25 do concurrent (i = 1:10:1)
26 x(i) = i
27 end do
28 !$omp end parallel
29 end subroutine