This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix inconsistency with alias_sets_conflict_p and alias_set_subset_of
On Thu, 15 Apr 2010, Paolo Bonzini wrote:
> On 04/15/2010 02:38 PM, Richard Guenther wrote:
> > > If alias set A has zero as subset, shouldn't it follow that A is
> > > effectively alias set zero? IOW, shouldn't alias set zero
> > > propagate "upwards" as well?
> >
> > Well, yes. [...] The problem is that C character types use the magic
> > alias-set zero. So we'd pessimize every structure containing a char
> > to effectively have disabled TBAA - the workaround was to have this
> > weird inversion.
>
> Why should it apply to unions too, though? Unions with an alias-zero member
> should also get alias zero, period.
Because we can't distinguish the case. I'm not arguing against what
is correct here just with past experience that the C/C++ frontend
is not willing to change that character types have alias-set zero.
Richard.