Commit 9a9b232a by Richard Kenner

(layout_record, PCC_BITFIELD_TYPE_MATTERS): Round up when calculating

possible end address.

From-SVN: r14326
parent 71d306d1
...@@ -440,7 +440,8 @@ layout_record (rec) ...@@ -440,7 +440,8 @@ layout_record (rec)
/* A bit field may not span more units of alignment of its type /* A bit field may not span more units of alignment of its type
than its type itself. Advance to next boundary if necessary. */ 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) > TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (field))) / type_align)
const_size = CEIL (const_size, type_align) * type_align; const_size = CEIL (const_size, type_align) * type_align;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment