[Bug fortran/67883] ICE on empty array constructor of character function
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jun 10 22:19:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67883
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Gerhard Steinmetz from comment #0)
> With an effectively empty (i=m,n and m>n) array constructor :
>
>
> $ cat z1.f90
> program p
> integer i
> print *, [(f(i), i=2,1)]
> contains
> function f(n)
> integer :: n
> character(:), allocatable :: f
> character(3) :: c = 'abc'
> f = c(n:n)
> end
> end
>
>
> $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1.f90
> z1.f90:3:25:
>
> print *, [(f(i), i=2,1)]
> 1
> Warning: DO loop at (1) will be executed zero times [-Wzerotrip]
> f951: internal compiler error: in gfc_resolve_character_array_constructor,
> at fortran/array.c:1955
trunk can now compile this code.
More information about the Gcc-bugs
mailing list