1 ! RUN: %flang_fc1 -fdebug-dump-symbols %s 2>&1 | FileCheck %s
5 procedure
, private
, nopass
:: tbp
=> sub_a
10 procedure
, private
, nopass
:: tbp
=> sub_aa
12 type, extends(aa
) :: aaa
14 procedure
, public
, nopass
:: tbp
=> sub_aaa
18 character*(*), intent(in
) :: w
22 character*(*), intent(in
) :: w
26 character*(*), intent(in
) :: w
32 call xa
%tbp('type(a) tbp')
33 call xaa
%tbp('type(aa) tbp')
36 class(a
), intent(in
) :: x
37 character*(*), intent(in
) :: w
38 call x
%tbp('class(a) ' // w
// ' tbp')
39 call x
%gen('class(a) ' // w
// ' gen')
46 class(aa
), intent(in
) :: x
47 character*(*), intent(in
) :: w
48 call x
%tbp('class(aa) ' // w
// ' tbp')
49 call x
%gen('class(aa) ' // w
// ' gen')
55 class(aaa
), intent(in
) :: x
56 character*(*), intent(in
) :: w
57 call x
%tbp('class(aaa) ' // w
// ' tbp')
58 call x
%gen('class(aaa) ' // w
// ' gen')
61 call paaa(aaa(), 'aaa')
67 type, extends(a
) :: ab
69 procedure
, public
, nopass
:: tbp
=> sub_ab
71 type, extends(aa
) :: aab
73 procedure
, public
, nopass
:: tbp
=> sub_aab
75 type, extends(aaa
) :: aaab
77 procedure
, public
, nopass
:: tbp
=> sub_aaab
79 type, extends(ab
) :: aba
81 procedure
, public
, nopass
:: tbp
=> sub_aba
83 type, extends(aab
) :: aaba
85 procedure
, public
, nopass
:: tbp
=> sub_aaba
87 type, extends(aaab
) :: aaaba
89 procedure
, public
, nopass
:: tbp
=> sub_aaaba
93 character*(*), intent(in
) :: w
97 character*(*), intent(in
) :: w
100 subroutine sub_aaab(w
)
101 character*(*), intent(in
) :: w
102 print *, w
, ' -> aaab'
104 subroutine sub_aba(w
)
105 character*(*), intent(in
) :: w
106 print *, w
, ' -> aba'
108 subroutine sub_aaba(w
)
109 character*(*), intent(in
) :: w
110 print *, w
, ' -> aaba'
112 subroutine sub_aaaba(w
)
113 character*(*), intent(in
) :: w
114 print *, w
, ' -> aaaba'
130 type(aaaba
) :: xaaaba
131 call xa
%gen('type(a) gen')
132 call xaa
%gen('type(aa) gen')
133 call xaaa
%tbp('type(aaa) tbp')
134 call xaaa
%gen('type(aaa) gen')
135 call xab
%tbp('type(ab) tbp')
136 call xab
%gen('type(ab) gen')
137 call xaab
%tbp('type(aab) tbp')
138 call xaab
%gen('type(aab) gen')
139 call xaaab
%tbp('type(aaab) tbp')
140 call xaaab
%gen('type(aaab) gen')
141 call xaba
%tbp('type(aba) tbp')
142 call xaba
%gen('type(aba) gen')
143 call xaaba
%tbp('type(aaba) tbp')
144 call xaaba
%gen('type(aaba) gen')
145 call xaaaba
%tbp('type(aaaba) tbp')
146 call xaaaba
%gen('type(aaaba) gen')
151 call pa(aaa(), 'aaa')
153 call pa(aab(), 'aab')
154 call pa(aaab(), 'aaab')
155 call pa(aba(), 'aba')
156 call pa(aaba(), 'aaba')
157 call pa(aaaba(), 'aaaba')
161 call paa(aaa(), 'aaa')
162 call paa(aab(), 'aab')
163 call paa(aaab(), 'aaab')
164 call paa(aaba(), 'aaba')
165 call paa(aaaba(), 'aaaba')
168 call paaa(aaa(), 'aaa')
169 call paaa(aaab(), 'aaab')
170 call paaa(aaaba(), 'aaaba')
173 class(ab
), intent(in
) :: x
174 character*(*), intent(in
) :: w
175 call x
%tbp('class(ab) ' // w
// ' tbp')
176 call x
%gen('class(ab) ' // w
// ' gen')
180 call pab(aba(), 'aba')
182 subroutine paab(x
, w
)
183 class(aab
), intent(in
) :: x
184 character*(*), intent(in
) :: w
185 call x
%tbp('class(aab) ' // w
// ' tbp')
186 call x
%gen('class(aab) ' // w
// ' gen')
189 call pa(aab(), 'aab')
190 call pa(aaba(), 'aaba')
192 subroutine paaab(x
, w
)
193 class(aaab
), intent(in
) :: x
194 character*(*), intent(in
) :: w
195 call x
%tbp('class(aaab) ' // w
// ' tbp')
196 call x
%gen('class(aaab) ' // w
// ' gen')
199 call pa(aaab(), 'aaab')
200 call pa(aaaba(), 'aaaba')
202 subroutine paba(x
, w
)
203 class(aba
), intent(in
) :: x
204 character*(*), intent(in
) :: w
205 call x
%tbp('class(aba) ' // w
// ' tbp')
206 call x
%gen('class(aba) ' // w
// ' gen')
209 call paba(aba(), 'aba')
211 subroutine paaba(x
, w
)
212 class(aaba
), intent(in
) :: x
213 character*(*), intent(in
) :: w
214 call x
%tbp('class(aaba) ' // w
// ' tbp')
215 call x
%gen('class(aaba) ' // w
// ' gen')
218 call paaba(aaba(), 'aaba')
220 subroutine paaaba(x
, w
)
221 class(aaaba
), intent(in
) :: x
222 character*(*), intent(in
) :: w
223 call x
%tbp('class(aaaba) ' // w
// ' tbp')
224 call x
%gen('class(aaaba) ' // w
// ' gen')
227 call pa(aaaba(), 'aaaba')
249 !CHECK: .v.a, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:0_8 init:[binding::binding(proc=sub_a,name=.n.tbp)]
250 !CHECK: .v.aa, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:0_8 init:[binding::binding(proc=sub_aa,name=.n.tbp)]
251 !CHECK: .v.aaa, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:0_8 init:[binding::binding(proc=sub_aaa,name=.n.tbp)]
252 !CHECK: .v.aaab, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:0_8 init:[binding::binding(proc=sub_aaab,name=.n.tbp)]
253 !CHECK: .v.aaaba, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:0_8 init:[binding::binding(proc=sub_aaaba,name=.n.tbp)]
254 !CHECK: .v.aab, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:1_8 init:[binding::binding(proc=sub_aa,name=.n.tbp),binding(proc=sub_aab,name=.n.tbp)]
255 !CHECK: .v.aaba, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:1_8 init:[binding::binding(proc=sub_aa,name=.n.tbp),binding(proc=sub_aaba,name=.n.tbp)]
256 !CHECK: .v.ab, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:1_8 init:[binding::binding(proc=sub_a,name=.n.tbp),binding(proc=sub_ab,name=.n.tbp)]
257 !CHECK: .v.aba, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:1_8 init:[binding::binding(proc=sub_a,name=.n.tbp),binding(proc=sub_aba,name=.n.tbp)]
258 !CHECK: tbp, NOPASS, PUBLIC: ProcBinding => sub_ab numPrivatesNotOverridden: 1
259 !CHECK: tbp, NOPASS, PUBLIC: ProcBinding => sub_aab numPrivatesNotOverridden: 1
260 !CHECK: tbp, NOPASS, PUBLIC: ProcBinding => sub_aba numPrivatesNotOverridden: 1
261 !CHECK: tbp, NOPASS, PUBLIC: ProcBinding => sub_aaba numPrivatesNotOverridden: 1