1 // PR c++/55149
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wno-vla" }
4 
test(int n)5 void test(int n) {
6   int r[n];
7   [&r]() { return r + 0; };
8   [r]() { return r + 0; };	// { dg-error "captured by copy" }
9 }
10