[PATCH] Fix PR middle-end/28862, losing user alignment for vectors

Andrew Pinski pinskia@physics.uc.edu
Thu Sep 7 03:44:00 GMT 2006


On Wed, 2006-09-06 at 20:24 -0700, Andrew Pinski wrote:
> ChangeLog:
> 
> 	* stor-layout.c (relayout_decl): Don't zero the alignment if it
> 	was set by the user.

I was thinking about a portable way to test this does not happen again
but all I could think of was looking at the asm but now I just
remembered about the alignof expressions.  Here is a testcase which
passes now but failed before the patch:
float x __attribute__((aligned(128),vector_size(8)));
int f[__alignof__(x) == 128?1:-1];

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list