https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77612
Bug ID: 77612 Summary: ICE on invalid character len in contained procedure Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: spam.brian.taylor at gmail dot com Target Milestone: --- The following code causes gfortran 6.2.0 to ICE: user@host $ cat bad_len.f90 program bad_len implicit none contains subroutine sub() character(len = make_gfortran_ICE) :: line end subroutine end program user@host $ gfortran bad_len.f90 bad_len.f90:6:0: subroutine sub() internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1064 bad_len.f90:6:0: internal compiler error: Abort trap: 6 gfortran: internal compiler error: Abort trap: 6 (program f951) Please submit a full bug report, with preprocessed source if appropriate. user@host $ gfortran --version GNU Fortran (Homebrew gcc 6.2.0 --without-multilib) 6.2.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If "implicit none" is commented out, gfortran stops with a reasonable error message: bad_len.f90:7:19: character(len = make_gfortran_ICE) :: line 1 Error: Variable 'make_gfortran_ice' cannot appear in the expression at (1)