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

            Bug ID: 103716
           Summary: [10/11/12 Regression] ICE in gimplify_expr, at
                    gimplify.c:15964
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r10 (before 20190505) :


$ cat z1.f90
function f(x)
   character(*) :: x(*)
   print *, g(x%len)
end


$ cat z2.f90
function f(x)
   character(*) :: x(3)
   print *, g(x%len)
end


$ gfortran-9 -c z1.f90
$
$ gfortran-12-20211212 -c z1.f90
gimplification failed:
(integer(kind=4)) _x <nop_expr 0x7fa0eb2defa0
    type <integer_type 0x7fa0eb11e5e8 integer(kind=4) sizes-gimplified public
SI
        size <integer_cst 0x7fa0eb107e40 constant 32>
        unit-size <integer_cst 0x7fa0eb107e58 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set 3 canonical-type
0x7fa0eb11e5e8 precision:32 min <integer_cst 0x7fa0eb107df8 -2147483648> max
<integer_cst 0x7fa0eb107e10 2147483647>
        pointer_to_this <pointer_type 0x7fa0eb126a80>>
    readonly
    arg:0 <parm_decl 0x7fa0eb2e7200 _x
        type <integer_type 0x7fa0eb11e738 integer(kind=8) public DI
            size <integer_cst 0x7fa0eb107c00 constant 64>
            unit-size <integer_cst 0x7fa0eb107c18 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fa0eb11e738 precision:64 min <integer_cst 0x7fa0eb107e88
-9223372036854775808> max <integer_cst 0x7fa0eb107ea0 9223372036854775807>
            pointer_to_this <pointer_type 0x7fa0eb153738>>
        readonly used DI z1.f90:1:0 size <integer_cst 0x7fa0eb107c00 64>
unit-size <integer_cst 0x7fa0eb107c18 8>
        align:64 warn_if_not_align:0 context <function_decl 0x7fa0eb2f8e00 f>
arg-type <integer_type 0x7fa0eb11e738 integer(kind=8)>>>
z1.f90:3:20:

    3 |    print *, g(x%len)
      |                    ^
internal compiler error: gimplification failed
0xbe3308 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15964
0xbf1777 gimplify_modify_expr
        ../../gcc/gimplify.c:5975
0xbe20a7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14951
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026
0xbe19db gimplify_statement_list
        ../../gcc/gimplify.c:2014
0xbe19db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15396
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026
0xbe1d4c gimplify_and_add(tree_node*, gimple**)
        ../../gcc/gimplify.c:495
0xbe1d4c gimplify_loop_expr
        ../../gcc/gimplify.c:1988
0xbe1d4c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15156
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026
0xbe19db gimplify_statement_list
        ../../gcc/gimplify.c:2014
0xbe19db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15396
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026
0xbe6d03 gimplify_bind_expr
        ../../gcc/gimplify.c:1427
0xbe268a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15152
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026
0xbe19db gimplify_statement_list
        ../../gcc/gimplify.c:2014
0xbe19db gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:15396
0xbe6378 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:7026

Reply via email to