[PATCH][RFC] Fix alias-set generation for array types

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Tue Jun 3 12:58:00 GMT 2008


> 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.



More information about the Gcc-patches mailing list