diff options
author | Richard Guenther <rguenther@suse.de> | 2010-08-17 09:50:12 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-08-17 09:50:12 +0000 |
commit | 743ad76e9e7e6481b1b1764d4e5654158565deff (patch) | |
tree | 3961519cc0d1eccf6b3ae1c44ead9b5f4397ec3a /gcc/fold-const.c | |
parent | 470301c5f68b2ddd65b2a52cf49515c6c7adfd74 (diff) | |
download | gcc-743ad76e9e7e6481b1b1764d4e5654158565deff.zip gcc-743ad76e9e7e6481b1b1764d4e5654158565deff.tar.gz gcc-743ad76e9e7e6481b1b1764d4e5654158565deff.tar.bz2 |
fold-const.c (fold_comparison): Strip nops inside POINTER_PLUS_EXPR.
2010-08-17 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_comparison): Strip nops inside
POINTER_PLUS_EXPR.
From-SVN: r163298
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d63411e..02ddac5 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8683,6 +8683,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, else if (TREE_CODE (arg0) == POINTER_PLUS_EXPR) { base0 = TREE_OPERAND (arg0, 0); + STRIP_SIGN_NOPS (base0); if (TREE_CODE (base0) == ADDR_EXPR) { base0 = TREE_OPERAND (base0, 0); @@ -8705,6 +8706,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type, else if (TREE_CODE (arg1) == POINTER_PLUS_EXPR) { base1 = TREE_OPERAND (arg1, 0); + STRIP_SIGN_NOPS (base1); if (TREE_CODE (base1) == ADDR_EXPR) { base1 = TREE_OPERAND (base1, 0); |