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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|internal compiler error: in |[5 Regression] ICE in
                   |fold_convert_loc, at        |fold_convert_loc, at
                   |fold-const.c:2353           |fold-const.c:2353

--- Comment #3 from janus at gcc dot gnu.org ---
Here is a reduction of the original test case which gives the ICE with trunk,
but compiles cleanly with 4.9:


  type :: Test
  end type

  type :: TestReference
     class(Test), allocatable :: test
  end type

  type(TestReference) :: testList

  testList = TestReference(Test())  ! ICE in fold_convert_loc

end



The backtrace is:

internal compiler error: in fold_convert_loc, bei fold-const.c:2357
0x814255 fold_convert_loc(unsigned int, tree_node*, tree_node*)
    /home/jweil/gcc/gcc50/trunk/gcc/fold-const.c:2357
0x6b16ea alloc_scalar_allocatable_for_subcomponent_assignment
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:6403
0x6b16ea gfc_trans_subcomponent_assign
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:6497
0x6b087b gfc_trans_structure_assign
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:6649
0x6b2104 gfc_conv_structure(gfc_se*, gfc_expr*, int)
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:6678
0x6ad46c gfc_conv_expr(gfc_se*, gfc_expr*)
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:6848
0x6b32ff gfc_trans_assignment_1
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-expr.c:8553
0x682035 trans_code
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans.c:1650
0x6a2e53 gfc_generate_function_code(gfc_namespace*)
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/trans-decl.c:5844
0x63e470 translate_all_program_units
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/parse.c:5341
0x63e470 gfc_parse_file()
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/parse.c:5538
0x67de95 gfc_be_parse_file
    /home/jweil/gcc/gcc50/trunk/gcc/fortran/f95-lang.c:228

Reply via email to