This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ada and TBAA and arrays vs. VIEW_CONVERT_EXPRs
On Mon, 9 Feb 2009, Richard Kenner wrote:
> > > A and A[I] don't conflict. If TYPE_NONALIASES_COMPOMENT is set, they
> > > should be the SAME alias set and hence conflict and if not there should
> > > be a subset relationship. If the above was deleted, then certainly there
> > > should be ALL SORTS of problems!
> >
> > No, you missed the other part of the change: if TYPE_NONALIASES_COMPOMENT is
> > not set, the alias set of the whole array should be that of its element now.
>
> I didn't miss that. I agree that it's a good idea because of the
> semantics of string literals, but the key here was that the subset
> relationship wasn't being properly set in the array case. This should work
> with or without the Gigi change.
The problem is that in Gigi you are copying alias sets from a
TYPE_NONALIASES_COMPOMENT type to a non-TYPE_NONALIASES_COMPOMENT type.
As non-TYPE_NONALIASES_COMPOMENT expect their element alias-set to be
the same as the array alias-set now this won't work (and probably wasn't
very clean from the beginning).
Richard.