[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-symbol04.f90
blob0f18b8b595d439157df4c3230dc9a96f7c23cef9
1 ! RUN: %S/test_symbols.sh %s %t %flang_fc1 -fopenmp
2 ! REQUIRES: shell
4 ! 2.15.3 Data-Sharing Attribute Clauses
5 ! Both PARALLEL and DO (worksharing) directives need to create new scope,
6 ! so PRIVATE `a` will have new symbol in each region
8 !DEF: /MainProgram1/a ObjectEntity REAL(8)
9 real*8 a
10 !REF: /MainProgram1/a
11 a = 3.14
12 !$omp parallel private(a)
13 !DEF: /MainProgram1/Block1/a (OmpPrivate) HostAssoc REAL(8)
14 a = 2.
15 !$omp do private(a)
16 !DEF: /MainProgram1/Block1/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
17 do i=1,10
18 !DEF: /MainProgram1/Block1/Block1/a (OmpPrivate) HostAssoc REAL(8)
19 a = 1.
20 end do
21 !$omp end parallel
22 !REF: /MainProgram1/a
23 print *, a
24 end program