From dcba286a9ad584b5713ab32c63516519ecef521a Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sun, 9 Jun 2019 15:41:07 +0000 Subject: [PATCH] re PR c++/60366 (ICE with self-invoking lambdas) PR c++/60366 * g++.dg/cpp0x/lambda/lambda-ice32.C: New test. From-SVN: r272092 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice32.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1b884164de..fc0d76df434 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-09 Marek Polacek + + PR c++/60366 + * g++.dg/cpp0x/lambda/lambda-ice32.C: New test. + 019-06-09 Paul Thomas 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 index 00000000000..6f8d37c02e8 --- /dev/null +++ b/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 "" } +} -- 2.30.2