From patchwork Mon Mar 12 09:09:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 884352 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-474574-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="eJVioS24"; dkim-atps=neutral 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 400ByW2l0sz9sQv for ; Mon, 12 Mar 2018 20:09:54 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=H9z6w0lXurp7sS4Xyvhloc0+5SxEq JPDG7WKsbC2p6FKA4Tt4WloEA1nthZCw8pmm9tg2HsvDxcC3MYhHaVI6ZcN6ct5S sjIa4eKQtvRGrf44DUsa4pLu9cXJupS5NCAc+f7w5wmOS9p6xyuJYR59Hs8tk6/X q8j9UIBdbwSDw4= 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=t6xblkoPNjnDPiKfbWsPf5YQzUg=; b=eJV ioS24bMh7bMn4gKrSoyGLfb44HEb8/F/F6EVkzikBPTZKieA6X07UW/IH1CIHmDP HR5omzzudR64DPigXrdEcQuCYCgyf2EGIKTle6Ud1wnNF+SiqZH9BFWfapaS/KU5 RhFDx2tkvo/5CVvHY/G7sbaDa4LcqyExYpsVIHSU= Received: (qmail 22613 invoked by alias); 12 Mar 2018 09:09:47 -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 22230 invoked by uid 89); 12 Mar 2018 09:09:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Mar 2018 09:09:45 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C3574000B6E for ; Mon, 12 Mar 2018 09:09:44 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BF7D10B0F37; Mon, 12 Mar 2018 09:09:43 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w2C99g7i031247; Mon, 12 Mar 2018 10:09:42 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w2C99fkb031246; Mon, 12 Mar 2018 10:09:41 +0100 Date: Mon, 12 Mar 2018 10:09:41 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase for already fixed PR c++/84813 Message-ID: <20180312090941.GL8577@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes Hi! This PR got fixed in r251433 which I'm afraid is not backportable, we were trying to register local specialization during dwarf2out_type_decl. I've committed the testcase as obvious to trunk, so that we don't regress on it again: 2018-03-12 Jakub Jelinek PR c++/84813 * g++.dg/debug/pr84813.C: New test. Jakub --- gcc/testsuite/g++.dg/debug/pr84813.C.jj 2018-03-12 09:57:50.197029595 +0100 +++ gcc/testsuite/g++.dg/debug/pr84813.C 2018-03-12 09:57:40.279028562 +0100 @@ -0,0 +1,33 @@ +// PR c++/84813 +// { dg-do compile } +// { dg-options "-g -std=c++14" } + +template +struct P {}; + +template +struct F { + using type = int; +}; + +template +void +apply () +{ + constexpr int N = T::N; + [] (typename F::type) + { + auto f = [] () {}; + P{}; + }; +} + +struct A { + static constexpr int N = 1; +}; + +void +instantiate () +{ + apply (); +}