From patchwork Mon Mar 28 18:08:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 88649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 32851100D59 for ; Tue, 29 Mar 2011 05:09:07 +1100 (EST) Received: (qmail 28923 invoked by alias); 28 Mar 2011 18:09:04 -0000 Received: (qmail 28911 invoked by uid 22791); 28 Mar 2011 18:09:03 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Mar 2011 18:08:59 +0000 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p2SI8wKV032531 for ; Mon, 28 Mar 2011 11:08:58 -0700 Received: from iwn34 (iwn34.prod.google.com [10.241.68.98]) by kpbe16.cbf.corp.google.com with ESMTP id p2SI8V40019002 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 28 Mar 2011 11:08:57 -0700 Received: by iwn34 with SMTP id 34so5284943iwn.33 for ; Mon, 28 Mar 2011 11:08:57 -0700 (PDT) Received: by 10.42.108.73 with SMTP id g9mr7456662icp.250.1301335737301; Mon, 28 Mar 2011 11:08:57 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id gy41sm3082997ibb.39.2011.03.28.11.08.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 11:08:56 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: go patch committed: Fix useless assertion Date: Mon, 28 Mar 2011 11:08:54 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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];