summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-23 06:00:06 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-23 06:00:06 +0000
commit06deaf7e17285160673edb738c4654408817e703 (patch)
treefcf7dbcf856c331dadfb0a651e5eff3a5fa472f7 /gcc/fold-const.c
parent635f6fb2c8242e9d995e1c9cd7372f8650ba9141 (diff)
downloadgcc-06deaf7e17285160673edb738c4654408817e703.tar.gz
* fold-const.c (fold): Test vs FLOAT_TYPE_P instead of
INTEGRAL_TYPE_P when folding comparisons with operand_equal_p arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 55480d269f4..6a606eaa612 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -6516,7 +6516,7 @@ fold (expr)
case EQ_EXPR:
case GE_EXPR:
case LE_EXPR:
- if (INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
+ if (! FLOAT_TYPE_P (TREE_TYPE (arg0)))
return constant_boolean_node (1, type);
code = EQ_EXPR;
TREE_SET_CODE (t, code);
@@ -6524,7 +6524,7 @@ fold (expr)
case NE_EXPR:
/* For NE, we can only do this simplification if integer. */
- if (! INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
+ if (FLOAT_TYPE_P (TREE_TYPE (arg0)))
break;
/* ... fall through ... */
case GT_EXPR: