aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-05-04 19:57:35 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-05-04 15:57:35 -0400
commit6c89c39a4880297da031f52ade9b839c6e73ef48 (patch)
tree4f4c0cdeb8e0553afac758556ed2a79a75fc68fd /gcc/expr.c
parent27c2c3ec4ac46015d9a616c2aafe30fd1b5582ab (diff)
downloadgcc-6c89c39a4880297da031f52ade9b839c6e73ef48.zip
gcc-6c89c39a4880297da031f52ade9b839c6e73ef48.tar.gz
gcc-6c89c39a4880297da031f52ade9b839c6e73ef48.tar.bz2
expr.c (store_constructor_field): Don't call store_constructor if bitsize is not a multiple of a byte.
* expr.c (store_constructor_field): Don't call store_constructor if bitsize is not a multiple of a byte. From-SVN: r81487
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e8c3ab5..9239c4a 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4492,7 +4492,10 @@ store_constructor_field (rtx target, unsigned HOST_WIDE_INT bitsize,
tree exp, tree type, int cleared, int alias_set)
{
if (TREE_CODE (exp) == CONSTRUCTOR
+ /* We can only call store_constructor recursively if the size and
+ bit position are on a byte boundary. */
&& bitpos % BITS_PER_UNIT == 0
+ && (bitsize > 0 && bitsize % BITS_PER_UNIT == 0)
/* If we have a nonzero bitpos for a register target, then we just
let store_field do the bitfield handling. This is unlikely to
generate unnecessary clear instructions anyways. */