[PATCH]Make pack-test-1 more flexible

Nathan Sidwell nathan@codesourcery.com
Sun Nov 26 20:07:00 GMT 2006

gcc.dg/pack-test-1 presumes the natural alignment of the scalar types is the 
same as sizeof.  This is not true on m68k, where ints are 4 bytes but 2-byte 
aligned.  Thus 4-byte packing won't change the alignment of int fields.

This patch rearranges pack-test-1 to use alignof to determine natural alignments 
and cope with targets like m68k.

tested on m68k-linux-gnu and i686-linux-gnu, ok?

Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pack-test.patch
Type: text/x-patch
Size: 6137 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061126/3171c682/attachment.bin>

More information about the Gcc-patches mailing list