From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8538 invoked by alias); 11 Jan 2016 21:52:26 -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 8516 invoked by uid 89); 11 Jan 2016 21:52:25 -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=regtesting, Hx-languages-length:1779 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 21:52:23 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8293592462; Mon, 11 Jan 2016 21:52:22 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.3]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0BLqKxX012565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Jan 2016 16:52:21 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u0BLqIxM023903; Mon, 11 Jan 2016 22:52:19 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u0BLqHxD023476; Mon, 11 Jan 2016 22:52:17 +0100 Date: Mon, 11 Jan 2016 21:52:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: Nathan Sidwell , gcc-patches@gcc.gnu.org Subject: Re: C++ patch ping Message-ID: <20160111215217.GA3017@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20160109074122.GP18720@tucnak.redhat.com> <56940A23.4040501@acm.org> <5694224E.9090707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5694224E.9090707@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00652.txt.bz2 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? Jakub