This one ICEd but was, curiously, fixed very recently by r271811.

Tested x86_64-linux, applying to trunk.

2019-06-09  Marek Polacek  <pola...@redhat.com>

        PR c++/60366
        * g++.dg/cpp0x/lambda/lambda-ice32.C: New test.

diff --git gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C 
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C
new file mode 100644
index 00000000000..6f8d37c02e8
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C
@@ -0,0 +1,9 @@
+// PR c++/60366
+// { dg-do compile { target c++11 } }
+
+void
+fn ()
+{
+  auto f = [](const struct __lambda0 &self) { self(self); }; // { dg-error "" }
+  f(f); // { dg-error "" }
+}

Reply via email to