This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]Make pack-test-1 more flexible
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Nov 2006 16:58:39 -0800
- Subject: Re: [PATCH]Make pack-test-1 more flexible
- References: <4569EE60.8080205@codesourcery.com>
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