[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-do-collapse-positivecases.f90
blob3959a3579c93dc01ec2aad55b2bbe003cd6b08d7
1 !RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 !REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.7.1 Collapse Clause Positive cases
6 !DEF: /omp_docollapse MainProgram
7 program omp_docollapse
8 !DEF: /omp_docollapse/i ObjectEntity INTEGER(4)
9 !DEF: /omp_docollapse/j ObjectEntity INTEGER(4)
10 !DEF: /omp_docollapse/k ObjectEntity INTEGER(4)
11 integer i, j, k
12 !$omp do collapse(2)
13 !DEF: /omp_docollapse/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
14 do i=1,10
15 !DEF: /omp_docollapse/Block1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
16 do j=1,10
17 !REF: /omp_docollapse/k
18 do k=1,10
19 print *, "hello"
20 end do
21 end do
22 end do
23 !$omp end do
25 !REF: /omp_docollapse/i
26 do i=1,10
27 !$omp do collapse(2)
28 !DEF: /omp_docollapse/Block1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
29 do j=1,10
30 !DEF: /omp_docollapse/Block1/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
31 do k=1,10
32 print *, "hello"
33 end do
34 end do
35 !$omp end do
36 end do
37 end program omp_docollapse