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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed May 28 12:44:11 2014
New Revision: 211018

URL: http://gcc.gnu.org/viewcvs?rev=211018&root=gcc&view=rev
Log:
2014-05-28  Richard Biener  <rguent...@suse.de>

    PR middle-end/61045
    * fold-const.c (fold_comparison): When folding
    X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
    the sign of the remaining constant operand stays the same.

    * gcc.dg/pr61045.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr61045.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to