* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / constexpr-vla3.C
blob538b576a8255cf3bb84e94d7c4df89e20aa4e114
1 // PR c++/69516
2 // { dg-do compile { target c++14 } }
4 constexpr int
5 foo (int n)
7   __extension__ int a[n] = { 1, 2, 3, 4, 5, 6 };
8   int z = 0;
9   for (int i = 0; i <= n; ++i)
10     z += a[i];
11   return z;
14 constexpr int n = foo (3); // { dg-error "array subscript|in .constexpr. expansion of " }