diff options
author | Richard Biener <rguenther@suse.de> | 2017-06-28 14:24:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-06-28 14:24:00 +0000 |
commit | 56a6d474ab255eddf334bd77df014673d4035336 (patch) | |
tree | be42b439d86c5ccb2693751b78243de1dae4300e /gcc/fold-const.c | |
parent | 00eee3fa2a884e3ab0bcbf6de3a94d4da2b34d4c (diff) | |
download | gcc-56a6d474ab255eddf334bd77df014673d4035336.zip gcc-56a6d474ab255eddf334bd77df014673d4035336.tar.gz gcc-56a6d474ab255eddf334bd77df014673d4035336.tar.bz2 |
re PR tree-optimization/81227 (ICE in get_single_symbol, at tree-vrp.c:799)
2017-06-28 Richard Biener <rguenther@suse.de>
PR middle-end/81227
* fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
TYPE_OVERFLOW_WRAPS.
* match.pd (negate_expr_p): Likewise.
* tree-ssa-reassoc.c (optimize_range_tests_diff): Use
fold_build2, not fold_binary.
* gcc.dg/pr81227.c: New testcase.
From-SVN: r249742
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 379a30e..1bcbbb5 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -383,7 +383,7 @@ negate_expr_p (tree t) switch (TREE_CODE (t)) { case INTEGER_CST: - if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type)) + if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)) return true; /* Check that -CST will not overflow type. */ |