This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: fix pr61111 Fixed width of mask.


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)
 		{

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]