summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-transform.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-15 23:11:49 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-15 23:11:49 +0000
commit6365c92707e013c1bc7c262bd762ac8bfacbdda3 (patch)
treedf9ba8db4868601b0b12435b80330e835d70ed19 /gcc/ipa-inline-transform.c
parent32cf7025dfa4a65f3e4dafb3b46b4816b119a75b (diff)
downloadgcc-6365c92707e013c1bc7c262bd762ac8bfacbdda3.tar.gz
PR ipa/64612
* ipa-inline-transform.c (can_remove_node_now_p): Fix handling of comdat locals. (inline_call): Fix removal of aliases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r--gcc/ipa-inline-transform.c5
1 files changed, 3 insertions, 2 deletions
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<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 ();