https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83874
Bug ID: 83874 Summary: [6/7/8 Regression] ICE initializing character array from derived type Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gmx dot de Target Milestone: --- The following works up to 5.0.0, but crashes with 6.0.0 through 8.0-trunk: program gfcbug146 implicit none type t character(len=1) :: name end type t type(t), parameter :: z(2)= [ t ('a'), t ('b') ] ! character(len=1), parameter :: names(*) = z% name ! works character(len=*), parameter :: names(2) = z% name ! ICE ! character(len=*), parameter :: names(*) = z% name ! ICE end program gfcbug146 % gfc-8 gfcbug146.f90 f951: internal compiler error: Segmentation fault 0x89a4680 crash_signal ../../trunk/gcc/toplev.c:325 0x82ce89a add_init_expr_to_sym ../../trunk/gcc/fortran/decl.c:1724 0x82d996c variable_decl ../../trunk/gcc/fortran/decl.c:2589 0x82d996c gfc_match_data_decl() ../../trunk/gcc/fortran/decl.c:5698 0x833a021 match_word ../../trunk/gcc/fortran/parse.c:65 0x833a021 match_word ../../trunk/gcc/fortran/parse.c:54 0x833cb81 decode_statement ../../trunk/gcc/fortran/parse.c:376 0x833cb81 decode_statement ../../trunk/gcc/fortran/parse.c:295 0x833e34c next_free ../../trunk/gcc/fortran/parse.c:1226 0x833e34c next_statement ../../trunk/gcc/fortran/parse.c:1458 0x833fb9f parse_spec ../../trunk/gcc/fortran/parse.c:3836 0x8341bc3 parse_progunit ../../trunk/gcc/fortran/parse.c:5649 0x8342ecb gfc_parse_file() ../../trunk/gcc/fortran/parse.c:6189 0x838b8ae gfc_be_parse_file ../../trunk/gcc/fortran/f95-lang.c:204 Please submit a full bug report, with preprocessed source if appropriate.