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 450e482..1a692d3 100644 (file)
@@ -1,5 +1,10 @@
 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
        * g++.dg/cpp1z/constexpr-lambda18.C: New.
 
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()};