4 ! The BTYPEINSTANCE%CALLBACK() typebound call was resolved incorrectly to
5 ! A's CALLBACK procedure instead of B's because the CALLBACK name is ambiguous
6 ! in the MAIN namespace.
8 ! Original testcase by someone <ortp21@gmail.com>
17 subroutine callback( callback_
, i
)
19 class(aType
) :: callback_
23 end subroutine callback
25 subroutine solver( callback_
, i
)
27 class(aType
) :: callback_
30 call callback_
%callback(i
)
37 type, extends(aType
) :: bType
43 subroutine callback( callback_
, i
)
45 class(bType
) :: callback_
49 end subroutine callback
62 type(aType
) :: aTypeInstance
63 type(bType
) :: bTypeInstance
69 call bTypeInstance
%callback(iflag
)
70 if (iflag
/= 7) call abort
72 call solver( bTypeInstance
, iflag
)
73 if (iflag
/= 7) call abort
76 call aTypeInstance
%callback(iflag
)
77 if (iflag
/= 3) call abort
84 type(aType
) :: aTypeInstance
85 type(bType
) :: bTypeInstance
91 call bTypeInstance
%callback(iflag
)
92 if (iflag
/= 7) call abort
94 call solver( bTypeInstance
, iflag
)
95 if (iflag
/= 7) call abort
98 call aTypeInstance
%callback(iflag
)
99 if (iflag
/= 3) call abort