This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/28862, losing user alignment for vectors
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 06 Sep 2006 20:44:54 -0700
- Subject: Re: [PATCH] Fix PR middle-end/28862, losing user alignment for vectors
- References: <1157599486.17588.28.camel@celery.andrew.com>
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