This is the mail archive of the 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] Fix PR middle-end/28862, losing user alignment for vectors

On Wed, 6 Sep 2006, Andrew Pinski wrote:
> 	* stor-layout.c (relayout_decl): Don't zero the alignment if it
> 	was set by the user.

This makes sense.  OK for mainline, together with the new testcase
you propose.  Re: Paolo's comments about GCC complaining about the
alignment being too high on some targets, that makes sense but I
suspect his suggested alignment of 4 is too small to test this
functionality on many targets where global variables already have
a significant alignment.

Might I recommend using a #define for the aligned() argument and the
__alignof__ test, such that it should be easy to customize the value
used for different platforms if the default fails anywhere.  Then
we can use a relatively high default 128 or 64, but lower it as
appropriate using #ifdef __mips__ or #ifdef __alpha__ on platforms
with maximum alignment constraints.

Once the testcase has stablized with any necessary changes, we can
backport the fix to the 4.1 and 4.0 branches to resolve the P1 PR.

Thanks for fixing this,


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