http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 11 Apr 2014, glisse at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819
> 
> --- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
> typedef int v2si __attribute__((vector_size (8),may_alias));
> typedef short v4hi __attribute__((vector_size (8),may_alias));
> int f (v2si __A, int __N)
> { return (*(v4hi*)&__A)[__N]; }
> 
> also fails.
> 
> Reading the documentation of may_alias, I have the impression that this 
> example
> is doing exactly what may_alias is supposed to allow, no?

Not exactly - it's again the wrapping that will fail.

typedef int aint __attribute__((may_alias));

return ((aint*)&__A)[__N];

would make it valid.

Reply via email to