[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-do03.f90
blob67002e924dac8f7b786ddcb976e32455ebf0ba65
1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 ! REQUIRES: shell
4 ! OpenMP Version 4.5
5 ! 2.7.1 Loop Construct
6 ! Semantic error for correct test case
8 program omp_do
9 integer i, j, k
10 integer :: a(10), b(10)
11 a = 10
12 j = 0
14 !$omp parallel
15 !$omp do linear(j:1)
16 do i = 1, 10
17 j = j + 1
18 b(i) = a(i) * 2.0
19 end do
20 !$omp end do
21 !$omp end parallel
23 print *, j
24 print *, b
26 end program omp_do