re PR c++/46466 ([C++0X] ICE when using constexpr with -fno-elide-constructors)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 27 Feb 2011 13:20:55 +0000 (13:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 27 Feb 2011 13:20:55 +0000 (13:20 +0000)
2011-02-27  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r170538

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

index f1f0bc612b4590d6fe1ad6dd3d229c32405438f4..f670f3826ff897a94a53ef7857cc94cc81e8b737 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,  "");