[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-do-ordered-positivecases.f90
blobbb571bb79daca33d09f431f5a2a8be5263e3acec
1 !RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 !REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.7.1 Ordered Clause positive cases.
6 !DEF: /omp_doordered MainProgram
7 program omp_doordered
8 !DEF: /omp_doordered/i ObjectEntity INTEGER(4)
9 !DEF: /omp_doordered/j ObjectEntity INTEGER(4)
10 integer i, j
11 !$omp do ordered(2)
12 !DEF: /omp_doordered/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
13 do i=1,10
14 !DEF: /omp_doordered/Block1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
15 do j=1,10
16 print *, "hello"
17 end do
18 end do
19 !$omp end do
21 !REF: /omp_doordered/i
22 do i=1,10
23 !REF: /omp_doordered/j
24 do j=1,10
25 !$omp do ordered(1)
26 !DEF: /omp_doordered/Block2/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
27 do k=1,10
28 print *, "hello"
29 end do
30 !$omp end do
31 end do
32 end do
34 !$omp do ordered(1)
35 !DEF: /omp_doordered/Block3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
36 do i=1,10
37 !$omp ordered
38 !REF: /omp_doordered/j
39 do j=1,10
40 print *, "hello"
41 end do
42 !$omp end ordered
43 end do
44 !$omp end do
46 !$omp do collapse(1) ordered(2)
47 !DEF: /omp_doordered/Block4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
48 do i=1,10
49 !DEF: /omp_doordered/Block4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
50 do j=1,10
51 print *, "hello"
52 end do
53 end do
54 !$omp end do
56 !$omp parallel num_threads(4)
57 !$omp do ordered(1) collapse(1)
58 !DEF: /omp_doordered/Block5/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
59 do i=1,10
60 !$omp ordered
61 !DEF: /omp_doordered/Block5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
62 do j=1,10
63 print *, "hello"
64 end do
65 !$omp end ordered
66 end do
67 !$omp end parallel
68 end program omp_doordered