From 4b314fcb73dc39526e84a2ddb57de47c11dcdf84 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 1 Sep 2014 10:16:43 +0000 Subject: [PATCH] re PR c/61271 (10 * possible coding error with logical not (!)) PR c/61271 * expr.c (is_aligning_offset): Remove logical not. From-SVN: r214785 --- gcc/ChangeLog | 8 ++++++++ gcc/expr.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9118236a7664..0f872fa1ade7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-09-01 Marek Polacek + + Backport from mainline + 2014-08-21 Marek Polacek + + PR c/61271 + * expr.c (is_aligning_offset): Remove logical not. + 2014-09-01 Marek Polacek Backport from mainline diff --git a/gcc/expr.c b/gcc/expr.c index 01697e99ac87..f83a7d0d448e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10603,7 +10603,7 @@ is_aligning_offset (const_tree offset, const_tree exp) || !host_integerp (TREE_OPERAND (offset, 1), 1) || compare_tree_int (TREE_OPERAND (offset, 1), BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0 - || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0) + || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0) return 0; /* Look at the first operand of BIT_AND_EXPR and strip any conversion. -- 2.47.2