Patchwork go patch committed: Fix useless assertion

login
register
mail settings
Submitter Ian Taylor
Date March 28, 2011, 6:08 p.m.
Message ID <mcr39m7ce2x.fsf@google.com>
Download mbox | patch
Permalink /patch/88649/
State New
Headers show

Comments

Ian Taylor - March 28, 2011, 6:08 p.m.
This patch to the Go frontend fixes a useless assertion to actually do
something useful.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r 1cab38f05b0f go/expressions.cc
--- a/go/expressions.cc	Sun Mar 27 12:11:31 2011 -0700
+++ b/go/expressions.cc	Mon Mar 28 11:04:16 2011 -0700
@@ -3814,7 +3814,7 @@ 
 	    ++obits;
 	  size_t ocount = ((obits + HOST_BITS_PER_WIDE_INT - 1)
 			   / HOST_BITS_PER_WIDE_INT);
-	  gcc_assert(ocount <= ocount);
+	  gcc_assert(ocount <= count);
 
 	  for (size_t i = 0; i < ocount; ++i)
 	    phwi[i] = ~phwi[i];