1 // N3648: capture init at non-block scope
2 // { dg-options "-w" }
3 // { dg-do run { target c++14 } }
4 
5 int i = 42;
6 int j = [x=i]{ return x; }();
7 
main()8 int main()
9 {
10   if (j != 42) __builtin_abort();
11 }
12