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]
Other format: [Raw text]

Re: [PATCH][RFC] Fix PR33724, fix PR19382 differently


On Wed, 10 Oct 2007, Eric Botcazou wrote:

> > PR33724 is about us generating two incompatible TYPE_POINTER_TO types
> > to unsigned char.  The type-checking code doesn't really know which one
> > to check against.  The different pointer-to types were introduced by
> > the fix for PR19382.
> 
> Can't it simply allow both?

Unless I run into...

> 
> > In the following patch there are two possible fixes/workarounds for
> > the problem.  The first patch to tree.c arranges to put the
> > ref-all pointer-to type last in the list of TYPE_POINTER_TO types
> > (this is just a workaround, I think it is fundamentally bogus to have
> > two incompatible pointer-to types). 
> 
> You even can have more than 2 if you change the mode.

...this, I don't think this is the correct way to go.  But yes, I can also
change the verifier to be more careful about the TYPE_POINTER_TO type
it uses.

> > The second patch to builtins.c reverts the fix for PR19382 and instantiates
> > a different fix following the reasoning in the audit trail of said PR that
> > the transformation is only valid for alias set zero unsigned char types.
> 
> I don't think it's the way to go to conditionalize folding on the nullity of a 
> certain alias set, as it will be enabled at -O0 and -O1, but not at -O2.

Well, the way-to-go would be for this transformation to use a middle-end
private character type with alias set zero.  Just abusing the
TYPE_REF_CAN_ALIAS_ALL hack is IMHO not good (ok, I admit I dislike
all the fancy flags we have for the sole purpose of supporting some
Ada specialities).  Also I don't see a problem with the transformation
being enabled with -fno-strict-aliasing but not with -fstrict-aliasing
for Ada.

Richard.


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