http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56265
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-11 16:20:24 UTC --- --- gcc/ipa-inline.c.jj 2013-01-11 09:02:48.000000000 +0100 +++ gcc/ipa-inline.c 2013-02-11 17:16:04.951958702 +0100 @@ -1792,7 +1792,7 @@ ipa_inline (void) } inline_small_functions (); - symtab_remove_unreachable_nodes (false, dump_file); + symtab_remove_unreachable_nodes (true, dump_file); free (order); /* Inline functions with a property that after inlining into all callers the @@ -1876,6 +1876,9 @@ ipa_inline (void) if (dump_file) dump_inline_summaries (dump_file); + + symtab_remove_unreachable_nodes (false, dump_file); + /* In WPA we use inline summaries for partitioning process. */ if (!flag_wpa) inline_free_summary (); fixes this. The gcc-patches post said: "This is bug. The cleanup is supposed to happen just before inlining functions called once. The patch also adds the cleanup to same place into do_whole_program_analysis and updates cgraphclones.c so we do not ice when removing offline copy of the function after inlining." but clearly that is too early, as the testcase shows.