diff options
author | Mike Stump <mikestump@comcast.net> | 2010-03-22 23:13:10 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2010-03-22 23:13:10 +0000 |
commit | 212066e660034c73cdeffc6120b03a0938afcb53 (patch) | |
tree | b7179fef7508abaffda8ff48ecb0c485d36365a7 /gcc/testsuite | |
parent | cc72bbaac742dd66ce5aaa9791a20903cdbac3ec (diff) | |
download | gcc-212066e660034c73cdeffc6120b03a0938afcb53.zip gcc-212066e660034c73cdeffc6120b03a0938afcb53.tar.gz gcc-212066e660034c73cdeffc6120b03a0938afcb53.tar.bz2 |
re PR target/23071 (Darwin alignment ignores "attribute packed" for first 'double' element of a struct)
PR target/23071
* config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
Don't overly align based upon packed packed fields.
From-SVN: r157654
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/darwin-abi-12.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/darwin-abi-12.c b/gcc/testsuite/gcc.target/powerpc/darwin-abi-12.c new file mode 100644 index 0000000..d02c486 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/darwin-abi-12.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target powerpc*-*-darwin* } } */ +/* { dg-final { scan-assembler ".comm _x,12,2" } } */ +/* { dg-final { scan-assembler-not ".space 7" } } */ +/* PR 23071 */ + +struct Test { + double D __attribute__((packed,aligned(4))); + short X; +} x; + +struct { + char x; + struct Test t; +} b = { 1, { 2, 3 } }; |