aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2006-06-12 06:53:33 +0000
committerEric Christopher <echristo@gcc.gnu.org>2006-06-12 06:53:33 +0000
commitf7eb0dcd45ddb0fbc6e33b7e09246af3af6b96d9 (patch)
treec0513c3903bf29cecf7de13de3ef79ec15d809aa /gcc/stor-layout.c
parent6bb7beac5f921b203fa212fdf94df2381d10f0c7 (diff)
downloadgcc-f7eb0dcd45ddb0fbc6e33b7e09246af3af6b96d9.zip
gcc-f7eb0dcd45ddb0fbc6e33b7e09246af3af6b96d9.tar.gz
gcc-f7eb0dcd45ddb0fbc6e33b7e09246af3af6b96d9.tar.bz2
re PR middle-end/27948 (MS -bitfield struct layout test fails)
2006-06-11 Eric Christopher <echristo@apple.com> PR middle-end/27948 * stor-layout.c (place_field): Remove check for remaining_in_alignment when aligning at the end of a run. 2006-06-11 Eric Christopher <echristo@apple.com> PR middle-end/27948 * gcc.dg/bf-ms-layout.c: Run on darwin. * gcc.dg/bf-no-ms-layout: Ditto. * gcc.dg/attr-ms_struct-2.c: New. * gcc.dg/bf-ms-layout-2.c: Ditto. From-SVN: r114562
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index bf67099..47bc6a0 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1070,8 +1070,7 @@ place_field (record_layout_info rli, tree field)
Note: since the beginning of the field was aligned then
of course the end will be too. No round needed. */
- if (!integer_zerop (DECL_SIZE (rli->prev_field))
- && rli->remaining_in_alignment)
+ if (!integer_zerop (DECL_SIZE (rli->prev_field)))
{
rli->bitpos
= size_binop (PLUS_EXPR, rli->bitpos,
@@ -1085,7 +1084,7 @@ place_field (record_layout_info rli, tree field)
/* Cause a new bitfield to be captured, either this time (if
currently a bitfield) or next time we see one. */
if (!DECL_BIT_FIELD_TYPE(field)
- || integer_zerop (DECL_SIZE (field)))
+ || integer_zerop (DECL_SIZE (field)))
rli->prev_field = NULL;
}
@@ -1105,9 +1104,9 @@ place_field (record_layout_info rli, tree field)
there wasn't. */
if (!DECL_BIT_FIELD_TYPE (field)
- || ( prev_saved != NULL
- ? !simple_cst_equal (TYPE_SIZE (type),
- TYPE_SIZE (TREE_TYPE (prev_saved)))
+ || (prev_saved != NULL
+ ? !simple_cst_equal (TYPE_SIZE (type),
+ TYPE_SIZE (TREE_TYPE (prev_saved)))
: !integer_zerop (DECL_SIZE (field)) ))
{
/* Never smaller than a byte for compatibility. */