Started between 20211107 and 20211114, at -Os : (from gcc.c-torture/execute/920612-2.c) (gcc configured with --enable-checking=yes) $ cat z1.c void f () { int i = 0; int a (int x) { while (x) i++, x--; return x; } if (a (2) != 0) return; } $ gcc-13-20220612 -c z1.c -O2 -fdisable-ipa-inline cc1: note: disable pass ipa-inline for functions in the range of [0, 4294967295] $ $ gcc-13-20220612 -c z1.c -Os -fdisable-ipa-inline cc1: note: disable pass ipa-inline for functions in the range of [0, 4294967295] during GIMPLE pass: alias z1.c: In function 'f': z1.c:1:6: internal compiler error: in gimple_call_static_chain_flags, at gimple.cc:1636 1 | void f () | ^ 0xa75e29 gimple_call_static_chain_flags(gcall const*) ../../gcc/gimple.cc:1636 0x1086681 handle_rhs_call ../../gcc/tree-ssa-structalias.cc:4345 0x1087fe5 find_func_aliases_for_call ../../gcc/tree-ssa-structalias.cc:5010 0x1087fe5 find_func_aliases ../../gcc/tree-ssa-structalias.cc:5113 0x108b7a6 compute_points_to_sets ../../gcc/tree-ssa-structalias.cc:7536 0x108b7a6 compute_may_aliases() ../../gcc/tree-ssa-structalias.cc:8044 0xd0bbde execute_function_todo ../../gcc/passes.cc:2057 0xd0c712 execute_todo ../../gcc/passes.cc:2139
-fdisable-ipa-inline might confuse us enough here, we run into 1634 /* Nested functions should always bind to current def since 1635 there is no public ABI for them. */ 1636 gcc_checking_assert (node->binds_to_current_def_p ()); (gdb) p node->debug() a.0/0 (a) @0x7ffff6a26000 Type: function Body removed by symtab_remove_unreachable_nodes Visibility: semantic_interposition prevailing_def_ironly References: Referring: Availability: not_available Function flags: count:118111600 (estimated locally) optimize_size static_chain Called by: Calls: $3 = void might be not a bug, -fdisable-* are only for debugging.
Inline transform function does fixup_cfg and other mandatory things so disabling it will likely cause other kind of ICEs as well. I wonder if there is more robust way to do so (one can make these part of all_ipa_tranforms and not part of a pass but it looks bit ugly).
Let's close it as invalid.