summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-27 14:40:38 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-27 14:40:38 +0000
commit7effcd301e3f1da9b7da258f7bf731ea873cbf4e (patch)
treebf8fc37775452fe22590c83cbb3ba0123a89b2b3 /gcc/fold-const.c
parent59169f2b024a136f2d8b7ba8f0c3174dfdb479e8 (diff)
downloadgcc-7effcd301e3f1da9b7da258f7bf731ea873cbf4e.tar.gz
2002-05-24 Andrew Haley <aph@redhat.com>
* fold-const.c (fold): Don't convert (T)(x & c) into (T)x & (T)c if T is a boolean type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53929 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 686fd41ce00..e9173019fcd 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4784,6 +4784,7 @@ fold (expr)
constants (if x has signed type, the sign bit cannot be set
in c). This folds extension into the BIT_AND_EXPR. */
if (INTEGRAL_TYPE_P (TREE_TYPE (t))
+ && TREE_CODE (TREE_TYPE (t)) != BOOLEAN_TYPE
&& TREE_CODE (TREE_OPERAND (t, 0)) == BIT_AND_EXPR
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (t, 0), 1)) == INTEGER_CST)
{