diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0bacc358c895..7d842728bedf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-10 Fariborz Jahanian + + PR tree-optimization/17892 + * tree-ssa-dom.c (unsafe_associative_fp_binop): Add test for + MINUS_EXPR operator. + 2004-11-10 James A. Morrison PR target/18230 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 427d8f4bde9c..b87577d77630 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-11-10 Fariborz Jahanian + + * gcc.c-torture/execute/ieee/unsafe-fp-assoc-1.c: + New test for PR tree-optimization/17892. + 2004-11-09 Mark Mitchell PR c++/18369 diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index a7f0aaf0c616..41138d8073e3 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1644,7 +1644,8 @@ unsafe_associative_fp_binop (tree exp) { enum tree_code code = TREE_CODE (exp); return !(!flag_unsafe_math_optimizations - && (code == MULT_EXPR || code == PLUS_EXPR) + && (code == MULT_EXPR || code == PLUS_EXPR + || code == MINUS_EXPR) && FLOAT_TYPE_P (TREE_TYPE (exp))); }