summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-27 10:33:17 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-27 10:33:17 +0000
commitc6d4472f1f8711cfbe47898cb0a74c437f80e8c6 (patch)
treec1ce668914cf00b1275c64a65327a0726e2009a2 /gcc/cgraph.c
parent04dd26f647e6b22065a95d20fca9921bd0f880f4 (diff)
downloadgcc-c6d4472f1f8711cfbe47898cb0a74c437f80e8c6.tar.gz
PR middle-end/65595
* cgraph.c (cgraph_update_edges_for_call_stmt_node): Only do redirection if the call is not optimized out. * gcc.c-torture/compile/pr65595.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221726 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 0d2b826a5e7..96f5f40b801 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1516,7 +1516,7 @@ cgraph_update_edges_for_call_stmt_node (cgraph_node *node,
if (e)
{
/* Keep calls marked as dead dead. */
- if (e->callee
+ if (new_call && e->callee
&& DECL_BUILT_IN_CLASS (e->callee->decl) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (e->callee->decl) == BUILT_IN_UNREACHABLE)
{