From patchwork Sun Aug 11 22:07:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 266405 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 3E2EE2C009E for ; Mon, 12 Aug 2013 08:07:39 +1000 (EST) 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:subject:content-type; q= dns; s=default; b=FtdbToll78jrCyc6DqSyZUsLyUL344JvcSpn9G4lLHCUeA naHg7eVTA+gtw1IZGoFyABYfDhlbYXjvl3HPv5lD/jwusfHqDTwO0T65+J6+iZw6 oe2gswf0s8s/xq3egg1dsUTltFh9EwOkyQ6DQSOntcoCVglIoUiWWMEP2PgDg= 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:subject:content-type; s= default; bh=YJ/D+jz21aVGAgLDhlUBNFbX6vo=; b=MilGFVrCPp47N2WiVXz+ /1/vbKNGdq+s6jHtq4FcHcVILn+OF87BqTrSxyY2zowLjXKzSiL9PZbxUsXarkOg oMAwM9JudlhNhbydId6nhjCO2WpYCICejrlkfMcYMktgSbkdPvkhuEnEumnFziLU qpKMAC7qDY9W4vzmtkrj6oM= Received: (qmail 28040 invoked by alias); 11 Aug 2013 22:07:32 -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 28025 invoked by uid 89); 11 Aug 2013 22:07:31 -0000 X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 11 Aug 2013 22:07:31 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7BM7Sug023599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 11 Aug 2013 22:07:29 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7BM7RE0021129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 11 Aug 2013 22:07:28 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7BM7Rss029635 for ; Sun, 11 Aug 2013 22:07:27 GMT Received: from poldo4.casa (/79.33.220.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 11 Aug 2013 15:07:27 -0700 Message-ID: <52080B1D.2070309@oracle.com> Date: Mon, 12 Aug 2013 00:07:25 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [C++ testcase, committed] PR 53349 X-Virus-Found: No Hi, committed to mainline. Thanks, Paolo. //////////////////////// 2013-08-11 Paolo Carlini PR c++/53349 * g++.dg/cpp0x/constexpr-ice8.C: New. Index: g++.dg/cpp0x/constexpr-ice8.C =================================================================== --- g++.dg/cpp0x/constexpr-ice8.C (revision 0) +++ g++.dg/cpp0x/constexpr-ice8.C (working copy) @@ -0,0 +1,17 @@ +// PR c++/53349 +// { dg-do compile { target c++11 } } + +template +struct Foo { + constexpr Foo(const Foo a) : m_a(a) {} + constexpr Foo(const Foo &a) : m_a(a.m_a) {} + + Foo m_a; +}; + +template <> struct Foo<0> {}; + +constexpr Foo<1> catty1(Foo<1> x) { return x; } +constexpr Foo<2> catty2(Foo<1> x) { return Foo<2>(catty1(x)); } + +constexpr auto res = catty2(Foo<1>(Foo<0>()));