/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / vla5.C
blob6bfbece9174ca19075185c3792d41a753fc0fc63
1 // PR c++/55149
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wno-vla" }
5 void test(int n) {
6   int r[n];
7   [&r]() { return r + 0; };
8   [r]() { return r + 0; };      // { dg-error "captured by copy" }