summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-11 23:09:58 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-11 23:09:58 +0000
commit089ea875cadb7964275990f8e6f7dac81e6fff3c (patch)
treeb9d2857c2c76cfb2b205e1818c71fcd7c0d3f8ef /gcc/stor-layout.c
parent187152f720a6bbe9db56e44077d4b27a04efa05f (diff)
downloadgcc-089ea875cadb7964275990f8e6f7dac81e6fff3c.tar.gz
PR middle-end/27942
* stor-layout.c (update_alignment_for_field): Don't add extra alignment for packed non-bitfield fields in ms_bitfield_layout_p code. * gcc.dg/attr-ms_struct-packed1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 50068a4349b..bf67099bad0 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -693,7 +693,7 @@ update_alignment_for_field (record_layout_info rli, tree field,
the type, except that for zero-size bitfields this only
applies if there was an immediately prior, nonzero-size
bitfield. (That's the way it is, experimentally.) */
- if (!is_bitfield
+ if ((!is_bitfield && !DECL_PACKED (field))
|| (!integer_zerop (DECL_SIZE (field))
? !DECL_PACKED (field)
: (rli->prev_field