diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 10:25:22 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 10:25:22 +0000 |
commit | a6090c119ec004ea2c30ebe04d13e8dd0c096199 (patch) | |
tree | cc04e81d2999277fd0cae5ae1df5edc92d66f468 /gcc/gimplify.c | |
parent | 5552c69f5743132f0182d43b28643ce2accc61a7 (diff) | |
download | gcc-a6090c119ec004ea2c30ebe04d13e8dd0c096199.tar.gz |
PR middle-end/35432
* gimplify.c (gimplify_modify_expr): Do not optimize zero-sized types
if want_value.
testsuite/
* gcc.c-torture/compile/pr35432.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138793 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index e7fc1679aa3..555a5b64c7e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4217,7 +4217,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, side as statements and throw away the assignment. Do this after gimplify_modify_expr_rhs so we handle TARGET_EXPRs of addressable types properly. */ - if (zero_sized_type (TREE_TYPE (*from_p))) + if (zero_sized_type (TREE_TYPE (*from_p)) && !want_value) { gimplify_stmt (from_p, pre_p); gimplify_stmt (to_p, pre_p); |