This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/78239] [5/6/7 Regression] ICE in char_len_param_value, at fortran/decl.c:926, with -fimplicit-none


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 <<

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]