1 // PR c++/70570
2 // { dg-do assemble { target c++14 } }
3 
foo(T f)4 template<typename T> void foo(T f) {
5   f(1);
6 }
7 
main()8 int main() {
9   static const int x = 42;
10   foo([](auto y){
11     x;
12     [](){
13       x;
14     };
15   });
16 }
17