[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-do06.f90
blobf39b0cd319255eb22944ee868109aebf8c17c618
1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 ! REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.7.1 Loop Construct
5 ! The ordered clause must be present on the loop construct if any ordered
6 ! region ever binds to a loop region arising from the loop construct.
8 program omp_do
9 integer i, j, k
11 !$omp do
12 do i = 1, 10
13 !ERROR: The ORDERED clause must be present on the loop construct if any ORDERED region ever binds to a loop region arising from the loop construct.
14 !$omp ordered
15 call my_func()
16 !$omp end ordered
17 end do
18 !$omp end do
20 !$omp do ordered private(i)
21 do i = 1, 10
22 !$omp parallel do
23 do j = 1, 10
24 print *,i
25 !ERROR: The ORDERED clause must be present on the loop construct if any ORDERED region ever binds to a loop region arising from the loop construct.
26 !$omp ordered
27 print *,i
28 !$omp end ordered
29 end do
30 !$omp end parallel do
31 end do
32 !$omp end do
34 end program omp_do