diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2006-06-11 23:09:58 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2006-06-11 23:09:58 +0000 |
commit | cb3123765e3c7052c9164ac756a82be63f3df4ae (patch) | |
tree | b9d2857c2c76cfb2b205e1818c71fcd7c0d3f8ef /gcc/stor-layout.c | |
parent | 9b317af39e43401fe191a50f9a06cf0e0ab3e235 (diff) | |
download | gcc-cb3123765e3c7052c9164ac756a82be63f3df4ae.zip gcc-cb3123765e3c7052c9164ac756a82be63f3df4ae.tar.gz gcc-cb3123765e3c7052c9164ac756a82be63f3df4ae.tar.bz2 |
re PR middle-end/27942 (packed union doesn't make the unaligned magic on sh64-*)
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.
From-SVN: r114552
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 50068a4..bf67099 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 |