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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c      (revision 219674)
+++ ipa-inline-transform.c      (working copy)
@@ -139,7 +137,7 @@ can_remove_node_now_p (struct cgraph_nod

   /* When we see same comdat group, we need to be sure that all
      items can be removed.  */
-  if (!node->same_comdat_group)
+  if (!node->same_comdat_group || !node->externally_visible)
     return true;
   for (next = dyn_cast<cgraph_node *> (node->same_comdat_group);
        next != node; next = dyn_cast<cgraph_node *> (next->same_comdat_group))
@@ -303,7 +301,7 @@ inline_call (struct cgraph_edge *e, bool

   /* If aliases are involved, redirect edge to the actual destination and
      possibly remove the aliases.  */
-  if (e->callee != callee)
+  if (e->callee != callee && !e->next_caller && !e->prev_caller)
     {
       struct cgraph_node *alias = e->callee, *next_alias;
       e->redirect_callee (callee);

Reply via email to