This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Fix alias-set generation for array types
> Breaks as in misses an optimization,
Right.
> But I think this
> cannot work reliably like the other array cases. If you have
>
> int A[10];
>
> with non-aliased component 'int' and
>
> int[] *p;
>
> with non-aliased component 'int' then accessing A via p will not
> conflict.
Assuming you mean "int *p", indeed it should not! If the language
doesn't allow you to make a pointer to an element of A, then a pointer
to int can't conflict with it.
In Ada, unless you say "aliased", you indeed aren't allowed to create
such a pointer.