diff options
author | Richard Biener <rguenther@suse.de> | 2015-07-06 10:37:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-07-06 10:37:33 +0000 |
commit | 0409237b686b5daa66810427652acd53761d270b (patch) | |
tree | 1ccfded254a5f9af8fd07a43503b26afb4038da1 /gcc | |
parent | b2bae05de933b66b5c5f468e50e0aad24d8432d5 (diff) | |
download | gcc-0409237b686b5daa66810427652acd53761d270b.zip gcc-0409237b686b5daa66810427652acd53761d270b.tar.gz gcc-0409237b686b5daa66810427652acd53761d270b.tar.bz2 |
re PR tree-optimization/66759 (ICE in generic-match.c on 456.hmmer)
2015-07-06 Richard Biener <rguenther@suse.de>
PR middle-end/66759
* match.pd: Add missing constraint of y to REAL_CST in
REAL_CST - x CMP y to y - CST CMP x simplification.
* gcc.dg/torture/pr66759.c: New testcase.
From-SVN: r225449
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/match.pd | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr66759.c | 11 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 234468c..5e7108a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-06 Richard Biener <rguenther@suse.de> + + PR middle-end/66759 + * match.pd: Add missing constraint of y to REAL_CST in + REAL_CST - x CMP y to y - CST CMP x simplification. + 2015-07-06 Eric Botcazou <ebotcazou@adacore.com> PR tree-optimization/66757 diff --git a/gcc/match.pd b/gcc/match.pd index ae0d9f1..f850d52 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1497,7 +1497,7 @@ along with GCC; see the file COPYING3. If not see floating-point types only if -fassociative-math is set. */ (if (flag_associative_math) (simplify - (cmp (minus REAL_CST@0 @1) @2) + (cmp (minus REAL_CST@0 @1) REAL_CST@2) (with { tree tem = const_binop (MINUS_EXPR, TREE_TYPE (@1), @0, @2); } (if (!TREE_OVERFLOW (tem)) (cmp { tem; } @1))))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d51e606..efe389df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-06 Richard Biener <rguenther@suse.de> + + PR middle-end/66759 + * gcc.dg/torture/pr66759.c: New testcase. + 2015-07-06 Andre Vehreschild <vehre@gmx.de> PR fortran/58586 diff --git a/gcc/testsuite/gcc.dg/torture/pr66759.c b/gcc/testsuite/gcc.dg/torture/pr66759.c new file mode 100644 index 0000000..3e5d720 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr66759.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ffast-math" } */ + +int a, b; +float c; +int fn2(); +void fn1() +{ + if (fn2() <= 1. - c) + b = a; +} |