aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.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/tree-cfgcleanup.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/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 26258aa..562f592 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -612,9 +612,11 @@ fixup_noreturn_call (gimple stmt)
}
}
- /* If there is an LHS, remove it. */
+ /* If there is an LHS, remove it, but only if its type has fixed size.
+ The LHS will need to be recreated during RTL expansion and creating
+ temporaries of variable-sized types is not supported. */
tree lhs = gimple_call_lhs (stmt);
- if (lhs)
+ if (lhs && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST)
{
gimple_call_set_lhs (stmt, NULL_TREE);