[Bug fortran/103391] New: [9/10/11/12 Regression] ICE: gimplification failed

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Nov 23 18:58:54 GMT 2021


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

            Bug ID: 103391
           Summary: [9/10/11/12 Regression] ICE: gimplification failed
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started with r7 :


$ cat z1.f90
program p
   type t
   end type
   type t2
      type(t), pointer :: a(:)
   end type
contains
   function f(x)
      class(t), intent(in), target :: x(:)
      type(t2) :: f
      f%a = x
   end
end


$ gfortran-6 -c z1.f90
$
$ gfortran-12-20211121 -c z1.f90
gimplification failed:
D.4265 + _15 <pointer_plus_expr 0x7f68226a9dc0
    type <pointer_type 0x7f68226a7690
        type <record_type 0x7f68226a7f18 t BLK
            size <integer_cst 0x7f68224b5c78 constant 0>
            unit-size <integer_cst 0x7f68224b5c30 constant 0>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f68226a7f18
            pointer_to_this <pointer_type 0x7f68226a7690> reference_to_this
<reference_type 0x7f68226a7150> chain <type_decl 0x7f68226ae850 D.4276>>
        unsigned DI
        size <integer_cst 0x7f68224b5c00 constant 64>
        unit-size <integer_cst 0x7f68224b5c18 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f68226a7690>

    arg:0 <var_decl 0x7f68222b3090 D.4265
        type <pointer_type 0x7f68226ad1f8 type <array_type 0x7f68226ad150>
            unsigned DI size <integer_cst 0x7f68224b5c00 64> unit-size
<integer_cst 0x7f68224b5c18 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f68226ad1f8>
        used unsigned ignored DI z1.f90:11:13 size <integer_cst 0x7f68224b5c00
64> unit-size <integer_cst 0x7f68224b5c18 8>
        align:64 warn_if_not_align:0 context <function_decl 0x7f68226ab100 f>
        chain <var_decl 0x7f68222b3120 D.4266 type <integer_type 0x7f68224cc738
integer(kind=8)>
            used ignored DI z1.f90:11:13 size <integer_cst 0x7f68224b5c00 64>
unit-size <integer_cst 0x7f68224b5c18 8>
            align:64 warn_if_not_align:0 context <function_decl 0x7f68226ab100
f> chain <var_decl 0x7f68222b31b0 D.4267>>>
    arg:1 <ssa_name 0x7f68224bdb40
        type <integer_type 0x7f68224cc000 sizetype public unsigned DI size
<integer_cst 0x7f68224b5c00 64> unit-size <integer_cst 0x7f68224b5c18 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f68224cc000 precision:64 min <integer_cst 0x7f68224b5c30 0> max <integer_cst
0x7f68224b64c0 18446744073709551615>>

        def_stmt _15 = (sizetype) _14;
        version:15>>
z1.f90:11:13:

   11 |       f%a = x
      |             ^
internal compiler error: gimplification failed
0xbdad08 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15679
0xbe91bb gimplify_modify_expr
        ../../gcc/gimplify.c:5973
0xbd9aa7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14666
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024
0xbd93db gimplify_statement_list
        ../../gcc/gimplify.c:2012
0xbd93db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15111
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024
0xbde713 gimplify_bind_expr
        ../../gcc/gimplify.c:1426
0xbda08a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14867
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024
0xbd93db gimplify_statement_list
        ../../gcc/gimplify.c:2012
0xbd93db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15111
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024
0xbd974c gimplify_and_add(tree_node*, gimple**)
        ../../gcc/gimplify.c:494
0xbd974c gimplify_loop_expr
        ../../gcc/gimplify.c:1986
0xbd974c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14871
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024
0xbd93db gimplify_statement_list
        ../../gcc/gimplify.c:2012
0xbd93db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15111
0xbddd78 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7024


More information about the Gcc-bugs mailing list