From 68c6b3a925e4432121539692ccb69b76f0cf2529 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 9 Dec 1994 21:06:03 +0000 Subject: [PATCH] (fold): Call real_zerop for real constants. From-SVN: r8634 --- gcc/fold-const.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e5184c098cc..e49fcfb6d31 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4724,7 +4724,9 @@ fold (expr) /* If we have A op 0 ? A : -A, this is A, -A, abs (A), or abs (-A), depending on the comparison operation. */ - if (integer_zerop (TREE_OPERAND (arg0, 1)) + if ((FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (arg0, 1))) + ? real_zerop (TREE_OPERAND (arg0, 1)) + : integer_zerop (TREE_OPERAND (arg0, 1))) && TREE_CODE (arg2) == NEGATE_EXPR && operand_equal_p (TREE_OPERAND (arg2, 0), arg1, 0)) switch (comp_code) -- 2.30.2