1 ! RUN: %S/test_symbols.sh %s %t %flang_fc1
3 ! Forward references to derived types (non-error cases)
5 !DEF: /main MainProgram
7 !DEF: /main/t1 DerivedType
9 !DEF: /main/t2 DerivedType
10 !DEF: /main/t1/t1a ALLOCATABLE ObjectEntity TYPE(t2)
11 type(t2
), allocatable
:: t1a
13 !DEF: /main/t1/t1p POINTER ObjectEntity TYPE(t2)
14 type(t2
), pointer :: t1p
19 !DEF: /main/t2/t2a ALLOCATABLE ObjectEntity TYPE(t2)
20 type(t2
), allocatable
:: t2a
22 !DEF: /main/t2/t2p POINTER ObjectEntity TYPE(t2)
23 type(t2
), pointer :: t2p
26 !DEF: /main/t1x TARGET ObjectEntity TYPE(t1)
27 type(t1
), target
:: t1x
43 t1x
%t1a
%t2p
=> t1x
%t1a
%t2a
45 !DEF: /f1/fwd DerivedType
46 !DEF: /f1 (Function) Subprogram TYPE(fwd)
47 !DEF: /f1/n (Implicit) ObjectEntity INTEGER(4)
48 type(fwd
) function f1(n
)
51 !DEF: /f1/fwd/n ObjectEntity INTEGER(4)
54 !DEF: /f1/f1 ObjectEntity TYPE(fwd)
59 !DEF: /s1 (Subroutine) Subprogram
60 !DEF: /s1/q1 (Implicit) ObjectEntity TYPE(fwd)
62 !DEF: /s1/fwd DerivedType
66 !DEF: /s1/fwd/n ObjectEntity INTEGER(4)
73 !DEF: /f2/fwdpdt DerivedType
74 !DEF: /f2/kind INTRINSIC, PURE (Function) ProcEntity
75 !DEF: /f2 (Function) Subprogram TYPE(fwdpdt(k=4_4))
76 !DEF: /f2/n (Implicit) ObjectEntity INTEGER(4)
77 type(fwdpdt(kind(0))) function f2(n
)
79 !DEF: /f2/fwdpdt/k TypeParam INTEGER(4)
84 !DEF: /f2/fwdpdt/n ObjectEntity INTEGER(int(int(k,kind=4),kind=8))
87 !DEF: /f2/f2 ObjectEntity TYPE(fwdpdt(k=4_4))
88 !DEF: /f2/DerivedType2/n ObjectEntity INTEGER(4)
92 !DEF: /s2 (Subroutine) Subprogram
93 !DEF: /s2/q1 (Implicit) ObjectEntity TYPE(fwdpdt(k=4_4))
95 !DEF: /s2/fwdpdt DerivedType
96 !DEF: /s2/kind INTRINSIC, PURE (Function) ProcEntity
97 implicit type(fwdpdt(kind(0)))(q
)
99 !DEF: /s2/fwdpdt/k TypeParam INTEGER(4)
104 !DEF: /s2/fwdpdt/n ObjectEntity INTEGER(int(int(k,kind=4),kind=8))
108 !DEF: /s2/DerivedType2/n ObjectEntity INTEGER(4)
113 !DEF: /m1/forward PRIVATE DerivedType
115 !DEF: /m1/base PUBLIC DerivedType
118 !DEF: /m1/base/p POINTER ObjectEntity CLASS(forward)
119 class(forward
), pointer :: p
123 type, extends(base
) :: forward
124 !DEF: /m1/forward/n ObjectEntity INTEGER(4)
128 !DEF: /m1/test PUBLIC (Subroutine) Subprogram
131 !DEF: /m1/test/object TARGET ObjectEntity TYPE(forward)
132 type(forward
), target
:: object
133 !REF: /m1/test/object
136 !REF: /m1/test/object