[Bug fortran/77604] ICE in get_frame_type, at tree-nested.c:208
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Sep 15 17:48:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77604
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
A "scalar" version works :
$ cat y1.f90
program p
call s
contains
function f(x, y) result(z)
character(*), intent(in) :: x, y
character(len(x)**len(y)) :: z
z = x // y
end
subroutine g(x)
character(*), intent(in) :: x
print *, 'inside g :', len(x), x
end
subroutine s
call g( f('ab', 'xyz') )
end
end
$ gfortran-7-20160911 y1.f90
$ a.out
inside g : 8 abxyz
---
Case from comment 0 also works with a simpler operation like "*" :
$ cat z2.f90
program p
call s
contains
elemental function f(x, y) result(z)
character(*), intent(in) :: x, y
character(len(x)*len(y)) :: z
z = x // y
end
subroutine g(x)
character(*), intent(in) :: x(:)
print *, 'inside g :', len(x), size(x), x
end
subroutine s
call g( f(['ab'], ['xyz']) )
end
end
$ gfortran-7-20160911 z2.f90
$ a.out
inside g : 6 1 abxyz
$
More information about the Gcc-bugs
mailing list