aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-06-27 10:36:37 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-06-27 10:36:37 -0400
commit9a9b232af82e22d4f9e775849b701d2f58138747 (patch)
treece0878c618c20965182ef767b6a26f8aa50048e0 /gcc/stor-layout.c
parent71d306d1b1dcbe7c1c5bbe4f38e7b07b39d51117 (diff)
downloadgcc-9a9b232af82e22d4f9e775849b701d2f58138747.zip
gcc-9a9b232af82e22d4f9e775849b701d2f58138747.tar.gz
gcc-9a9b232af82e22d4f9e775849b701d2f58138747.tar.bz2
(layout_record, PCC_BITFIELD_TYPE_MATTERS): Round up when calculating
possible end address. From-SVN: r14326
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 8c2357a..83bfb99 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -440,7 +440,8 @@ layout_record (rec)
/* A bit field may not span more units of alignment of its type
than its type itself. Advance to next boundary if necessary. */
- if (((const_size + field_size) / type_align - const_size / type_align)
+ if (((const_size + field_size + type_align - 1) / type_align
+ - const_size / type_align)
> TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (field))) / type_align)
const_size = CEIL (const_size, type_align) * type_align;
}