diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-01 20:49:18 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-01 20:49:18 +0000 |
commit | 33b2642e544d575f2a62538b79cc677b0dfae746 (patch) | |
tree | 83d3f1184dd0b41ae0e5c786c8add2d6cfd17d07 /gcc/cgraph.c | |
parent | b5e563e408f9e1941f981da849114bb23f8c8473 (diff) | |
download | gcc-33b2642e544d575f2a62538b79cc677b0dfae746.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223997 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 6a674db4078..2ded5af546e 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) { |