repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/85553
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
constexpr-vla3.C
blob
538b576a8255cf3bb84e94d7c4df89e20aa4e114
1
// PR c++/69516
2
// { dg-do compile { target c++14 } }
3
4
constexpr int
5
foo (int n)
6
{
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;
12
}
13
14
constexpr int n = foo (3); // { dg-error "array subscript|in .constexpr. expansion of " }