1 ! RUN: %flang_fc1 -fdebug-dump-symbols %s 2>&1 | FileCheck %s
5 procedure
, private
, nopass
:: tbp_private
=> sub_a1
6 procedure
, public
, nopass
:: tbp_public
=> sub_a2
7 generic
, public
:: gen
=> tbp_private
, tbp_public
11 character*(*), intent(in
) :: w
14 subroutine sub_a2(w
, j
)
15 character*(*), intent(in
) :: w
16 integer, intent(in
) :: j
19 subroutine test_mono_a
21 call x
%tbp_private('type(a) tbp_private')
22 call x
%tbp_public('type(a) tbp_public', 0)
23 call x
%gen('type(a) gen 1')
24 call x
%gen('type(a) gen 2', 0)
26 subroutine test_poly_a(x
, w
)
27 class(a
), intent(in
) :: x
28 character*(*), intent(in
) :: w
29 call x
%tbp_private('class(a) (' // w
// ') tbp_private')
30 call x
%tbp_public('class(a) (' // w
// ') tbp_public', 0)
31 call x
%gen('class(a) (' // w
// ') gen 1')
32 call x
%gen('class(a) (' // w
// ') gen 2', 0)
38 type, extends(a
) :: ab
40 procedure
, private
, nopass
:: tbp_private
=> sub_ab1
41 procedure
, public
, nopass
:: tbp_public
=> sub_ab2
45 character*(*), intent(in
) :: w
48 subroutine sub_ab2(w
, j
)
49 character*(*), intent(in
) :: w
50 integer, intent(in
) :: j
53 subroutine test_mono_ab
55 call x
%tbp_private('type(ab) tbp_private')
56 call x
%tbp_public('type(ab) tbp_public', 0)
57 call x
%gen('type(ab) gen 1')
58 call x
%gen('type(ab) gen 2', 0)
60 subroutine test_poly_ab(x
, w
)
61 class(ab
), intent(in
) :: x
62 character*(*), intent(in
) :: w
63 call x
%tbp_private('class(ab) (' // w
// ') tbp_private')
64 call x
%tbp_public('class(ab) (' // w
// ') tbp_public', 0)
65 call x
%gen('class(ab) (' // w
// ') gen 1')
66 call x
%gen('class(ab) (' // w
// ') gen 2', 0)
74 call test_poly_a(a(), 'a')
75 call test_poly_a(ab(), 'ab')
76 call test_poly_ab(ab(), 'ab')
79 !CHECK: .v.a, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:1_8 init:[binding::binding(proc=sub_a1,name=.n.tbp_private),binding(proc=sub_a2,name=.n.tbp_public)]
80 !CHECK: .v.ab, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(binding) shape: 0_8:2_8 init:[binding::binding(proc=sub_a1,name=.n.tbp_private),binding(proc=sub_ab2,name=.n.tbp_public),binding(proc=sub_ab1,name=.n.tbp_private)]
81 !CHECK: tbp_private, NOPASS, PRIVATE: ProcBinding => sub_ab1 numPrivatesNotOverridden: 1