From 1e17e15ae532b05910a7fc0c599a01839dd1b032 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 17 May 2008 13:06:21 +0000 Subject: fold-const.c (fold_unary): Fold the cast into a BIT_AND_EXPR only for an INTEGER_TYPE. * fold-const.c (fold_unary) : Fold the cast into a BIT_AND_EXPR only for an INTEGER_TYPE. From-SVN: r135467 --- gcc/fold-const.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/fold-const.c') diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c167bc4..dc1e182 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7864,8 +7864,7 @@ fold_unary (enum tree_code code, tree type, tree op0) /* Convert (T)(x & c) into (T)x & (T)c, if c is an integer 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 (type) - && TREE_CODE (type) != BOOLEAN_TYPE + if (TREE_CODE (type) == INTEGER_TYPE && TREE_CODE (op0) == BIT_AND_EXPR && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST) { -- cgit v1.1