https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90514

--- Comment #4 from JunMa <JunMa at linux dot alibaba.com> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to JunMa from comment #2) 
> > I had got confused by the comments in vrp pass. the condition
> >   if ((kind != ENUM1) && (kind != ENUM2))
> > is not always false, and cannot be folded to if (0). 
> > Also the code deals with pr23046 is out of data, and should be removed.
> 
> That was C++ code rather than C code and C++ which has different rules than
> C (at least with -fstrict-enums).  The code is not out of date for gimple
> types.  Since the types in Gimple can have more well defined behaviors which
> are not exposed via C or C++ front-ends.  NOTE there could be an Ada code
> which hits the same failure (I don't know Ada that well but I do know the
> Ada front-end supports more features of the GCC middle-end than either of
> the C or C++ front-ends).

Since gimple folding has changed so much, we can easily support folding it in
match.pd rather than checking this in here.

Reply via email to