This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More fun with aliasing - removing assignments?
On Tue, Aug 02, 2005 at 02:56:50PM +0200, Richard Guenther wrote:
> Oh, and a workaround and slight correction would be to write
>
> void nconc (unsigned x, unsigned y) {
> unsigned *ptr = &((cons *)x)->cdr;
> while(!(*ptr & 3))
> ptr = &((cons *)(*ptr))->cdr;
> *ptr = y;
> }
>
No. Same problem. The aliaser would say "yes, ptr points
anywhere, but it cannot escape the local frame". The final store
is dead just the same.
We only "get it right" because we do not distinguish between
different degrees of points-anywhere.