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 09:57:39AM -0400, Diego Novillo wrote:
> On Tue, Aug 02, 2005 at 09:39:56AM -0400, Daniel Jacobowitz wrote:
>
> > Then the alias analyzer's broken.
> >
> Broken? I'm saying that we currently get this right. I don't
> know what position are you arguing.
Sorry, my mistake. I'd forgotten that Ian said we got this right in
4.1.
> This code does builds an address location out of an arbitrary integer:
>
> unsigned int D.1142_8 = *ptr_1;
> struct cons *D.1143_9 = (struct cons *) D.1142_8;
> ptr_10 = &D.1143_9->cdr;
>
> Does the language allow the creation of address locations out of
> arbitrary integer values? Is the dereference of such an
> address a defined operation? If so, then it's simply a matter of
> recognizing this situation when computing points-anywhere
> attributes.
Yes, it does - well, it's implementation defined, but GCC has long
chosen the natural interpretation. C99 6.3.2.3, paragraph 5. This is
no different from that classic example, a pointer which escapes via
printf/scanf.
--
Daniel Jacobowitz
CodeSourcery, LLC