aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2003-05-04 22:04:51 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2003-05-04 18:04:51 -0400
commitad26fb41b4bb380ae90a5a2ebd19e158410fad56 (patch)
treebc9d73b7422af671c939d20c36d9d1bbe1cd9db8 /gcc/stor-layout.c
parent1fecc2668c2982329d6bdf5cee24604043f0a1e0 (diff)
downloadgcc-ad26fb41b4bb380ae90a5a2ebd19e158410fad56.zip
gcc-ad26fb41b4bb380ae90a5a2ebd19e158410fad56.tar.gz
gcc-ad26fb41b4bb380ae90a5a2ebd19e158410fad56.tar.bz2
stor-layout.c (compute_record_mode): Relax restriction on fields crossing word boundaries forcing BLKmode.
* stor-layout.c (compute_record_mode): Relax restriction on fields crossing word boundaries forcing BLKmode. From-SVN: r66463
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index f275e00..14f0f86 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1387,8 +1387,10 @@ compute_record_mode (type)
if (bitpos / BITS_PER_WORD
!= ((tree_low_cst (DECL_SIZE (field), 1) + bitpos - 1)
/ BITS_PER_WORD)
- /* But there is no problem if the field is entire words. */
- && tree_low_cst (DECL_SIZE (field), 1) % BITS_PER_WORD != 0)
+ /* But there is no problem if the field is entire words
+ or bigger than a word. */
+ && ! (tree_low_cst (DECL_SIZE (field), 1) % BITS_PER_WORD == 0
+ || compare_tree_int (DECL_SIZE (field), BITS_PER_WORD) > 0))
return;
/* If this field is the whole struct, remember its mode so