From patchwork Sun Jul 20 19:20:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 371938 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D43AC14010C for ; Mon, 21 Jul 2014 05:20:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=JrMTc/SlBVBCwnB3An/odAWkbP9V3cCZySPO+I1kwQ1o0/GdjkpMi 50yt5HI3zfvMnHTaBCEdb6uvh6ziZCF2LYVxeUCzP0hzEeu5HH7sxLv6JtifO93/ O15VEbgd8Qhs/5YG/49M9mQkgc0hWNPll6cv2H24xqKV3PgoK/XQ5A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=6V5ZTSWFOiXzQqKS3MRNH6AaXOA=; b=VdlHvbyrto2vJosbF7du ZU006DjQ+vMolgu9m7tVCjX69YBUzsC0G3bLSW6cLQMreoa8qQ9fyPDt8EGVPwHr fsEha+u0jWlnSQmDCIBJCWD0AWD/0s87KBAOjPAqD7DtVwTXGCREv5eof6594dP3 y17nMwgckX85mPDmXrJG678= Received: (qmail 8761 invoked by alias); 20 Jul 2014 19:20:27 -0000 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 Received: (qmail 8647 invoked by uid 89); 20 Jul 2014 19:20:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, T_TVD_MIME_NO_HEADERS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f49.google.com Received: from mail-wg0-f49.google.com (HELO mail-wg0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 20 Jul 2014 19:20:21 +0000 Received: by mail-wg0-f49.google.com with SMTP id k14so5576626wgh.8 for ; Sun, 20 Jul 2014 12:20:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=SKFqcI3S/Gzs/TLqBRFcua3e2swQFuJQBCrjOeJ9u44=; b=jvnsmEb6nmgyAQBDC+hHeDqevo3LlErlM9BM8siSsO9cH3k1GcaQyy2ZHfBX1z4FXF PQ0ZhgfFuQwIgjsG3cZs0cguAJNVBVV89iUT14fZt/7Yxp3Pz1ExYSODw8XEIojtrS9d /YBB3EM9zhMyKUV7PQU9KDLfmKNnA2n9coHoNpp312SVsiPv95mn9AnaeYdda4RcD3Vs 0QR2MKTZkAZRUhCL4GzUODbPwZIAcUPg4TcfrY2jANH3mx7FOEqZ7GCEy4rGltYGduVz CzkHrzwdW8mvC6X3umkkBRIBBySzvMTSWmrq4LtTctXZUCkwwzhGhcKb6iInRRcTSQMz dn9Q== X-Gm-Message-State: ALoCoQmfAeHD49sGv2GmXfvY6AJ9DpaZi8VTOow8L05G/8UqFaT5ayY2FV5NhuBFYmbNN6ykApVA X-Received: by 10.180.211.71 with SMTP id na7mr49020089wic.55.1405884018114; Sun, 20 Jul 2014 12:20:18 -0700 (PDT) Received: from iant-glaptop.roam.corp.google.com.google.com (conference-edgemax.caths.cam.ac.uk. [131.111.225.4]) by mx.google.com with ESMTPSA id ev18sm8329386wid.1.2014.07.20.12.20.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 20 Jul 2014 12:20:17 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Remove unused variable Date: Sun, 20 Jul 2014 12:20:15 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes This patch from Peter Collingbourne removes an unused variable from libgo. The variable is set but never used, and gccgo was not giving an error about such cases. I will shortly commit a gccgo patch to detect this case. This patch bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r cc0233176c9b libgo/go/reflect/value.go --- a/libgo/go/reflect/value.go Sun Jul 20 08:12:13 2014 -0700 +++ b/libgo/go/reflect/value.go Sun Jul 20 12:19:22 2014 -0700 @@ -434,13 +434,12 @@ // Get function pointer, type. t := v.typ var ( - fn unsafe.Pointer - rcvr Value - rcvrtype *rtype + fn unsafe.Pointer + rcvr Value ) if v.flag&flagMethod != 0 { rcvr = v - rcvrtype, t, fn = methodReceiver(op, v, int(v.flag)>>flagMethodShift) + _, t, fn = methodReceiver(op, v, int(v.flag)>>flagMethodShift) } else if v.flag&flagIndir != 0 { fn = *(*unsafe.Pointer)(v.ptr) } else {