1 // PR c++/78840
2 // { dg-do compile { target c++14 } }
3 
4 int global;
5 
6 void Bar (int);
7 
Foo()8 template<int I> void Foo () {
9   const int cst = global;
10   auto lam0 = [&]() -> void {
11     auto lam1 = [&]() -> void { cst; };
12 
13     Bar (cst);
14   };
15 }
16 
17 template void Foo <0> ();
18