1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Forward references in pointer initializers and TBP bindings.
8 !DEF: /m/iface ABSTRACT, PUBLIC (Subroutine) Subprogram
12 !DEF: /m/op1 POINTER, PUBLIC ObjectEntity REAL(4)
14 !DEF: /m/op2 POINTER, PUBLIC ObjectEntity REAL(4)
15 !DEF: /m/null INTRINSIC, PUBLIC, PURE (Function) ProcEntity
16 real, pointer :: op2
=> null()
17 !DEF: /m/op3 POINTER, PUBLIC (InDataStmt) ObjectEntity REAL(4)
18 !DEF: /m/x PUBLIC, TARGET ObjectEntity REAL(4)
19 real, pointer :: op3
=> x
20 !DEF: /m/op4 POINTER, PUBLIC (InDataStmt) ObjectEntity REAL(4)
21 !DEF: /m/y PUBLIC, TARGET ObjectEntity REAL(4)
22 real, pointer :: op4
=> y(1)
24 !DEF: /m/pp1 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
25 procedure(iface
), pointer :: pp1
27 !DEF: /m/pp2 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
29 procedure(iface
), pointer :: pp2
=> null()
31 !DEF: /m/pp3 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
32 !DEF: /m/ext1 EXTERNAL, PUBLIC (Subroutine) ProcEntity
33 procedure(iface
), pointer :: pp3
=> ext1
35 !DEF: /m/pp4 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
36 !DEF: /m/ext2 EXTERNAL, PUBLIC (Subroutine) Subprogram
37 procedure(iface
), pointer :: pp4
=> ext2
39 !DEF: /m/pp5 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
40 !DEF: /m/ext3 EXTERNAL, PUBLIC (Subroutine) ProcEntity
41 procedure(iface
), pointer :: pp5
=> ext3
43 !DEF: /m/pp6 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
44 !DEF: /m/modproc1 PUBLIC (Subroutine) Subprogram
45 procedure(iface
), pointer :: pp6
=> modproc1
46 !DEF: /m/t1 PUBLIC DerivedType
48 !DEF: /m/t1/opc1 POINTER ObjectEntity REAL(4)
50 !DEF: /m/t1/opc2 POINTER ObjectEntity REAL(4)
52 real, pointer :: opc2
=> null()
53 !DEF: /m/t1/opc3 POINTER (InDataStmt) ObjectEntity REAL(4)
55 real, pointer :: opc3
=> x
56 !DEF: /m/t1/opc4 POINTER (InDataStmt) ObjectEntity REAL(4)
58 real, pointer :: opc4
=> y(1)
60 !DEF: /m/t1/ppc1 NOPASS, POINTER (Subroutine) ProcEntity
61 procedure(iface
), nopass
, pointer :: ppc1
63 !DEF: /m/t1/ppc2 NOPASS, POINTER (Subroutine) ProcEntity
65 procedure(iface
), nopass
, pointer :: ppc2
=> null()
67 !DEF: /m/t1/ppc3 NOPASS, POINTER (Subroutine) ProcEntity
69 procedure(iface
), nopass
, pointer :: ppc3
=> ext1
71 !DEF: /m/t1/ppc4 NOPASS, POINTER (Subroutine) ProcEntity
73 procedure(iface
), nopass
, pointer :: ppc4
=> ext2
75 !DEF: /m/t1/ppc5 NOPASS, POINTER (Subroutine) ProcEntity
77 procedure(iface
), nopass
, pointer :: ppc5
=> ext3
79 !DEF: /m/t1/ppc6 NOPASS, POINTER (Subroutine) ProcEntity
81 procedure(iface
), nopass
, pointer :: ppc6
=> modproc1
83 !DEF: /m/t1/b2 NOPASS ProcBinding
85 procedure
, nopass
:: b2
=> ext2
86 !DEF: /m/t1/b3 NOPASS ProcBinding
88 procedure
, nopass
:: b3
=> ext3
89 !DEF: /m/t1/b4 NOPASS ProcBinding
91 procedure
, nopass
:: b4
=> modproc1
93 !DEF: /m/pdt1 PUBLIC DerivedType
94 !DEF: /m/pdt1/k TypeParam INTEGER(4)
98 !DEF: /m/pdt1/opc1 POINTER ObjectEntity REAL(4)
100 !DEF: /m/pdt1/opc2 POINTER ObjectEntity REAL(4)
102 real, pointer :: opc2
=> null()
103 !DEF: /m/pdt1/opc3 POINTER (InDataStmt) ObjectEntity REAL(4)
105 real, pointer :: opc3
=> x
106 !DEF: /m/pdt1/opc4 POINTER (InDataStmt) ObjectEntity REAL(4)
109 real, pointer :: opc4
=> y(k
)
111 !DEF: /m/pdt1/ppc1 NOPASS, POINTER (Subroutine) ProcEntity
112 procedure(iface
), nopass
, pointer :: ppc1
114 !DEF: /m/pdt1/ppc2 NOPASS, POINTER (Subroutine) ProcEntity
116 procedure(iface
), nopass
, pointer :: ppc2
=> null()
118 !DEF: /m/pdt1/ppc3 NOPASS, POINTER (Subroutine) ProcEntity
120 procedure(iface
), nopass
, pointer :: ppc3
=> ext1
122 !DEF: /m/pdt1/ppc4 NOPASS, POINTER (Subroutine) ProcEntity
124 procedure(iface
), nopass
, pointer :: ppc4
=> ext2
126 !DEF: /m/pdt1/ppc5 NOPASS, POINTER (Subroutine) ProcEntity
128 procedure(iface
), nopass
, pointer :: ppc5
=> ext3
130 !DEF: /m/pdt1/ppc6 NOPASS, POINTER (Subroutine) ProcEntity
132 procedure(iface
), nopass
, pointer :: ppc6
=> modproc1
134 !DEF: /m/pdt1/b2 NOPASS ProcBinding
136 procedure
, nopass
:: b2
=> ext2
137 !DEF: /m/pdt1/b3 NOPASS ProcBinding
139 procedure
, nopass
:: b3
=> ext3
140 !DEF: /m/pdt1/b4 NOPASS ProcBinding
142 procedure
, nopass
:: b4
=> modproc1
145 !DEF: /m/t1x PUBLIC ObjectEntity TYPE(t1)
148 !DEF: /m/pdt1x PUBLIC ObjectEntity TYPE(pdt1(k=1_4))
149 type(pdt1(1)) :: pdt1x
152 real, target
:: x
, y(2)
157 procedure(iface
) :: ext3
163 !DEF: /m/op10 POINTER, PUBLIC(InDataStmt) ObjectEntity REAL(4)
165 real, pointer :: op10
=> x
166 !DEF: /m/op11 POINTER, PUBLIC(InDataStmt) ObjectEntity REAL(4)
168 real, pointer :: op11
=> y(1)
170 !DEF: /m/pp10 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
172 procedure(iface
), pointer :: pp10
=> ext1
174 !DEF: /m/pp11 EXTERNAL, POINTER, PUBLIC (Subroutine) ProcEntity
176 procedure(iface
), pointer :: pp11
=> ext2
177 !DEF: /m/t2 PUBLIC DerivedType
179 !DEF: /m/t2/opc10 POINTER (InDataStmt) ObjectEntity REAL(4)
181 real, pointer :: opc10
=> x
182 !DEF: /m/t2/opc11 POINTER (InDataStmt) ObjectEntity REAL(4)
184 real, pointer :: opc11
=> y(1)
186 !DEF: /m/t2/ppc10 NOPASS, POINTER (Subroutine) ProcEntity
188 procedure(iface
), nopass
, pointer :: ppc10
=> ext1
190 !DEF: /m/t2/ppc11 NOPASS, POINTER (Subroutine) ProcEntity
192 procedure(iface
), nopass
, pointer :: ppc11
=> ext2
194 !DEF: /m/t2/b10 NOPASS ProcBinding
196 procedure
, nopass
:: b10
=> ext2
197 !DEF: /m/t2/b11 NOPASS ProcBinding
199 procedure
, nopass
:: b11
=> ext3
201 !DEF: /m/pdt2 PUBLIC DerivedType
202 !DEF: /m/pdt2/k TypeParam INTEGER(4)
206 !DEF: /m/pdt2/opc10 POINTER (InDataStmt) ObjectEntity REAL(4)
208 real, pointer :: opc10
=> x
209 !DEF: /m/pdt2/opc11 POINTER (InDataStmt) ObjectEntity REAL(4)
212 real, pointer :: opc11
=> y(k
)
214 !DEF: /m/pdt2/ppc10 NOPASS, POINTER (Subroutine) ProcEntity
216 procedure(iface
), nopass
, pointer :: ppc10
=> ext1
218 !DEF: /m/pdt2/ppc11 NOPASS, POINTER (Subroutine) ProcEntity
220 procedure(iface
), nopass
, pointer :: ppc11
=> ext2
222 !DEF: /m/pdt2/b10 NOPASS ProcBinding
224 procedure
, nopass
:: b10
=> ext2
225 !DEF: /m/pdt2/b11 NOPASS ProcBinding
227 procedure
, nopass
:: b11
=> ext3
230 !DEF: /m/t2x PUBLIC ObjectEntity TYPE(t2)
233 !DEF: /m/pdt2x PUBLIC ObjectEntity TYPE(pdt2(k=1_4))
234 type(pdt2(1)) :: pdt2x
240 !DEF: /ext1 (Subroutine) Subprogram
243 !DEF: /ext2 (Subroutine) Subprogram
246 !DEF: /ext3 (Subroutine) Subprogram
249 !DEF: /main MainProgram
254 !DEF: /main/pdt1y ObjectEntity TYPE(pdt1(k=2_4))
255 type(pdt1(2)) :: pdt1y
257 !DEF: /main/pdt2y ObjectEntity TYPE(pdt2(k=2_4))
258 type(pdt2(2)) :: pdt2y