aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRoger Sayle <sayle@gcc.gnu.org>2003-02-19 22:59:33 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-02-19 22:59:33 +0000
commit3bc400cdc1d413b96b07bf8d590a5e99bf9c326a (patch)
treea66699c948423365ed0ae6efa1aedf2907f37176 /gcc/fold-const.c
parentb5a49c0bc8fe2914ed79aae28281bf0d25f152b4 (diff)
downloadgcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.zip
gcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.tar.gz
gcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.tar.bz2
fold-const.c (fold_real_zero_addition_p): Don't fold a zero addition in the presence of signaling NaNs.
* fold-const.c (fold_real_zero_addition_p): Don't fold a zero addition in the presence of signaling NaNs. From-SVN: r63133
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5dfa1e4..6b50a86 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4642,6 +4642,10 @@ fold_real_zero_addition_p (type, addend, negate)
if (!real_zerop (addend))
return false;
+ /* Don't allow the fold with -fsignaling-nans. */
+ if (HONOR_SNANS (TYPE_MODE (type)))
+ return false;
+
/* Allow the fold if zeros aren't signed, or their sign isn't important. */
if (!HONOR_SIGNED_ZEROS (TYPE_MODE (type)))
return true;