[PATCH]Make pack-test-1 more flexible

Janis Johnson janis187@us.ibm.com
Tue Nov 28 01:47:00 GMT 2006


On Sun, Nov 26, 2006 at 07:43:28PM +0000, Nathan Sidwell wrote:
> 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?

Yes.

Janis



More information about the Gcc-patches mailing list