This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: neat bug in alias analysis


>>>>> "Mike" == Mike Stump <mrs@wrs.com> writes:

    >> From: Mark Mitchell <mark@codesourcery.com> Date: Thu, 19 Aug
    >> 1999 14:45:35 -0700

    >> + Note that this approach is actually more conservative that it
    >> + needs to be.  In particular, `const int *' and `int *' should
    >> + be in different alias sets, but this approach puts them in +
    >> the same alias set.  */

    Mike> Again, I still question the truth of this.  I think the
    Mike> comment is plain wrong.  I would like to have it explained
    Mike> to me, see my previous email.

I already tried in an earlier email.  The point is that the types we
are looking at here are the types of the memory being referenced, not
the types that we are using to reference it.  An `int **' cannot point
at the same thing as a `const int **' as `int *' and `const int *' are
not compatible types.  So, `const int*' and `int *' should be in
different alias sets.

    Mike> Also, I wonder if pointer to members will be screwed by the
    Mike> code in c-common for all the same reasons as pointers...

Right, I thought about that.  I'm not sure yet.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]