OSDN Git Service

(layout_record, PCC_BITFIELD_TYPE_MATTERS): Round up when calculating
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jun 1997 14:36:37 +0000 (14:36 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jun 1997 14:36:37 +0000 (14:36 +0000)
possible end address.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14326 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/stor-layout.c

index 8c2357a..83bfb99 100644 (file)
@@ -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;
        }