From: Paolo Carlini Date: Mon, 2 Oct 2017 09:03:32 +0000 (+0000) Subject: re PR c++/59991 (Recursive lambda capture in C++1y constexpr function template causes... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=144d302eeb44548506be82089afdf9b9da21f315;p=gcc.git re PR c++/59991 (Recursive lambda capture in C++1y constexpr function template causes internal compiler error) 2017-10-02 Paolo Carlini PR c++/59991 * g++.dg/cpp0x/lambda/lambda-ice23.C: New. From-SVN: r253339 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cab94f9639d..bd060dfb252 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-02 Paolo Carlini + + PR c++/59991 + * g++.dg/cpp0x/lambda/lambda-ice23.C: New. + 2017-10-02 Tom de Vries * 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 index 00000000000..b811ad2da59 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice23.C @@ -0,0 +1,13 @@ +// PR c++/59991 +// { dg-do compile { target c++11 } } + +template +constexpr int r(T x) { + auto f = [r,x]() { return r(x); }; // { dg-error "incomplete type" } + return 0; +} + +int main() +{ + r(0); +}