diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2008-08-06 10:25:22 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2008-08-06 10:25:22 +0000 |
commit | 753b34d777ee581aeb7efba828f8a509abe7e899 (patch) | |
tree | cc04e81d2999277fd0cae5ae1df5edc92d66f468 /gcc/gimplify.c | |
parent | ef9e1eff51d6da72800ee7ca2179d0f8816dfa30 (diff) | |
download | gcc-753b34d777ee581aeb7efba828f8a509abe7e899.zip gcc-753b34d777ee581aeb7efba828f8a509abe7e899.tar.gz gcc-753b34d777ee581aeb7efba828f8a509abe7e899.tar.bz2 |
re PR middle-end/35432 (ICE with zero-sized array)
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.
From-SVN: r138793
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 e7fc167..555a5b6 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); |