This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/78239] [5/6/7 Regression] ICE in char_len_param_value, at fortran/decl.c:926, with -fimplicit-none
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 08 Nov 2016 18:28:41 +0000
- Subject: [Bug fortran/78239] [5/6/7 Regression] ICE in char_len_param_value, at fortran/decl.c:926, with -fimplicit-none
- Auto-submitted: auto-generated
- References: <bug-78239-4@http.gcc.gnu.org/bugzilla/>
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 <<