From 9a9b232af82e22d4f9e775849b701d2f58138747 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 27 Jun 1997 10:36:37 -0400 Subject: [PATCH] (layout_record, PCC_BITFIELD_TYPE_MATTERS): Round up when calculating possible end address. From-SVN: r14326 --- gcc/stor-layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 8c2357aeeb7..83bfb9956c9 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; }