re PR c++/60366 (ICE with self-invoking lambdas)
authorMarek Polacek <polacek@redhat.com>
Sun, 9 Jun 2019 15:41:07 +0000 (15:41 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sun, 9 Jun 2019 15:41:07 +0000 (15:41 +0000)
PR c++/60366
* g++.dg/cpp0x/lambda/lambda-ice32.C: New test.

From-SVN: r272092

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

index a1b884164de936a22c2d95d9836559bb8749cc1b..fc0d76df434dfa564a4f836f5fa5f29eeaaad520 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-09  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/60366
+       * g++.dg/cpp0x/lambda/lambda-ice32.C: New test.
+
 019-06-09  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/89365
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C
new file mode 100644 (file)
index 0000000..6f8d37c
--- /dev/null
@@ -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 "" }
+}