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

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I guess the problem is that we inline function but do not eliminate its (now
dead) alias.  Probably it is better to do so in inline-transform like this:
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c      (revision 218722)
+++ ipa-inline-transform.c      (working copy)
@@ -199,6 +199,12 @@
             until after these clones are materialized.  */
          && !master_clone_with_noninline_clones_p (e->callee))
        {
+         ipa_ref *alias;
+         /* Remove aliases (that must be dead by can_remove_node_now_p)
+            so they do not confuse us later.  */
+         while (e->callee->iterate_direct_aliases (0, alias))
+           alias->referred->remove ();
+
          /* TODO: When callee is in a comdat group, we could remove all of it,
             including all inline clones inlined into it.  That would however
             need small function inlining to register edge removal hook to

will need to find a way to reproduce this though.

Honza

Reply via email to