aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70614cf..ffe31f3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/61111
+ * fold-const.c (fold_binary_loc): Changed width of mask.
+
2014-05-09 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 831aaba..c5bf811 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -11358,7 +11358,7 @@ fold_binary_loc (location_t loc,
wide_int c3 = c1.and_not (c2);
for (w = BITS_PER_UNIT; w <= width; w <<= 1)
{
- wide_int mask = wi::mask (width - w, false,
+ wide_int mask = wi::mask (w, false,
TYPE_PRECISION (type));
if (((c1 | c2) & mask) == mask && c1.and_not (mask) == 0)
{