[PATCH] Fix miscompilation (fold-const)

Geoff Keating geoffk@geoffk.org
Mon Aug 5 12:17:00 GMT 2002


Jakub Jelinek <jakub@redhat.com> writes:

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

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>



More information about the Gcc-patches mailing list