re PR c++/67831 (Internal error on complicated constexpr initialization.)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 17 Oct 2017 09:06:53 +0000 (09:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 17 Oct 2017 09:06:53 +0000 (09:06 +0000)
2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67831
* g++.dg/cpp0x/constexpr-ice18.C: New.

From-SVN: r253807

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

index 450e48202fec70026a95fc8030ab36a941173058..1a692d3859e6c425d21584f723e698448afcdc53 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/67831
+       * g++.dg/cpp0x/constexpr-ice18.C: New.
+
 2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/82570
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice18.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice18.C
new file mode 100644 (file)
index 0000000..0b5ff70
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/67831
+// { dg-do compile { target c++11 } }
+
+struct Task {
+  struct TaskStaticData {
+    constexpr TaskStaticData() {}
+  } const &tsd;
+  constexpr Task() : tsd(TaskStaticData()) {}
+};
+
+Task tasks{Task()};