summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-13 10:17:51 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-13 10:17:51 +0000
commita8875ee0474810c86e9920dd2e42f6d357057222 (patch)
treee233c5cc245878914cc351b054d0a383873e68eb /gcc/fold-const.c
parentaafa8c0afcb11fb053cf29da70fbee77934481b4 (diff)
downloadgcc-a8875ee0474810c86e9920dd2e42f6d357057222.tar.gz
* tree.h (TYPE_OVERFLOW_SANITIZED): Define.
* fold-const.c (fold_binary_loc): Use it. * match.pd: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 2f32d3c9974..a711be9c106 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -10516,9 +10516,7 @@ fold_binary_loc (location_t loc,
/* A - B -> A + (-B) if B is easily negatable. */
if (negate_expr_p (arg1)
- && (!INTEGRAL_TYPE_P (type)
- || TYPE_OVERFLOW_WRAPS (type)
- || (flag_sanitize & SANITIZE_SI_OVERFLOW) == 0)
+ && !TYPE_OVERFLOW_SANITIZED (type)
&& ((FLOAT_TYPE_P (type)
/* Avoid this transformation if B is a positive REAL_CST. */
&& (TREE_CODE (arg1) != REAL_CST