Commit 603841eb by Paolo Carlini Committed by Paolo Carlini

re PR c++/79005 (Use of a captured variable within nested generic lambdas…

re PR c++/79005 (Use of a captured variable within nested generic lambdas provokes internal compiler error.)

2017-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/79005
	* g++.dg/cpp1y/lambda-generic-79005.C: New.

From-SVN: r253368
parent de87f2d0
2017-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/79005
* g++.dg/cpp1y/lambda-generic-79005.C: New.
2017-10-02 Paul Thomas <pault@gcc.gnu.org> 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312 PR fortran/82312
......
// PR c++/79005
// { dg-do compile { target c++14 } }
int main()
{
auto glambda = [] (auto a)
{
const int c = a;
auto cglambda = [&] ( auto b )
{
double result;
result = b * a;
result = b * c;
return result;
};
cglambda ( 1 );
a = c;
};
glambda( 1 );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment