diff options
author | Richard Guenther <rguenther@suse.de> | 2007-02-01 10:27:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-02-01 10:27:17 +0000 |
commit | ee7d8048d5cb690e325d79e82df75c3ddc36a081 (patch) | |
tree | 2371e5f628681bf2c8184df93992ef21f657be0e /gcc/fold-const.c | |
parent | f1b0882e68c21ec78026a448008a0470244d95b6 (diff) | |
download | gcc-ee7d8048d5cb690e325d79e82df75c3ddc36a081.zip gcc-ee7d8048d5cb690e325d79e82df75c3ddc36a081.tar.gz gcc-ee7d8048d5cb690e325d79e82df75c3ddc36a081.tar.bz2 |
re PR middle-end/30656 (ICE with -ftrapv)
2007-02-01 Richard Guenther <rguenther@suse.de>
PR middle-end/30656
* fold-const.c (fold_negate_expr): Allow negating a
constant if overflow does not change.
From-SVN: r121460
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 e0cab9c..e3f13e0 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1109,7 +1109,7 @@ fold_negate_expr (tree t) case INTEGER_CST: tem = fold_negate_const (t, type); - if (!TREE_OVERFLOW (tem) + if (TREE_OVERFLOW (tem) == TREE_OVERFLOW (t) || !TYPE_OVERFLOW_TRAPS (type)) return tem; break; |