diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2004-05-27 21:28:51 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2004-05-27 19:28:51 +0000 |
commit | 7c50e202bc44878533a9eec75fed6c1744e0a281 (patch) | |
tree | 31d929d6040dc9c05644874e12dc4dfc535548eb /gcc/expr.c | |
parent | 18db8f19afa7464645b265b771c397b188b6d1f8 (diff) | |
download | gcc-7c50e202bc44878533a9eec75fed6c1744e0a281.tar.gz |
expr.c (store_constructor): Restore sanity check on the size of the type before clearing.
* expr.c (store_constructor): Restore sanity check on
the size of the type before clearing.
From-SVN: r82335
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index dd0725811ed..5aa3efaa23d 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4673,8 +4673,9 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) clear the whole structure first. Don't do this if TARGET is a register whose mode size isn't equal to SIZE since clear_storage can't handle this case. */ - else if (((list_length (CONSTRUCTOR_ELTS (exp)) != fields_length (type)) - || mostly_zeros_p (exp)) + else if (size > 0 + && ((list_length (CONSTRUCTOR_ELTS (exp)) != fields_length (type)) + || mostly_zeros_p (exp)) && (GET_CODE (target) != REG || ((HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (target)) == size))) |