From 2af3e5fb9557eefd4dcc31ae33b4fc31fbbd5670 Mon Sep 17 00:00:00 2001 From: Alasdair Baird Date: Tue, 19 Oct 1999 07:26:59 +0000 Subject: [PATCH] * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation. From-SVN: r30077 --- gcc/ChangeLog | 4 ++++ gcc/fold-const.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbcc8ca4bb2..24096b199af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Oct 19 01:26:48 1999 Alasdair Baird + + * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation. + Mon Oct 18 15:19:41 1999 Richard Henderson * basic-block.h (set_block_num): Declare. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index f055d23a13d..24cc7529327 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4871,7 +4871,8 @@ fold (expr) && real_zerop (arg1)) return non_lvalue (convert (type, arg0)); /* x+(-0) equals x, even for IEEE. */ - else if (REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (arg1))) + else if (TREE_CODE (arg1) == REAL_CST + && REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (arg1))) return non_lvalue (convert (type, arg0)); bit_rotate: -- 2.30.2