diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2006-04-23 09:06:32 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2006-04-23 09:06:32 +0000 |
commit | 1464eeb8be87335d2ed335437d029fa6d436b997 (patch) | |
tree | 4d74803f8f0699568b8c921e3a85edd2839cb59c | |
parent | 54ffdb125c287b527a97b05f83bd942249a91446 (diff) | |
download | gcc-1464eeb8be87335d2ed335437d029fa6d436b997.zip gcc-1464eeb8be87335d2ed335437d029fa6d436b997.tar.gz gcc-1464eeb8be87335d2ed335437d029fa6d436b997.tar.bz2 |
fold-const.c (range_predecessor): Use operand_equal_p as the predicate for equality.
* fold-const.c (range_predecessor): Use operand_equal_p
as the predicate for equality.
(range_successor): Likewise.
From-SVN: r113192
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fold-const.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b2febd..76914ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-04-23 Eric Botcazou <ebotcazou@adacore.com> + + * fold-const.c (range_predecessor): Use operand_equal_p + as the predicate for equality. + (range_successor): Likewise. + 2006-04-22 Kazu Hirata <kazu@codesourcery.com> Revert: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 39bd366..5671682 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4158,7 +4158,8 @@ range_predecessor (tree val) { tree type = TREE_TYPE (val); - if (INTEGRAL_TYPE_P (type) && val == TYPE_MIN_VALUE (type)) + if (INTEGRAL_TYPE_P (type) + && operand_equal_p (val, TYPE_MIN_VALUE (type), 0)) return 0; else return range_binop (MINUS_EXPR, NULL_TREE, val, 0, integer_one_node, 0); @@ -4171,7 +4172,8 @@ range_successor (tree val) { tree type = TREE_TYPE (val); - if (INTEGRAL_TYPE_P (type) && val == TYPE_MAX_VALUE (type)) + if (INTEGRAL_TYPE_P (type) + && operand_equal_p (val, TYPE_MAX_VALUE (type), 0)) return 0; else return range_binop (PLUS_EXPR, NULL_TREE, val, 0, integer_one_node, 0); |