summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-04 19:57:35 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-04 19:57:35 +0000
commita6645eaed032b9d5277b199e005974b5dab19c0e (patch)
tree4f4c0cdeb8e0553afac758556ed2a79a75fc68fd
parentd8edb24158d3d06776f8886c9b973fc1c232c28e (diff)
downloadgcc-a6645eaed032b9d5277b199e005974b5dab19c0e.tar.gz
* expr.c (store_constructor_field): Don't call store_constructor
if bitsize is not a multiple of a byte. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81487 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 95a70e6851a..e0510a9429b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (store_constructor_field): Don't call store_constructor
+ if bitsize is not a multiple of a byte.
+
2004-05-04 Richard Sandiford <rsandifo@redhat.com>
* reload1.c (inherit_piecemeal_p): New function.
diff --git a/gcc/expr.c b/gcc/expr.c
index e8c3ab53c81..9239c4a0415 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. */