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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-03-12
     Ever confirmed|0                           |1
           Keywords|                            |ice-on-valid-code

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed on trunk, not sure if valid or invalid.  We call fold_convert to
convert an object of type b to type a, this is not a conversion supported
this way.  Building a VIEW_CONVERT_EXPR would be what's supported but not
sure whether that's the correct thing to do.

> ./f951 -quiet t.f90
t.f90:20:58:

   20 |   a_array = [a_array, b_instance] ! This one throws an ICE
      |                                                          1
internal compiler error: in fold_convert_loc, at fold-const.cc:2757
0x126cdc0 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        /space/rguenther/src/gcc/gcc/fold-const.cc:2757
0xeef77b gfc_trans_array_ctor_element
        /space/rguenther/src/gcc/gcc/fortran/trans-array.cc:1956
0xeefeeb gfc_trans_array_constructor_value
        /space/rguenther/src/gcc/gcc/fortran/trans-array.cc:2144
0xef2369 trans_array_constructor
        /space/rguenther/src/gcc/gcc/fortran/trans-array.cc:2976
0xef2daa gfc_add_loop_ss_code
        /space/rguenther/src/gcc/gcc/fortran/trans-array.cc:3269
0xef9ebc gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        /space/rguenther/src/gcc/gcc/fortran/trans-array.cc:5656
0xf63110 gfc_trans_assignment_1
        /space/rguenther/src/gcc/gcc/fortran/trans-expr.cc:12216
0xf64810 gfc_trans_assignment(gfc_expr*, gfc_expr*, bool, bool, bool, bool)
        /space/rguenther/src/gcc/gcc/fortran/trans-expr.cc:12679
0xf64888 gfc_trans_assign(gfc_code*)
        /space/rguenther/src/gcc/gcc/fortran/trans-expr.cc:12691
0xee858c trans_code
        /space/rguenther/src/gcc/gcc/fortran/trans.cc:2363
0xee8bdf gfc_trans_code(gfc_code*)
        /space/rguenther/src/gcc/gcc/fortran/trans.cc:2718
0xf34d1b gfc_generate_function_code(gfc_namespace*)
        /space/rguenther/src/gcc/gcc/fortran/trans-decl.cc:7879

Reply via email to