This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-vrp.c: Work around a bug in the front end thatproduces a comparison of mismatched types.
On Fri, 2005-04-15 at 12:43 -0400, Kazu Hirata wrote:
> Hi Jeff,
>
> > > > PR tree-optimization/21021
> > > > * tree-vrp.c (compare_values): Work around a bug in the front
> > > > end that produces a comparison of mismatched types.
> > > >
> > > OK.
> > Err, umm, I DO NOT like this.
>
> I do not either.
>
> > We're working around a bug in some bogus front-end. Let's
> > fix that rather than hacking up the tree optimizers to deal with
> > clearly bogus and broken code.
> >
> > I'd really rather see this patch come out and the real bug fixed.
>
> Yes, that's what I am planning to do. Indeed, I just found the source
> of this type mismatch. fold_binary is stripping what I think are
> useful conversions.
>
> I added more detailed analysis in PR 21024. If you could give us a
> thought on this, that would be greatly appreciated.
>
> Maybe the right fix is as simple as teaching STRIP_SIGN_NOPS not to
> strip an integer-pointer type conversion.
It's my understanding that this problem has been resolved by the
recent change to expand_builtin_strcat and find_binary, right?
jeff