summaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 8651b60fc0d..3e15b1b6ae0 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -800,7 +800,8 @@ eliminate_tail_call (struct tailcall *t)
/* Result of the call will no longer be defined. So adjust the
SSA_NAME_DEF_STMT accordingly. */
- SSA_NAME_DEF_STMT (rslt) = build_empty_stmt ();
+ if (TREE_CODE (rslt) == SSA_NAME)
+ SSA_NAME_DEF_STMT (rslt) = build_empty_stmt ();
}
bsi_remove (&t->call_bsi, true);