From patchwork Thu Sep 14 03:51:24 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: 813702 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-462101-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="AUR3fG7C"; 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 3xt4Mv32Bmz9sBZ for ; Thu, 14 Sep 2017 13:51:37 +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=dtl8mGTdsQgouJF7J6sijC3ymsSuTxUiW7UiQQNar0yqIp McORlychwM/jXQ/dvNuLxnDjDkukz0EtxzZFXHvyTFjkb42I/KJ8vGTfbTskUsEO nPe703m1JLQ/anFXrMK962Ba1OPiUaFYjXkv43LnRTkMNeDzkxs/jAkEX4Nbc= 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=XH5OUAoAL4hUqDHo84PrpAlq2bk=; b=AUR3fG7Cd4zSbjIAp0u9 AuU3vTzZj/z1Lif8t17hdJd/ip6KS3zaN1PCm0e1ipzpZ5rmVItxtS+93qasRAne vzoL1TURcbhodN/S7EU/8qQg3roU/qX0oaiycudBXs3pTTJw/ri7lL7N1KSq4Xpf bJdeP8jdv75QQ3ijzZJG/8k= Received: (qmail 352 invoked by alias); 14 Sep 2017 03:51:29 -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 341 invoked by uid 89); 14 Sep 2017 03:51:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pg0-f48.google.com Received: from mail-pg0-f48.google.com (HELO mail-pg0-f48.google.com) (74.125.83.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Sep 2017 03:51:26 +0000 Received: by mail-pg0-f48.google.com with SMTP id 188so4157386pgb.2 for ; Wed, 13 Sep 2017 20:51:26 -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=8NcKJ7W70xyl912WTUZ7Y9sM7dd0TWSc9Mtvsoz2x5U=; b=Wy/ZIxHcrR1y2RCsH8e3zv/bPTRTFvC/ZIz9N1nviftdrw8Q1T5kUPD92LZjFbAqdu dDTmbteC0iU63RA+qOXVkRPhQbgYZxHPilZ6Lz+ZWJWpRMkpNhlY7vZKC5WeR2HTYzZ1 97JpjG8MilySX33AhoQKLZcX3sEjacbfAzWP6z4Z9zhq6rvUhZtfrqVIE0NN0BFmcanv RPKs6f9Wmz7Q0KOqTd3SkM4tECGmp+nIQTJw/r0tFeEGZxIci9axRhY6H8VHNKpAXm51 xCqFhRsdW0TLl/5mJ0xa0TBVhv0AmmBzsZQEVOE0A47scPmUTY47Ahxtu9XyCfYAavv5 sl/w== X-Gm-Message-State: AHPjjUgiC5bKWu81xjXo3eze/V+cnhkoJX25ihYmrwTzDpB2gQtPf+Ki MOCLdUD4pwAgMTTMgjVc2YAnqew72OLHjKZo+2/+ZFpI X-Google-Smtp-Source: ADKCNb5PvyYsiCIfKfKjHbXUH4adrW/5vid9TmxNeVRqEqChuIgmbOWDeeDQ44bE5MZD62vTHITioaXWDIFu0JM2TLk= X-Received: by 10.84.229.79 with SMTP id d15mr22400184pln.397.1505361084636; Wed, 13 Sep 2017 20:51:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.173 with HTTP; Wed, 13 Sep 2017 20:51:24 -0700 (PDT) From: Ian Lance Taylor Date: Wed, 13 Sep 2017 20:51:24 -0700 Message-ID: Subject: Go patch committed: emit type specific functions for aliases To: gcc-patches , "gofrontend-dev@googlegroups.com" When the Go frontend has an alias for a struct or array that requires a type-specific function, don't emit the function with the alias name. Emit it with the struct/array as usual. The test case is for this is https://golang.org/cl/62531. 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 252746) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -b0a46c2cdb915ddc4a4e401af9ef6eb2bcd4d4ea +89e46ae0cde7bebd8e97434355c5b7e57d902613 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/gogo.cc =================================================================== --- gcc/go/gofrontend/gogo.cc (revision 251948) +++ gcc/go/gofrontend/gogo.cc (working copy) @@ -2498,6 +2498,8 @@ Specific_type_functions::type(Type* t) case Type::TYPE_NAMED: { Named_type* nt = t->named_type(); + if (nt->is_alias()) + return TRAVERSE_CONTINUE; if (t->needs_specific_type_functions(this->gogo_)) t->type_functions(this->gogo_, nt, NULL, NULL, &hash_fn, &equal_fn);