From 8ccc8042d3bef13bfae6eb83b45b0a4231035f7c Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 16 Jan 2015 00:11:49 +0100 Subject: [PATCH] re PR bootstrap/64612 (profiledbootstrap failures) 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 | 7 +++++++ gcc/ipa-inline-transform.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 087bcd59f87..d2770f09144 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-01-15 Jan Hubicka + + 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 * flag-types.h (enum sanitize_code): Add SANITIZE_VPTR, diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 7e5eda99a5b..1c4b23a1ebc 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -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 (node->same_comdat_group); next != node; next = dyn_cast (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 (); -- 2.30.2