From patchwork Thu Mar 3 03:31:20 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: 85219 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 E2401B70E3 for ; Thu, 3 Mar 2011 14:31:35 +1100 (EST) Received: (qmail 18552 invoked by alias); 3 Mar 2011 03:31:34 -0000 Received: (qmail 18539 invoked by uid 22791); 3 Mar 2011 03:31:33 -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; Thu, 03 Mar 2011 03:31:27 +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 p233VPQc012153 for ; Wed, 2 Mar 2011 19:31:25 -0800 Received: from ywi6 (ywi6.prod.google.com [10.192.9.6]) by kpbe16.cbf.corp.google.com with ESMTP id p233VNL4016169 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 2 Mar 2011 19:31:24 -0800 Received: by ywi6 with SMTP id 6so289751ywi.17 for ; Wed, 02 Mar 2011 19:31:23 -0800 (PST) Received: by 10.236.125.193 with SMTP id z41mr817612yhh.57.1299123083623; Wed, 02 Mar 2011 19:31:23 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id i25sm479041yhn.12.2011.03.02.19.31.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Mar 2011 19:31:23 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Don't look for methods on named pointer types Date: Wed, 02 Mar 2011 19:31:20 -0800 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 Methods are not permitted on named pointer types, so there is no reason to look for them there. This patch changes the Go frontend to not do that. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r e71cf771cab1 go/types.cc --- a/go/types.cc Wed Mar 02 18:06:48 2011 -0800 +++ b/go/types.cc Wed Mar 02 19:30:05 2011 -0800 @@ -7963,9 +7963,7 @@ if (type->deref()->is_error_type()) return Expression::make_error(location); - const Named_type* nt = type->named_type(); - if (nt == NULL) - nt = type->deref()->named_type(); + const Named_type* nt = type->deref()->named_type(); const Struct_type* st = type->deref()->struct_type(); const Interface_type* it = type->deref()->interface_type();