aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2003-06-26 12:37:35 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2003-06-26 10:37:35 +0000
commit6dc208a1ed88e40e359173ece8a3f9441001fd6c (patch)
tree14b89f3251bb5d788e34146c737c60cdcc20685b /gcc/fold-const.c
parentfc5eb4a11164a00abe56f16d14b3f5264434339a (diff)
downloadgcc-6dc208a1ed88e40e359173ece8a3f9441001fd6c.zip
gcc-6dc208a1ed88e40e359173ece8a3f9441001fd6c.tar.gz
gcc-6dc208a1ed88e40e359173ece8a3f9441001fd6c.tar.bz2
re PR rtl-optimization/11210 (optimizer drops conditional with typecast from signed to unsigned char)
PR optimization/11210 * fold-const (decode_field_reference): Strip only NOPs that don't affect the sign. From-SVN: r68524
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index b35d733..b160a4e 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2742,7 +2742,8 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
if (! INTEGRAL_TYPE_P (TREE_TYPE (exp)))
return 0;
- STRIP_NOPS (exp);
+ /* Signedness matters here. */
+ STRIP_SIGN_NOPS (exp);
if (TREE_CODE (exp) == BIT_AND_EXPR)
{