diff options
author | Richard Guenther <rguenther@suse.de> | 2011-09-05 07:32:37 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-09-05 07:32:37 +0000 |
commit | 5b970a1aaf1f639194b7ed55935c2b2dbbcc0c27 (patch) | |
tree | 4ea70cb77d5227acecb181744e322fa9ada5129b | |
parent | 1a94ffae3661bae81e3142c6f965939deacf3e72 (diff) | |
download | gcc-5b970a1aaf1f639194b7ed55935c2b2dbbcc0c27.zip gcc-5b970a1aaf1f639194b7ed55935c2b2dbbcc0c27.tar.gz gcc-5b970a1aaf1f639194b7ed55935c2b2dbbcc0c27.tar.bz2 |
revert: fold-const.c (extract_muldiv_1): Remove bogus TYPE_IS_SIZETYPE special-casing.
2011-09-05 Richard Guenther <rguenther@suse.de>
Revert
2011-08-31 Richard Guenther <rguenther@suse.de>
* fold-const.c (extract_muldiv_1): Remove bogus TYPE_IS_SIZETYPE
special-casing.
From-SVN: r178523
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fold-const.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3365404..b106227 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-09-04 Richard Guenther <rguenther@suse.de> + + Revert + 2011-08-31 Richard Guenther <rguenther@suse.de> + + * fold-const.c (extract_muldiv_1): Remove bogus TYPE_IS_SIZETYPE + special-casing. + 2011-09-04 Iain Sandoe <iains@gcc.gnu.org> PR debug/49901 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 0f4ca5e..5807a55 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5888,9 +5888,11 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type, multiple of the other, in which case we replace this with either an operation or CODE or TCODE. - If we have an unsigned type, we cannot do this since it will change - the result if the original computation overflowed. */ - if (TYPE_OVERFLOW_UNDEFINED (ctype) + If we have an unsigned type that is not a sizetype, we cannot do + this since it will change the result if the original computation + overflowed. */ + if ((TYPE_OVERFLOW_UNDEFINED (ctype) + || (TREE_CODE (ctype) == INTEGER_TYPE && TYPE_IS_SIZETYPE (ctype))) && ((code == MULT_EXPR && tcode == EXACT_DIV_EXPR) || (tcode == MULT_EXPR && code != TRUNC_MOD_EXPR && code != CEIL_MOD_EXPR |