aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorSerge Belyshev <belyshev@depni.sinp.msu.ru>2006-11-09 19:24:32 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-11-09 19:24:32 +0000
commit0ad12cd3b586778ac750bfd9172a68fe0d6a4140 (patch)
tree4512a404386f0c2ec5a9161e38f98f6db671385f /gcc/fold-const.c
parent7114edca021e3251ec74acf93e9ebe18b128c87a (diff)
downloadgcc-0ad12cd3b586778ac750bfd9172a68fe0d6a4140.zip
gcc-0ad12cd3b586778ac750bfd9172a68fe0d6a4140.tar.gz
gcc-0ad12cd3b586778ac750bfd9172a68fe0d6a4140.tar.bz2
re PR middle-end/29726 (invalid folding of ((X >> C1) & C2) != 0 or "M-x is undefined" in emacs)
2006-11-09 Serge Belyshev <belyshev@depni.sinp.msu.ru> PR middle-end/29726 * fold-const.c (fold_binary) <EQ_EXPR>: Fix typo in variable name. * gcc.dg/fold-eqandshift-1.c (test5): Uncomment function. (test6): Ditto. (dg-final): Add scan-tree-dump-times patterns for test5 and test6. * gcc.dg/fold-eqandshift-3.c: New test case. From-SVN: r118625
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c74ffa3..6016a70 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -10587,7 +10587,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
unsigned HOST_WIDE_INT log2 = tree_log2 (arg01);
/* If (C2 << C1) doesn't overflow, then ((X >> C1) & C2) != 0
can be rewritten as (X & (C2 << C1)) != 0. */
- if ((log2 + TREE_INT_CST_LOW (arg01)) < prec)
+ if ((log2 + TREE_INT_CST_LOW (arg001)) < prec)
{
tem = fold_build2 (LSHIFT_EXPR, itype, arg01, arg001);
tem = fold_build2 (BIT_AND_EXPR, itype, arg000, tem);