This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix miscompilation (fold-const)
On Mon, Aug 05, 2002 at 12:17:00PM -0700, Geoff Keating wrote:
> > The following testcase is miscompiled (in all GCCs since end of 1999).
> > The problem is that associate_trees performs an optimization which
> > can be done with PLUS_EXPR only (turning x + (-y) into x - y or
> > -x + y into y - x) - changing say x | -y into x - y is definitely wrong.
> > Bootstrapped and regression tested on i386-redhat-linux (together with the
> > bitfield3.C fix where I had to add target keyword to the dg-do line to pass),
> > ok to commit?
> > 3.2 branch after 3.2 is out too?
>
> This is OK for the mainline. I think it doesn't qualify for the
> branch, since it's not a regression, but I'll let Mark decide.
It is a regression from 2.95.x and earlier.
Jakub