[Bug fortran/87239] ICE in deferred-length string
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 6 16:40:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87239
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-09-06
Ever confirmed|0 |1
--- Comment #3 from janus at gcc dot gnu.org ---
I can confirm the ICE with all gfortran versions I tried (5 to trunk). Slightly
reduced test case (a separate module is not necessary):
program main
implicit none
character(3), parameter :: inp( 2 ) = [ 'aaa', 'bbb' ]
character(:), allocatable :: out(:)
out = gettwo( inp )
print *, out
contains
elemental function gettwo( s ) result( res )
character(*), intent(in) :: s
character(2) :: res
res = s(1:2)
end function
end
More information about the Gcc-bugs
mailing list