diff options
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/fold-const.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbcc8ca..24096b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Oct 19 01:26:48 1999 Alasdair Baird <alasdair@wildcat.demon.co.uk> + + * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation. + Mon Oct 18 15:19:41 1999 Richard Henderson <rth@cygnus.com> * basic-block.h (set_block_num): Declare. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index f055d23..24cc752 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: |
