[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-do-schedule04.f90
blobb3fcd65720ef17047d6b45609a3abdc00878d571
1 ! RUN: %S/test_symbols.sh %s %t %flang_fc1 -fopenmp
2 ! REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.7.1 Schedule Clause
5 ! Test that does not catch non constant integer expressions like xx - yy.
7 !DEF: /tds (Subroutine) Subprogram
8 subroutine tds
9 implicit none
10 !DEF: /tds/a ObjectEntity REAL(4)
11 !DEF: /tds/y ObjectEntity REAL(4)
12 !DEF: /tds/z ObjectEntity REAL(4)
13 real a(100),y(100),z(100)
14 !DEF: /tds/i ObjectEntity INTEGER(4)
15 !DEF: /tds/j ObjectEntity INTEGER(4)
16 !DEF: /tds/k ObjectEntity INTEGER(4)
17 integer i,j,k
19 !REF: /tds/j
20 j = 11
21 !REF: /tds/k
22 k = 12
23 !$omp do schedule(static,j-k)
24 !DEF: /tds/Block1/i (OmpPrivate,OmpPreDetermined) HostAssoc INTEGER(4)
25 do i = 1,10
26 !REF: /tds/y
27 !REF: /tds/Block1/i
28 !REF: /tds/z
29 !REF: /tds/a
30 y(i) = z(i-1)+a(i)
31 end do
32 !$omp end do
33 end subroutine tds