PR c++/78840 - ICE with const and nested generic lambda
* g++.dg/cpp1y/lambda-generic-const5.C: New. From-SVN: r251431
This commit is contained in:
parent
9925f216d0
commit
10f61650f7
1 changed files with 17 additions and 0 deletions
17
gcc/testsuite/g++.dg/cpp1y/lambda-generic-const5.C
Normal file
17
gcc/testsuite/g++.dg/cpp1y/lambda-generic-const5.C
Normal file
|
@ -0,0 +1,17 @@
|
|||
// PR c++/78840
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
int global;
|
||||
|
||||
void Bar (int);
|
||||
|
||||
template<int I> void Foo () {
|
||||
const int cst = global;
|
||||
auto lam0 = [&]() -> void {
|
||||
auto lam1 = [&]() -> void { cst; };
|
||||
|
||||
Bar (cst);
|
||||
};
|
||||
}
|
||||
|
||||
template void Foo <0> ();
|
Loading…
Add table
Reference in a new issue