2011-02-27 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 2011 13:20:55 +0000 (13:20 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 2011 13:20:55 +0000 (13:20 +0000)
PR c++/46466
* g++.dg/cpp0x/constexpr-ctor8.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170538 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C [new file with mode: 0644]

index f1f0bc6..f670f38 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/46466
+       * g++.dg/cpp0x/constexpr-ctor8.C: New.
+
 2011-02-27  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/47886
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C
new file mode 100644 (file)
index 0000000..81fc837
--- /dev/null
@@ -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,  "");