[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / symbol01.f90
bloba40a8563fde1f8ea484e8c6562fb3a7bb88080eb
1 ! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
3 ! Test clauses that accept list.
4 ! 2.1 Directive Format
5 ! A list consists of a comma-separated collection of one or more list items.
6 ! A list item is a variable, array section or common block name (enclosed in
7 ! slashes).
9 !DEF: /md Module
10 module md
11 !DEF: /md/myty PUBLIC DerivedType
12 type :: myty
13 !DEF: /md/myty/a ObjectEntity REAL(4)
14 real :: a
15 !DEF: /md/myty/b ObjectEntity INTEGER(4)
16 integer :: b
17 end type myty
18 end module md
19 !DEF: /mm MainProgram
20 program mm
21 !REF: /md
22 use :: md
23 !DEF: /mm/c CommonBlockDetails
24 !DEF: /mm/x ObjectEntity REAL(4)
25 !DEF: /mm/y ObjectEntity REAL(4)
26 common /c/x, y
27 !REF: /mm/x
28 !REF: /mm/y
29 real x, y
30 !DEF: /mm/myty Use
31 !DEF: /mm/t ObjectEntity TYPE(myty)
32 type(myty) :: t
33 !DEF: /mm/b ObjectEntity INTEGER(4)
34 integer b(10)
35 !REF: /mm/t
36 !REF: /md/myty/a
37 t%a = 3.14
38 !REF: /mm/t
39 !REF: /md/myty/b
40 t%b = 1
41 !REF: /mm/b
42 b = 2
43 !DEF: /mm/a (Implicit) ObjectEntity REAL(4)
44 a = 1.0
45 !DEF: /mm/c (Implicit) ObjectEntity REAL(4)
46 c = 2.0
47 !$omp parallel do private(a,t,/c/) shared(c)
48 !DEF: /mm/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
49 do i=1,10
50 !DEF: /mm/OtherConstruct1/a (OmpPrivate) HostAssoc REAL(4)
51 !DEF: /mm/OtherConstruct1/b HostAssoc INTEGER(4)
52 !REF: /mm/OtherConstruct1/i
53 a = a+b(i)
54 !DEF: /mm/OtherConstruct1/t (OmpPrivate) HostAssoc TYPE(myty)
55 !REF: /md/myty/a
56 !REF: /mm/OtherConstruct1/i
57 t%a = i
58 !DEF: /mm/OtherConstruct1/y (OmpPrivate) HostAssoc REAL(4)
59 y = 0.
60 !DEF: /mm/OtherConstruct1/x (OmpPrivate) HostAssoc REAL(4)
61 !REF: /mm/OtherConstruct1/a
62 !REF: /mm/OtherConstruct1/i
63 !REF: /mm/OtherConstruct1/y
64 x = a+i+y
65 !DEF: /mm/OtherConstruct1/c (OmpShared) HostAssoc REAL(4)
66 c = 3.0
67 end do
68 end program