From patchwork Tue Jul 18 22:31:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 790670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-458455-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Vis9lELN"; dkim-atps=neutral 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 3xBvyd4WmSz9s72 for ; Wed, 19 Jul 2017 08:31:21 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=NFhEIDR5n6bOOqPRaLNdFV81Yl8hTqt0WFNZOmKL4+AnDQ +DRwsp8CJBhiZdwy/hqxVsyUlV0ROVAvwntM8wRK7the6XEDRJJXjUxXVSdiTEmG p0oEtWS7FRXSTIYO2hkAGUfiqtABEtZluJrVDs9wnQyQajvnz+xduP3BJpGxE= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=t818a0nd3ZmRXV01lc+pQAzXCdk=; b=Vis9lELNN17BL6L1tnsW 7WWhDvrzZS5fvQjm47j9SbwnUAX1yHLIUEB5hmFs5+uhapj2qFVgiSfiFFJbrXqb OYdlMWOukVoapnThe4s20c4CPmDSh7TpHW1nNPlq6LpbYQwyZK7A1vQHxzxIyLZB /u/gk07wQ1VXWlWeG34zYoE= Received: (qmail 91415 invoked by alias); 18 Jul 2017 22:31:14 -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 90955 invoked by uid 89); 18 Jul 2017 22:31:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Than X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jul 2017 22:31:11 +0000 Received: by mail-oi0-f42.google.com with SMTP id q4so29593188oif.1 for ; Tue, 18 Jul 2017 15:31:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vB6S2i+ENzvTsM6kwExTUFOXXzX6tSva6FwoX9AuuIY=; b=ce1SSlJav9qrPRe0GntBUhh3mVE6OXkk+j7j/p+j51AHuX+ObO7Qq8YEZWliRM6sua 7gUEitg4oSQNb7tWnTvfc4bm8LVJSZoDW9GbD61QvysgzUmZVfTr7mBOEeachimIWYWo oIReu0XF75U/M0az+c4q7i8EdhLHRMIl2Ho/Gjf8Ba+uc4P7hxxI7s1jeQ5nG/QCqEn1 qVSHNVAbNRhYAdq8gkDtjMfy17EST1pREchS5VplDAMVDBzVJAkMUFDJAm6CD4jgHYij Hp16tDx5oqcmFeHi/t6wrLlzFy81NJPVWbKi2piFk5Uzr+73PhAowEfUqlZhWJiH40IH L6aA== X-Gm-Message-State: AIVw111gftUw4LjYmz4PkjXICu/FQ3R1dxPuju0jsOXk0TNyUPIbequs PK+T+rfvZuX0dHeF4fl5Zb+X2/NkKjiZO08= X-Received: by 10.202.245.5 with SMTP id t5mr2660918oih.176.1500417069453; Tue, 18 Jul 2017 15:31:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.208.20 with HTTP; Tue, 18 Jul 2017 15:31:08 -0700 (PDT) From: Ian Lance Taylor Date: Tue, 18 Jul 2017 15:31:08 -0700 Message-ID: Subject: Go patch committed: Pass correct 'function' flag to circular_pointer_type To: gcc-patches , "gofrontend-dev@googlegroups.com" The code in Named_type::do_get_backend in the Go frontend was not passing the correct flag value for circular function types to Backend::circular_pointer_type (it was always setting this flag to false). This patch by Than McIntosh passes a true value if the type being converted is a function type. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 250324) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -21775ae119830810d9e415a02e85349f4190c68c +0036bd04d077f8bbe5aa9a62fb8830c53068209e The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/types.cc =================================================================== --- gcc/go/gofrontend/types.cc (revision 249799) +++ gcc/go/gofrontend/types.cc (working copy) @@ -10994,13 +10994,13 @@ Named_type::do_get_backend(Gogo* gogo) if (this->seen_in_get_backend_) { this->is_circular_ = true; - return gogo->backend()->circular_pointer_type(bt, false); + return gogo->backend()->circular_pointer_type(bt, true); } this->seen_in_get_backend_ = true; bt1 = Type::get_named_base_btype(gogo, base); this->seen_in_get_backend_ = false; if (this->is_circular_) - bt1 = gogo->backend()->circular_pointer_type(bt, false); + bt1 = gogo->backend()->circular_pointer_type(bt, true); if (!gogo->backend()->set_placeholder_pointer_type(bt, bt1)) bt = gogo->backend()->error_type(); return bt;