From patchwork Thu Nov 22 10:25:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [C++,testcase] PR 55432 Date: Thu, 22 Nov 2012 00:25:04 -0000 From: Paolo Carlini X-Patchwork-Id: 201035 Message-Id: <50ADFD80.2050602@oracle.com> To: "gcc-patches@gcc.gnu.org" Hi, tested x86_64-linux, committed to mainline. Thanks, Paolo. ///////////////////// 2012-11-22 Paolo Carlini PR c++/55432 * g++.dg/cpp0x/constexpr-55432.C: New. Index: g++.dg/cpp0x/constexpr-55432.C =================================================================== --- g++.dg/cpp0x/constexpr-55432.C (revision 0) +++ g++.dg/cpp0x/constexpr-55432.C (working copy) @@ -0,0 +1,22 @@ +// PR c++/55432 +// { dg-do compile { target c++11 } } + +struct tag_t{} tag{}; + +constexpr tag_t const& pass(tag_t & t) +{ + return t; +} + +struct S +{ + constexpr S(tag_t) {}; +}; + +struct T +{ + S mem; + T( tag_t & args ) : mem(pass(args)) {} +}; + +T t(tag);