[Bug fortran/78239] [5/6/7 Regression] ICE in char_len_param_value, at fortran/decl.c:926, with -fimplicit-none
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Nov 8 18:28:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78239
--- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Adding an explicit declaration of "n" to snippet from comment 0 :
$ cat zz1.f90
subroutine s(n)
integer :: n
character(n) :: c
c = 'c'
print *, len(c), ' >>' // c // '<<'
end
program p
call s(2)
end
$ gfortran-7-20161106 zz1.f90
$ a.out
2 >>c <<
$ gfortran-7-20161106 -fimplicit-none zz1.f90
$ a.out
2 >>c <<
---
$ cat zz2.f90
subroutine s(n)
! integer :: n
character(n) :: c
c = 'c'
print *, len(c), ' >>' // c // '<<'
end
program p
call s(2)
end
$ gfortran-7-20161106 zz1.f90
$ a.out
2 >>c <<
More information about the Gcc-bugs
mailing list