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


> 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?

> 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.

> 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.

-- 
Eric Botcazou


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