diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-11 15:24:00 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-11 15:24:00 +0000 |
commit | 944017fde46eabd93a045ddb7827269ef8d7366b (patch) | |
tree | e99dab3450b2f3d8752625e45a2e5345cd593a8c /gcc/fold-const.c | |
parent | 0516388dfc9773b620fbc4996044c93b75853579 (diff) | |
download | gcc-944017fde46eabd93a045ddb7827269ef8d7366b.tar.gz |
ChangeLog:
* fold-const.c (fold_comparison): Only call fold_inf_compare
if the mode supports infinities.
testsuite/ChangeLog:
* gcc.c-torture/execute/ieee/inf-3.c: New test.
* gcc.c-torture/execute/ieee/inf-2.c: Fix typo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 97331f34d24..e38850fd5df 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9292,7 +9292,8 @@ fold_comparison (enum tree_code code, tree type, tree op0, tree op1) } /* Fold comparisons against infinity. */ - if (REAL_VALUE_ISINF (cst)) + if (REAL_VALUE_ISINF (cst) + && MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg1)))) { tem = fold_inf_compare (code, type, arg0, arg1); if (tem != NULL_TREE) |