1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Forward references to derived types (non-error cases)
4 !DEF: /main MainProgram
6 !DEF: /main/t1 DerivedType
8 !DEF: /main/t2 DerivedType
9 !DEF: /main/t1/t1a ALLOCATABLE ObjectEntity TYPE(t2)
10 type(t2
), allocatable
:: t1a
12 !DEF: /main/t1/t1p POINTER ObjectEntity TYPE(t2)
13 type(t2
), pointer :: t1p
18 !DEF: /main/t2/t2a ALLOCATABLE ObjectEntity TYPE(t2)
19 type(t2
), allocatable
:: t2a
21 !DEF: /main/t2/t2p POINTER ObjectEntity TYPE(t2)
22 type(t2
), pointer :: t2p
25 !DEF: /main/t1x TARGET ObjectEntity TYPE(t1)
26 type(t1
), target
:: t1x
42 t1x
%t1a
%t2p
=> t1x
%t1a
%t2a
44 !DEF: /f1/fwd DerivedType
45 !DEF: /f1 (Function) Subprogram TYPE(fwd)
46 !DEF: /f1/n (Implicit) ObjectEntity INTEGER(4)
47 type(fwd
) function f1(n
)
50 !DEF: /f1/fwd/n ObjectEntity INTEGER(4)
53 !DEF: /f1/f1 ObjectEntity TYPE(fwd)
58 !DEF: /s1 (Subroutine) Subprogram
59 !DEF: /s1/q1 (Implicit) ObjectEntity TYPE(fwd)
61 !DEF: /s1/fwd DerivedType
65 !DEF: /s1/fwd/n ObjectEntity INTEGER(4)
72 !DEF: /f2/fwdpdt DerivedType
73 !DEF: /f2/kind INTRINSIC, PURE (Function) ProcEntity
74 !DEF: /f2 (Function) Subprogram TYPE(fwdpdt(k=4_4))
75 !DEF: /f2/n (Implicit) ObjectEntity INTEGER(4)
76 type(fwdpdt(kind(0))) function f2(n
)
78 !DEF: /f2/fwdpdt/k TypeParam INTEGER(4)
83 !DEF: /f2/fwdpdt/n ObjectEntity INTEGER(int(int(k,kind=4),kind=8))
86 !DEF: /f2/f2 ObjectEntity TYPE(fwdpdt(k=4_4))
87 !DEF: /f2/DerivedType2/n ObjectEntity INTEGER(4)
91 !DEF: /s2 (Subroutine) Subprogram
92 !DEF: /s2/q1 (Implicit) ObjectEntity TYPE(fwdpdt(k=4_4))
94 !DEF: /s2/fwdpdt DerivedType
95 !DEF: /s2/kind INTRINSIC, PURE (Function) ProcEntity
96 implicit type(fwdpdt(kind(0)))(q
)
98 !DEF: /s2/fwdpdt/k TypeParam INTEGER(4)
103 !DEF: /s2/fwdpdt/n ObjectEntity INTEGER(int(int(k,kind=4),kind=8))
107 !DEF: /s2/DerivedType2/n ObjectEntity INTEGER(4)
112 !DEF: /m1/forward PRIVATE DerivedType
114 !DEF: /m1/base PUBLIC DerivedType
117 !DEF: /m1/base/p POINTER ObjectEntity CLASS(forward)
118 class(forward
), pointer :: p
122 type, extends(base
) :: forward
123 !DEF: /m1/forward/n ObjectEntity INTEGER(4)
127 !DEF: /m1/test PUBLIC (Subroutine) Subprogram
130 !DEF: /m1/test/object TARGET ObjectEntity TYPE(forward)
131 type(forward
), target
:: object
132 !REF: /m1/test/object
135 !REF: /m1/test/object