From patchwork Wed Dec 14 12:51:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 88016 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp176775qgi; Wed, 14 Dec 2016 04:51:46 -0800 (PST) X-Received: by 10.84.210.73 with SMTP id z67mr206793067plh.171.1481719906641; Wed, 14 Dec 2016 04:51:46 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c19si30665266pgk.317.2016.12.14.04.51.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 04:51:46 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444394-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444394-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444394-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=DBBYaoF1153ZTrNuB 0kFxsy8giIdse9QfxJEzLOaCsWLBgwmMgasci48TkaptiYfzkGz8zJjJNVprKv6C i6ACvhmZm/eVVsc4cyYvWvMNRYixlM57VW2g0pG6jZ3Myyt3iERHzCralqxZmoCu Q5G8PkWLfvgBW39IV+VuSjWUD8= 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 :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=zWbCqbGv/Jaf5teoM6wmOSl gMpY=; b=pv7Yr392uiDQqeLnUXQ2sxWfmOprAE5KfxwAA4FnYZobjxtHdQ4PDQ8 CUbRW+8Y6WRjKOm+AhOOVf6Vg+z3vwFZogWxj1aopROPWnErw0odMk9mpQpI7gKo WRSaQqdWmA9nyB5ai175k54z1yqb030YvSvrAiw01sIfhqT+oK7w= Received: (qmail 112172 invoked by alias); 14 Dec 2016 12:51:34 -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 112159 invoked by uid 89); 14 Dec 2016 12:51:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=enumeral_, record_, RECORD_, sk:decl_sh X-HELO: mail-yb0-f196.google.com Received: from mail-yb0-f196.google.com (HELO mail-yb0-f196.google.com) (209.85.213.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Dec 2016 12:51:23 +0000 Received: by mail-yb0-f196.google.com with SMTP id d59so1725692ybi.2 for ; Wed, 14 Dec 2016 04:51:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to; bh=ORt/T/mrrhVqp6O+AXndd+3MY19BBcit1T2dV2WQwRA=; b=JveSWOzsPNTc17Dwtw1EA6GmW56X5h8J8sM8RIxQlM9Da8L/GOIAMmJJCzMpz7XrAn jpWlSXak0OIEPS2+iF4FeCW/ery9dpcj+XY2h4k4hWUr8bZRhmoKnQux4cJzjTP9F0VJ QWu30uBDD/LZLCswoWZgFSA1r90AFyCc3C55DmQtyf7bhEH2g0qPbzry/9t+jlqNTRyU m4vH6VN2RAx3m/sxknT4PWAkP4jbitLeg48lpyYRZqSANEcijKuFsExdXBkBgZP5imvt vdWHrOnhCb+dq4HWCU7R1lOJPNUHbbMH4b5sDFw/nqI/oE1L0HqJItKw08dYIZqUJ5rM pBgA== X-Gm-Message-State: AKaTC021CmTpnD8Vd1XNG6/MlSx7V4KyLY3feq86izFx6Up4H8ehGs0l1rYXkRKw0FSDjQ== X-Received: by 10.37.111.214 with SMTP id k205mr51582330ybc.175.1481719881793; Wed, 14 Dec 2016 04:51:21 -0800 (PST) Received: from ?IPv6:2620:10d:c0a3:20fb:f6d0:5ac5:64cd:f102? ([2620:10d:c091:200::640]) by smtp.googlemail.com with ESMTPSA id n81sm21211016ywn.5.2016.12.14.04.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 04:51:21 -0800 (PST) Subject: Re: [C++ PATCH] c++/78776 fix alias template ICE To: Jason Merrill References: <22c0a78c-809c-ab1c-f992-41f4816f6499@redhat.com> <82012a69-7380-723d-51c6-b250d352c890@redhat.com> Cc: GCC Patches From: Nathan Sidwell Message-ID: <502054c6-869f-f4e5-b7e6-9a3bf1e19da1@acm.org> Date: Wed, 14 Dec 2016 07:51:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <82012a69-7380-723d-51c6-b250d352c890@redhat.com> On 12/13/2016 03:58 PM, Jason Merrill wrote: > I'm still seeing the redundant DECL_LANG_SPECIFIC check. Sorry, I misunderstood which check you meant was redundant. In the original patch, the first check wasn't redundant (but the second check was entirely within the codepath of the first). But with the newer patch it turns out the first one is not needed. Is this what you meant? (usual build & test passes) nathan -- Nathan Sidwell 2016-12-14 Nathan Sidwell PR c++/69481 * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Always use TYPE_ALIAS_TEMPLATE_INFO for aliases. Index: cp/cp-tree.h =================================================================== --- cp/cp-tree.h (revision 243647) +++ cp/cp-tree.h (working copy) @@ -3049,18 +3049,18 @@ extern void decl_shadowed_for_var_insert ? CLASSTYPE_TEMPLATE_INFO (NODE) \ : NULL_TREE))) -/* Template information for an alias template type. */ +/* Template information (if any) for an alias type. */ #define TYPE_ALIAS_TEMPLATE_INFO(NODE) \ (DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \ : NULL_TREE) -/* If NODE is a specialization of an alias template, this accessor - returns the template info for the alias template. Otherwise behave - as TYPE_TEMPLATE_INFO. */ +/* If NODE is a type alias, this accessor returns the template info + for the alias template (if any). Otherwise behave as + TYPE_TEMPLATE_INFO. */ #define TYPE_TEMPLATE_INFO_MAYBE_ALIAS(NODE) \ - (TYPE_ALIAS_P (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ - ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \ + (TYPE_ALIAS_P (NODE) \ + ? TYPE_ALIAS_TEMPLATE_INFO (NODE) \ : TYPE_TEMPLATE_INFO (NODE)) /* Set the template information for an ENUMERAL_, RECORD_, or