fold-const.c (fold): Place both integer and real constants last in comparisons.
authorRoger Sayle <roger@eyesopen.com>
Fri, 7 Jun 2002 23:42:53 +0000 (23:42 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 7 Jun 2002 23:42:53 +0000 (23:42 +0000)
commit437f1df1afacb10132608f3cf27f4289c1bdbe1c
treebfcf15db0019b5665c4cb88b677704f02c0b89ad
parentcd24b8a4033454aaac4cf053291fbc9bd0743016
fold-const.c (fold): Place both integer and real constants last in comparisons.

* fold-const.c (fold) [EQ_EXPR]:  Place both integer and real
constants last in comparisons.  Optimize (x+1.0)>0.0 into the
equivalent x > -1.0 when -ffast-math.

* gcc.dg/20020607-2.c: New test case.

From-SVN: r54356
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20020607-2.c [new file with mode: 0644]