From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35346 invoked by alias); 11 Jan 2016 22:04:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35331 invoked by uid 89); 11 Jan 2016 22:04:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Jan 2016 22:04:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2695742E5C7; Mon, 11 Jan 2016 22:04:17 +0000 (UTC) Received: from [10.10.116.37] (ovpn-116-37.rdu2.redhat.com [10.10.116.37]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0BM4GkI000874; Mon, 11 Jan 2016 17:04:16 -0500 Subject: Re: C++ patch ping To: Jakub Jelinek References: <20160109074122.GP18720@tucnak.redhat.com> <56940A23.4040501@acm.org> <5694224E.9090707@redhat.com> <20160111215217.GA3017@tucnak.redhat.com> Cc: Nathan Sidwell , gcc-patches@gcc.gnu.org From: Jason Merrill Message-ID: <569426E0.2050301@redhat.com> Date: Mon, 11 Jan 2016 22:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160111215217.GA3017@tucnak.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00653.txt.bz2 On 01/11/2016 04:52 PM, Jakub Jelinek wrote: > On Mon, Jan 11, 2016 at 04:44:46PM -0500, Jason Merrill wrote: >> On 01/11/2016 03:01 PM, Nathan Sidwell wrote: >>> On 01/09/16 02:41, Jakub Jelinek wrote: >>>> Hi! >>>> >>>> I'd like to ping the PR c++/66808, PR c++/69000 >>>> http://gcc.gnu.org/ml/gcc-patches/2015-12/msg02019.html >>>> patch, fixing ICE with GNU __thread vars in templates. >>> >>> Can't you unconditionally clear DECL_TEMPLATE_INFO regardless of local_p? >>> >>> if (DECL_LANG_SPECIFIC(r)) >>> DECL_TEMPLATE_INFO(r) == NULL_TREE; >>> ? > > You mean: > > --- gcc/cp/pt.c.jj 2016-01-05 16:46:02.891896607 +0100 > +++ gcc/cp/pt.c 2016-01-11 21:33:09.065184178 +0100 > @@ -12207,6 +12207,8 @@ tsubst_decl (tree t, tree args, tsubst_f > DECL_TEMPLATE_INSTANTIATED (r) = 0; > if (type == error_mark_node) > RETURN (error_mark_node); > + if (DECL_LANG_SPECIFIC (r)) > + DECL_TEMPLATE_INFO (r) = NULL_TREE; > if (TREE_CODE (type) == FUNCTION_TYPE) > { > /* It may seem that this case cannot occur, since: > > I'm almost through bootstrapping that, but regtesting will take some more > time. > >> Or clear it for local_p down by where we're setting it for !local_p. > > Do you mean: > > --- gcc/cp/pt.c.jj 2016-01-05 16:46:02.891896607 +0100 > +++ gcc/cp/pt.c 2016-01-11 22:49:12.303477700 +0100 > @@ -12292,8 +12292,13 @@ tsubst_decl (tree t, tree args, tsubst_f > SET_DECL_IMPLICIT_INSTANTIATION (r); > register_specialization (r, gen_tmpl, argvec, false, hash); > } > - else if (!cp_unevaluated_operand) > - register_local_specialization (r, t); > + else > + { > + if (VAR_P (r) && DECL_LANG_SPECIFIC (r)) > + DECL_TEMPLATE_INFO (r) = NULL_TREE; > + if (!cp_unevaluated_operand) > + register_local_specialization (r, t); > + } > > DECL_CHAIN (r) = NULL_TREE; > > or something different? Or should it be cleared also for non-VAR_DECLs > if they have DECL_LANG_SPECIFIC? Yes, like that. You don't need to check VAR_P, since TYPE_DECL also has DECL_TEMPLATE_INFO. Jason