https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103390
Bug ID: 103390 Summary: [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: gs...@t-online.de Target Milestone: --- Changed between 20211017 and 20211024 : (ok without bind(c)) $ cat z1.f90 program p integer, pointer :: z(:) integer, target :: x(3) = [1, 2, 3] z => x call s(shape(z)) contains subroutine s(x) bind(c) integer, contiguous :: x(:) end end $ gfortran-12-20211017 -c z1.f90 $ $ gfortran-12-20211121 -c z1.f90 gimplification failed: (integer(kind=4)) _33 <nop_expr 0x7f16948401a0 type <integer_type 0x7f169465a5e8 integer(kind=4) sizes-gimplified public SI size <integer_cst 0x7f1694643e40 constant 32> unit-size <integer_cst 0x7f1694643e58 constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set 3 canonical-type 0x7f169465a5e8 precision:32 min <integer_cst 0x7f1694643df8 -2147483648> max <integer_cst 0x7f1694643e10 2147483647> pointer_to_this <pointer_type 0x7f1694662a80>> arg:0 <ssa_name 0x7f169444c1b0 type <integer_type 0x7f169483ce70 public unsigned SI size <integer_cst 0x7f1694643e40 32> unit-size <integer_cst 0x7f1694643e58 4> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f169483ce70 precision:32 min <integer_cst 0x7f1694828bd0 0> max <integer_cst 0x7f1694828558 4294967295>> def_stmt _33 = _32 + 1; version:33> z1.f90:5:19 start: z1.f90:5:19 finish: z1.f90:5:19> z1.f90:5:19: 5 | call s(shape(z)) | ^ 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 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 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 0xbe4780 gimplify_cond_expr ../../gcc/gimplify.c:4393 0xbda65f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:14623 0xbddd78 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:7024