[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-symbol07.f90
blobf333e572fe2d16806960bbc4b3f5fb936013059d
1 ! RUN: %S/test_symbols.sh %s %t %flang_fc1 -fopenmp
2 ! REQUIRES: shell
4 ! Generic tests
5 ! 1. subroutine or function calls should not be fixed for DSA or DMA
7 !DEF: /foo (Function) Subprogram REAL(4)
8 !DEF: /foo/rnum ObjectEntity REAL(4)
9 function foo(rnum)
10 !REF: /foo/rnum
11 real rnum
12 !REF: /foo/rnum
13 rnum = rnum+1.
14 end function foo
15 !DEF: /function_call_in_region EXTERNAL (Subroutine) Subprogram
16 subroutine function_call_in_region
17 implicit none
18 !DEF: /function_call_in_region/foo (Function) ProcEntity REAL(4)
19 real foo
20 !DEF: /function_call_in_region/a ObjectEntity REAL(4)
21 real :: a = 0.
22 !DEF: /function_call_in_region/b ObjectEntity REAL(4)
23 real :: b = 5.
24 !$omp parallel default(none) private(a) shared(b)
25 !DEF: /function_call_in_region/Block1/a (OmpPrivate) HostAssoc REAL(4)
26 !REF: /function_call_in_region/foo
27 !REF: /function_call_in_region/b
28 a = foo(b)
29 !$omp end parallel
30 !REF: /function_call_in_region/a
31 !REF: /function_call_in_region/b
32 print *, a, b
33 end subroutine function_call_in_region
34 !DEF: /mm MainProgram
35 program mm
36 !REF: /function_call_in_region
37 call function_call_in_region
38 end program mm