This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch RFC] Tweak gcc.c-torture/execute/nest-align-1.c
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org, joey dot ye at intel dot com
- Date: Mon, 25 Feb 2008 17:00:32 -0800
- Subject: Re: [patch RFC] Tweak gcc.c-torture/execute/nest-align-1.c
- References: <20080223.092349.77036332.kkojima@rr.iij4u.or.jp>
- Reply-to: janis187 at us dot ibm dot com
On Sat, 2008-02-23 at 09:23 +0900, Kaz Kojima wrote:
> Hi,
>
> gcc.c-torture/execute/nest-align-1.c which is recently added
> fails on SH. From testresults posting, it fails also on ARM
> http://gcc.gnu.org/ml/gcc-testresults/2008-02/msg01396.html
> and MIPS
> http://gcc.gnu.org/ml/gcc-testresults/2008-02/msg01409.html
> at least.
>
> The testcase defines a 16-byte aligned type and uses an automatic
> variable with that type. The test checks if the alignment of
> this variable on stack matches with __alignof__ of that type.
> It seems that this fails on targets with PREFERRED_STACK_BOUNDARY
> less than 128, because the real alignment of that variable is
> limited to PREFERRED_STACK_BOUNDARY.
> Since our doc/extend.texi says
>
> Whenever you leave out the alignment factor in an @code{aligned} attribute
> specification, the compiler automatically sets the alignment for the declared
> variable or field to the largest alignment which is ever used for any data
> type on the target machine you are compiling for.
>
> how about the patch below?
> It's tested on i686-pc-linux-gnu with "make -k check".
OK unless the test's author, Joey Ye, objects and has a
different suggestion for the targets where the test fails.
Janis