From: Paolo Carlini Date: Mon, 2 Oct 2017 09:41:36 +0000 (+0000) Subject: re PR c++/69977 (internal compiler error: Segmentation fault when using generic lambdas) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a6da556c414bbbec6df82fdb342e8b84e205507;p=gcc.git re PR c++/69977 (internal compiler error: Segmentation fault when using generic lambdas) 2017-10-02 Paolo Carlini PR c++/69977 * g++.dg/cpp1y/lambda-generic-69977.C: New. From-SVN: r253340 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd060dfb252..1edc61ee2f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-02 Paolo Carlini + + PR c++/69977 + * g++.dg/cpp1y/lambda-generic-69977.C: New. + 2017-10-02 Paolo Carlini PR c++/59991 diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69977.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69977.C new file mode 100644 index 00000000000..5f491da894b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69977.C @@ -0,0 +1,23 @@ +// PR c++/69977 +// { dg-do compile { target c++14 } } + +class A { +private: + void method(int i) { + (void) i; + } + +public: + void publicMethod() { + auto lambda = [&] (const auto k) { + method(k); + }; + lambda(42); + } +}; + +int main() +{ + A a; + a.publicMethod(); +}