2 ! Tests the fix for PR33888, in which the character length of
3 ! the elemental function myfunc was not being calculated before
4 ! the temporary for the array result was allocated.
6 ! Contributed by Walter Spector <w6ws@earthlink.net>
11 character(8) :: indata(4) = &
12 (/ '12344321', '98766789', 'abcdefgh', 'ABCDEFGH' /)
14 call process (myfunc (indata
)) ! <- This caused a gfortran ICE !
18 elemental
function myfunc (s
)
19 character(*), intent(in
) :: s
20 character(len (s
)) :: myfunc
26 subroutine process (strings
)
27 character(*), intent(in
) :: strings(:)
29 if (any (strings
.ne
. indata
)) STOP 1