1 // PR c++/89767
2 // { dg-do compile { target c++14 } }
3 
4 void bar (int);
5 
6 void
foo()7 foo ()
8 {
9   int x = 0;
10   auto z = [x, y = [x] { bar (x); }] { y (); bar (x); };
11   z ();
12 }
13