From patchwork Tue May 26 16:37:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 476636 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 9E6AF1402B5 for ; Wed, 27 May 2015 02:37:59 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Fkc8eeKP; 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=rV+TFtSAwUK0P1Ao4 E2MQtMLPDqtwSmnT1vAajXg0tWJhv+6y+HwKLOWh/7lrapPMnyMHh8xhAsnXE8y5 nEo+Vneed55SoCeZlR4rSYtXYwTLB52bmReYm+OCDyh/sKIsBVorwOtIqAjaE39D SgaUuQBQ1Dr45obPknPGQXX6SU= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=VJ99xr+JvVsvy3XY533fit8 l9oo=; b=Fkc8eeKPg8PGtHN6A6rW8NvNc6+lJBEdbVUFyBv9pELEv6/Cl1nefb4 f3PaTqxl7YSEdEbywT5m33e0+7f2O1DcQXJC6uUtMikJCJ8GLqY+H2uo7BtReo0q OihxHYg8y4TlaLrdQ/ObBdsWTUeTe6XOnXAmG2Rzh/OGPxq8xVWs= Received: (qmail 117173 invoked by alias); 26 May 2015 16:37:52 -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 117164 invoked by uid 89); 26 May 2015 16:37:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no 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; Tue, 26 May 2015 16:37:47 +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 (8.14.4/8.14.4) with ESMTP id t4QGbjb5030187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 26 May 2015 12:37:46 -0400 Received: from reynosa.quesejoda.com (unused [10.10.52.191] (may be forged)) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4QGbiQx008460; Tue, 26 May 2015 12:37:45 -0400 Message-ID: <5564A158.8010604@redhat.com> Date: Tue, 26 May 2015 12:37:44 -0400 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jason Merrill , gcc-patches CC: Richard Biener Subject: Re: [debug-early] fix problem with template parameter packs References: <55482AF6.1090207@redhat.com> <5549314D.6080804@redhat.com> <5549373F.6020503@redhat.com> <554A4146.4010501@redhat.com> In-Reply-To: <554A4146.4010501@redhat.com> On 05/06/2015 12:28 PM, Jason Merrill wrote: > On 05/05/2015 04:33 PM, Aldy Hernandez wrote: >> On 05/05/2015 02:08 PM, Jason Merrill wrote: >>> On 05/04/2015 09:29 PM, Aldy Hernandez wrote: >>>> The code handling parameter DIEs needed a little tweaking for variable >>>> length template arguments. I've relaxed the original assert, but this >>>> may require tweaking at branch review time-- hopefully later this week. >>> >>> What testcase motivated this? We're within a formal_parameter_pack, but >> >> Pretty much every other test in the libstdc++-v3 testsuite was failing >> with the ICE I elided in my patch. >> >> I wasn't able to narrow it down to a tiny test, but I can do so if you >> want. ?? > > I think that would be helpful so we can decide what we want the debug > output to look like. > > Jason > > Removing the aforementioned patch from the branch with the attached one-liner, you can reproduce on the following reduced testcase (-O -g -quiet -std=gnu++14): template < typename _Tp > _Tp forward () { }; template < typename blahblah > class vector { public: template < typename ... _Args > void emplace_back (_Args ...); template < typename ... _Args > void _M_emplace_back_aux (_Args ...); }; template < typename _Tp > template < typename ... _Args > void vector <_Tp >::emplace_back (_Args ...) { _M_emplace_back_aux (forward < _Args > ...); } void foobar () { vector < int >myvecint; myvecint.emplace_back (0, 0); } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7502fbc..4f3b484 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18006,6 +18006,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, } else { + gcc_unreachable(); /* Reuse DIE even with a differing context. This happens when called through