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

            Bug ID: 96012
           Summary: [9/10/11 Regression] ICE in fold_convert_loc, at
                    fold-const.c:2558
           Product: gcc
           Version: 11.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 20181014 and 20181021, affects versions down to r8 :


$ cat z1.f90
program p
   type t
   end type
   class(*), allocatable :: x(:)
   x = [t()]
end


$ cat z2.f90
program p
   type t
      integer :: a
   end type
   class(*), allocatable :: x(:)
   x = [t(1)]
end


$ gfortran-7 -c z1.f90
$
$ gfortran-11-20200628 -c z1.f90
z1.f90:5:0:

    5 |    x = [t()]
      |
internal compiler error: in fold_convert_loc, at fold-const.c:2558
0x900033 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2558
0x705f6a gfc_allocate_using_malloc(stmtblock_t*, tree_node*, tree_node*,
tree_node*)
        ../../gcc/fortran/trans.c:714
0x7456ab trans_class_assignment
        ../../gcc/fortran/trans-expr.c:10649
0x7456ab gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:11042
0x704c37 trans_code
        ../../gcc/fortran/trans.c:1864
0x72e1d4 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6840
0x6b5cb6 translate_all_program_units
        ../../gcc/fortran/parse.c:6307
0x6b5cb6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6546
0x7016ff gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

Reply via email to