This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: fix pr61111 Fixed width of mask.
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 09 May 2014 08:29:13 -0400
- Subject: [PATCH]: fix pr61111 Fixed width of mask.
- Authentication-results: sourceware.org; auth=none
2014-05-09 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/61111
* fold-const.c (fold_binary_loc): Changed width of mask.
committed as revision 210274.
kenny
Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c (revision 210253)
+++ gcc/fold-const.c (working copy)
@@ -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)
{