aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-06-01 20:49:18 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-06-01 20:49:18 +0000
commite6a54b01852b536ce67c8a6639adc455f36f3891 (patch)
tree83d3f1184dd0b41ae0e5c786c8add2d6cfd17d07 /gcc/cgraph.c
parent418dd5cefef6cd8d80de3997a0590503d653bc04 (diff)
downloadgcc-e6a54b01852b536ce67c8a6639adc455f36f3891.zip
gcc-e6a54b01852b536ce67c8a6639adc455f36f3891.tar.gz
gcc-e6a54b01852b536ce67c8a6639adc455f36f3891.tar.bz2
gimplify.c (gimplify_modify_expr_rhs): Use simple test on the size.
* gimplify.c (gimplify_modify_expr_rhs): Use simple test on the size. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Do not remove the LHS of a no-return call if its type has variable size. * tree-cfgcleanup.c (fixup_noreturn_call): Likewise. * tree-cfg.c (verify_gimple_call): Accept these no-return calls. From-SVN: r223997
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 6a674db..2ded5af 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1464,8 +1464,10 @@ cgraph_edge::redirect_call_stmt_to_callee (void)
update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
}
- /* If the call becomes noreturn, remove the lhs. */
- if (lhs && (gimple_call_flags (new_stmt) & ECF_NORETURN))
+ /* If the call becomes noreturn, remove the LHS if possible. */
+ if (lhs
+ && (gimple_call_flags (new_stmt) & ECF_NORETURN)
+ && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST)
{
if (TREE_CODE (lhs) == SSA_NAME)
{