re PR bootstrap/64612 (profiledbootstrap failures)
authorJan Hubicka <hubicka@ucw.cz>
Thu, 15 Jan 2015 23:11:49 +0000 (00:11 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 15 Jan 2015 23:11:49 +0000 (23:11 +0000)
PR ipa/64612
* ipa-inline-transform.c (can_remove_node_now_p): Fix handling
of comdat locals.
(inline_call): Fix removal of aliases.

From-SVN: r219696

gcc/ChangeLog
gcc/ipa-inline-transform.c

index 087bcd59f87247d65b41f97bec9cda601b216c2c..d2770f0914422668a0eb85406afa600f114cdd41 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/64612
+       * ipa-inline-transform.c (can_remove_node_now_p): Fix handling
+       of comdat locals.
+       (inline_call): Fix removal of aliases.
+
 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
 
        * flag-types.h (enum sanitize_code): Add SANITIZE_VPTR,
index 7e5eda99a5bd4c80b46972e51098a7b501bc405c..1c4b23a1ebc198deac4ccf35205dc182cde345d0 100644 (file)
@@ -139,7 +139,7 @@ can_remove_node_now_p (struct cgraph_node *node, struct cgraph_edge *e)
 
   /* 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))
@@ -310,7 +310,8 @@ inline_call (struct cgraph_edge *e, bool update_original,
       while (alias && alias != callee)
        {
          if (!alias->callers
-             && can_remove_node_now_p (alias, e))
+             && can_remove_node_now_p (alias,
+                                       !e->next_caller && !e->prev_caller ? e : NULL))
            {
              next_alias = alias->get_alias_target ();
              alias->remove ();