1 2 3 4 5 6 7 8 9 10 11 12
// PR c++/78523 // { dg-do compile { target c++14 } } int bar (); void foo () { const int t = bar (); auto f = [=] (auto x) { return t; }; f (0); }