https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86110
Bug ID: 86110 Summary: ICE in gfc_resolve_character_array_constructor, at fortran/array.c:2044 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- With invalid code down to gfortran 5 : $ cat z1.f90 program p character(:), allocatable :: x, y x = 'abc' y = [x(:)] end $ cat z2.f90 program p type t character(:), allocatable :: c end type type(t) :: x, y x%c = 'abc' y%c = [x%c(:)] end $ gfortran-4.9 -c z1.f90 z1.f90:4.3: y = [x(:)] 1 Error: Incompatible ranks 0 and 1 in assignment at (1) $ gfortran-9-20180610 -c z1.f90 f951: internal compiler error: Segmentation fault 0xb4cecf crash_signal ../../gcc/toplev.c:324 0x62fd6a gfc_resolve_character_array_constructor(gfc_expr*) ../../gcc/fortran/array.c:2044 0x6c36c6 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6778 0x6c9c0e gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11120 0x6cc95a resolve_codes ../../gcc/fortran/resolve.c:16564 0x6cca5e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16599 0x6b5f3a resolve_all_program_units ../../gcc/fortran/parse.c:6060 0x6b5f3a gfc_parse_file() ../../gcc/fortran/parse.c:6310 0x6fd22f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204