diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2008-03-19 15:50:15 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-03-19 15:50:15 +0100 |
commit | cd7e0bd4b185112f64b7b78264b0bfa6eb27d26b (patch) | |
tree | f10ab1a7565027d5e589af4f98fe489ea89a9789 /gcc/stor-layout.c | |
parent | 8ddbbcaea4d6a9d33ea49ed09b9a8bd6a35af819 (diff) | |
download | gcc-cd7e0bd4b185112f64b7b78264b0bfa6eb27d26b.zip gcc-cd7e0bd4b185112f64b7b78264b0bfa6eb27d26b.tar.gz gcc-cd7e0bd4b185112f64b7b78264b0bfa6eb27d26b.tar.bz2 |
re PR target/35496 (test failures between revs. 132950 and 132974)
PR target/35496
* stor-layout.c (update_alignment_for_field): Set minimum alignment
of the underlying type of a MS bitfield layout to the natural
alignment of the type.
From-SVN: r133343
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 67e4c25f..ff46687 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -699,6 +699,9 @@ update_alignment_for_field (record_layout_info rli, tree field, && ! integer_zerop (DECL_SIZE (rli->prev_field))))) { unsigned int type_align = TYPE_ALIGN (type); + unsigned int type_size + = tree_low_cst (TYPE_SIZE (type), 1); + type_align = MAX (type_align, type_size); type_align = MAX (type_align, desired_align); if (maximum_field_alignment != 0) type_align = MIN (type_align, maximum_field_alignment); |