From 59d9021293ae8e85286df22390eb5e154f6ae207 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 21 Jul 1994 14:46:32 -0700 Subject: [PATCH] (fold): Don't fold X-X to 0 if X is floating point and !flag_fast_math. From-SVN: r7786 --- gcc/fold-const.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 0417aab48b3..fd17f1a5644 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3733,8 +3733,8 @@ fold (expr) Also note that operand_equal_p is always false if an operand is volatile. */ - if (operand_equal_p (arg0, arg1, - FLOAT_TYPE_P (type) && ! flag_fast_math)) + if ((! FLOAT_TYPE_P (type) || flag_fast_math) + && operand_equal_p (arg0, arg1, 0)) return convert (type, integer_zero_node); goto associate; -- 2.30.2