2 ! Test the fix for PR93678 in which the charlen for the 'unpackbytes'
3 ! vtable field was incomplete and caused the ICE as indicated.
4 ! Contributed by Luis Kornblueh <mail.luis@web.de>
6 ! The testcase was reduced by various gfortran regulars.
12 procedure
:: unpackbytes
=> b_unpackbytes
15 function b_unpackbytes (me
) result (res
)
16 class(t_b
), intent(inout
) :: me
19 end function b_unpackbytes
20 subroutine b_unpackint (me
, c
)
21 class(t_b
), intent(inout
) :: me
22 character, intent(in
) :: c
23 ! print *, b_unpackbytes (me) ! ok
24 if (any (me
% unpackbytes () .ne
. c
)) stop 1 ! ICEd here
25 end subroutine b_unpackint
29 class(t_b
), allocatable
:: z
30 allocate (z
, source
= t_b(97))
31 call b_unpackint (z
, "a")