diff mbox

[C++,committed] Add PR 46466 testcase

Message ID 4D6A4FEA.6040304@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Feb. 27, 2011, 1:21 p.m. UTC
Hi,

tested x86_64-linux, committed to mainline.

Paolo.

//////////////////////
2011-02-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/46466
	* g++.dg/cpp0x/constexpr-ctor8.C: New.
diff mbox

Patch

Index: g++.dg/cpp0x/constexpr-ctor8.C
===================================================================
--- g++.dg/cpp0x/constexpr-ctor8.C	(revision 0)
+++ g++.dg/cpp0x/constexpr-ctor8.C	(revision 0)
@@ -0,0 +1,6 @@ 
+// PR c++/46466
+// { dg-options "-std=c++0x -fno-elide-constructors" }
+
+struct S { bool b; };
+constexpr S f() { return S{true}; }
+static_assert(f().b,  "");