https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85083

            Bug ID: 85083
           Summary: [8 Regression] ICE in
                    gfc_convert_to_structure_constructor, at
                    fortran/primary.c:2915
           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: ---

Changed between 20180218 and 20180225 :


$ cat z1.f90
program p
   type t
      character(3) :: c
   end type
   type(t), allocatable :: z
   allocate (z, source=t(.true.,'abc'))
end


$ gfortran-8-20180218 -c z1.f90
z1.f90:6:32:

    allocate (z, source=t(.true.,'abc'))
                                1
Error: Too many components in structure constructor at (1)


$ gfortran-8-20180325 -c z1.f90
f951: internal compiler error: Segmentation fault
0xb9c38f crash_signal
        ../../gcc/toplev.c:325
0x705c4d gfc_convert_to_structure_constructor(gfc_expr*, gfc_symbol*,
gfc_expr**, gfc_actual_arglist**, bool)
        ../../gcc/fortran/primary.c:2915
0x70dbb8 resolve_generic_f
        ../../gcc/fortran/resolve.c:2699
0x70dbb8 resolve_function
        ../../gcc/fortran/resolve.c:3171
0x70df5a gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6709
0x71531b gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11092
0x71721a resolve_codes
        ../../gcc/fortran/resolve.c:16525
0x71731e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:16560
0x700aea resolve_all_program_units
        ../../gcc/fortran/parse.c:6060
0x700aea gfc_parse_file()
        ../../gcc/fortran/parse.c:6310
0x74791f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to