From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71016 invoked by alias); 25 Jun 2015 16:57:04 -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 71001 invoked by uid 89); 25 Jun 2015 16:57:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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; Thu, 25 Jun 2015 16:57:02 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 34F9637C385; Thu, 25 Jun 2015 16:57:01 +0000 (UTC) Received: from [10.10.116.35] ([10.10.116.35]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5PGv0h8015258; Thu, 25 Jun 2015 12:57:00 -0400 Message-ID: <558C32D7.1090902@redhat.com> Date: Thu, 25 Jun 2015 17:02:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Aldy Hernandez , gcc-patches , Jan Hubicka Subject: Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s References: <558B71A3.3080004@redhat.com> In-Reply-To: <558B71A3.3080004@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg01846.txt.bz2 On 06/24/2015 11:12 PM, Aldy Hernandez wrote: > The problem here is that we are trying to call > dwarf2out_late_global_decl() on a static variable in a template which > has a type of TEMPLATE_TYPE_PARM: > > template class A > { > static __thread T a; > }; > > We are calling late_global_decl because we are about to remove the > unused static from the symbol table: The problem here is that 'a' should never have been in the symbol table in the first place, since it's an uninstantiated template. It's there because of honza's change to store the TLS model in the symbol table, so TLS templates end up with varpool entries that, of course, will never be referenced. I guess either we need to avoid putting these templates in the symbol table or we need to mark these fake entries somehow. Jason