From patchwork Fri Feb 23 21:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 877311 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-473788-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="pjiouYRj"; 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 3zp4P43dBJz9sWD for ; Sat, 24 Feb 2018 08:39:19 +1100 (AEDT) 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=VPDR0xK/F7JgmaZljiUj5z3KSCXwKoS+eYmy7+lDwAqJtq TebUkNm8n5Kk2EgXYzqkPzjUWCS/qszaB0UfQpJoWN36hBRXzwB0Fy6FPn1KeTgB eicYE9UV5Kn4UoJq1A8NFXDBTvqOHIUQhumrCKawdN4BmEL8DewqJI7q5urLU= 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=i770oXmxVdpO6nIHtawF/9iDaks=; b=pjiouYRjXVK/7SRHnBMm 6lH5DD0UtbFfThTaRC95P1shgR4RP22Dv+pmmdfz72HsDfbzKUDfsLpKHQerngqk 3yScI21UFEK0DY3Fzjw+623xBYSvenx9PnlmMFuv5a9emmuCME0inFSx8skIYxXk P1Hr5n87jpnDGzLhtgqbhKM= Received: (qmail 60349 invoked by alias); 23 Feb 2018 21:39:11 -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 60328 invoked by uid 89); 23 Feb 2018 21:39:10 -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-wm0-f43.google.com Received: from mail-wm0-f43.google.com (HELO mail-wm0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Feb 2018 21:39:09 +0000 Received: by mail-wm0-f43.google.com with SMTP id z81so7108352wmb.4 for ; Fri, 23 Feb 2018 13:39:08 -0800 (PST) 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=qFCH6DoaUUCWNZFJIXK3c8h55QVDM8lhBqBi00h0M+o=; b=DIMyozSL85bk/fHU6ZBIp80WfVRFvkqcFJ5K8F8ZKbARzgF5xzSuwKATR87e6YRpFF /rijwqIr2BUKOEeTEpMZvvyKA+rCmBo3SnaxHbUgESsEfle/4yjUc+8Xn2TXwZUiLQPD Pun9dryq4iAkkrd2/JfOJs21V8HVU4j/4aMu7dOn1i4VqQzrwe/Zm7f/WH4D9z0aDMwq ONhtAaET77SiHdXcXt8Sh8GB1zA3vATeXICdn29XWYRxtz5WpzBxjs3G9lOwkW6BgyQ9 F6iznM4E/ro0xauzPQw8qzZCa4TuUBhnO79+s2vHaTnJpQeaZvUhsFQLTgm+f31SivqC h0tQ== X-Gm-Message-State: APf1xPDTdzjJ011OfZLl5F7RbTEkZSbFIURiarFJ2G3FuXuOwHvHu8li YiZQbDZ4nidL7VbfHpjZ4+ncvusbumF6M9tBpZEqoA== X-Google-Smtp-Source: AH8x226/YwpLWEiAwfe6CK0Cs80LY+6nrwaOJmM6JL+dYKoOVzKJmIa6oT/M67Pr/av4jXlE/vBs7BiGvGNYOFqTN7g= X-Received: by 10.80.208.153 with SMTP id v25mr4422571edd.182.1519421946654; Fri, 23 Feb 2018 13:39:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.144.132 with HTTP; Fri, 23 Feb 2018 13:39:05 -0800 (PST) From: Ian Lance Taylor Date: Fri, 23 Feb 2018 13:39:05 -0800 Message-ID: Subject: Go patch committed: Ignore aliases in fieldtracking info To: gcc-patches , gofrontend-dev@googlegroups.com This patch to the Go frontend ignores aliases when emitting fieldtracking info. We want to track references to fields in the real struct, not in some alias to the struct. 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 257914) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -ed8647cc99652db2d689215c05f31ad038438a7e +8b3d6091801d485c74a9c92740c69673e39160b0 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (revision 257914) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -11696,7 +11696,7 @@ Field_reference_expression::do_lower(Gog Location loc = this->location(); std::string s = "fieldtrack \""; - Named_type* nt = this->expr_->type()->named_type(); + Named_type* nt = this->expr_->type()->unalias()->named_type(); if (nt == NULL || nt->named_object()->package() == NULL) s.append(gogo->pkgpath()); else