https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82622
Bug ID: 82622 Summary: [PDT] ICE in structure_alloc_comps, at fortran/trans-array.c:8963 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This one is an interesting case ... (... and the last PR derived from this search) $ cat z1.f90 program p type t(a) integer, len :: a end type type t2(b) integer, len :: b type(t(1)) :: r(b) end type type(t2(:)), allocatable :: x allocate (t2(3) :: x) end $ gfortran-8-20171015 -c z1.f90 z1.f90:10:0: allocate (t2(3) :: x) internal compiler error: Segmentation fault 0xb5a08f crash_signal ../../gcc/toplev.c:326 0x73cc83 structure_alloc_comps ../../gcc/fortran/trans-array.c:8963 0x73ba67 structure_alloc_comps ../../gcc/fortran/trans-array.c:8371 0x73df30 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int, gfc_actual_arglist*) ../../gcc/fortran/trans-array.c:9301 0x73c083 structure_alloc_comps ../../gcc/fortran/trans-array.c:9099 0x73df30 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int, gfc_actual_arglist*) ../../gcc/fortran/trans-array.c:9301 0x79b84a gfc_trans_allocate(gfc_code*) ../../gcc/fortran/trans-stmt.c:6407 0x72d2f7 trans_code ../../gcc/fortran/trans.c:1976 0x753f6c gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6420 0x6e6580 translate_all_program_units ../../gcc/fortran/parse.c:6088 0x6e6580 gfc_parse_file() ../../gcc/fortran/parse.c:6291 0x72a6bf gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204