This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch RFC] Tweak gcc.c-torture/execute/nest-align-1.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]