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: 705657 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tdxKV48qrz9ryn for ; Wed, 14 Dec 2016 23:51:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="hHwBrgDt"; dkim-atps=neutral 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=a1pWDOknOR6ksVxgN XoabmyUgzW7mnO1qFTg5uQZuEMrj4CuO9TjEIYfyheFPr7ptd7CYIEes8R/EAz2o 6yAmXcnboo5Z6zChXBRKWTo4o6Jwv9YDvbOz2LV0CyvmN6VY64Xxx0AXSNgOKUIv +Q2wBU8NaeUBZQ0twRoB5TkEQA= 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=hHwBrgDtENC35P+zsBw37m2SG+0jSgL0+Aar3CUQLngIUPEF/1gtUQd 1A2/ZXq7kxBrTkWeORljXakMhCqQcF/5UKnW22S/LrpvWQswOFtnt5pxMzNtMJ5w 1Y38r0gsi75cXZKbNm8nyGb1oK68Dr1NE7GjVqjWRkcWRM+iRtOo= 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 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