re PR c++/59991 (Recursive lambda capture in C++1y constexpr function template causes...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 2 Oct 2017 09:03:32 +0000 (09:03 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 2 Oct 2017 09:03:32 +0000 (09:03 +0000)
2017-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59991
* g++.dg/cpp0x/lambda/lambda-ice23.C: New.

From-SVN: r253339

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

index cab94f9639d3b54aa837e953e6692b622960e7d5..bd060dfb2522ed1d9ac9d023c05862d6b35905e0 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/59991
+       * g++.dg/cpp0x/lambda/lambda-ice23.C: New.
+
 2017-10-02  Tom de Vries  <tom@codesourcery.com>
 
        * gcc.c-torture/compile/pr82337.c: Add
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice23.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice23.C
new file mode 100644 (file)
index 0000000..b811ad2
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/59991
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+constexpr int r(T x) {
+  auto f = [r,x]() { return r(x); }; // { dg-error "incomplete type" }
+  return 0;
+}
+
+int main()
+{
+  r(0);
+}