https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78350
Bug ID: 78350 Summary: ICE in gfc_code2string(): Bad code, at fortran/misc.c:193 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Valid code. Versions 5, 6 and 7 affected. No ICE with 4.9.0. $ cat z1.f90 module m type t character(2) :: c(1) = [character(3) :: 'abc'] end type type(t) :: x end $ gfortran-7-20161113 -c z1.f90 f951: internal compiler error: gfc_code2string(): Bad code 0x68dd2f gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1327 0x6c2242 gfc_code2string(mstring const*, int) ../../gcc/fortran/misc.c:193 0x6c3a8b mio_name ../../gcc/fortran/module.c:1721 0x6c6cd4 mio_name_expr_t ../../gcc/fortran/module.c:2091 0x6c6cd4 mio_expr ../../gcc/fortran/module.c:3396 0x6c72fc mio_charlen ../../gcc/fortran/module.c:2484 0x6c6afc mio_typespec ../../gcc/fortran/module.c:2542 0x6c6b9b mio_expr ../../gcc/fortran/module.c:3415 0x6c79e4 mio_component ../../gcc/fortran/module.c:2783 0x6c88aa mio_component_list ../../gcc/fortran/module.c:2802 0x6c88aa mio_symbol ../../gcc/fortran/module.c:4219 0x6c8d12 write_symbol ../../gcc/fortran/module.c:5594 0x6c8e77 write_symbol0 ../../gcc/fortran/module.c:5634 0x6c8e11 write_symbol0 ../../gcc/fortran/module.c:5613 0x6cbba4 write_module ../../gcc/fortran/module.c:5973 0x6cbba4 dump_module ../../gcc/fortran/module.c:6101 0x6cbe47 gfc_dump_module(char const*, int) ../../gcc/fortran/module.c:6144 0x6e5656 gfc_parse_file() ../../gcc/fortran/parse.c:6188 0x728e32 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202