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++/84702] ICE with default tmpl arg of overload set
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
constexpr-vla4.C
blob
428a8fd5224a4f626c8422a7434c23b4f77bcccd
1
// PR c++/70452
2
// { dg-do compile { target c++14 } }
3
4
constexpr int
5
foo (int n, bool p)
6
{
7
__extension__ int a [n] = { 0 };
8
if (n == 3)
9
foo (n - 2, false);
10
if (n == 3)
11
foo(n - 1, true);
12
if (p)
13
return a[1];
14
return 0;
15
}
16
17
constexpr int i2 = foo (3, false); // { dg-bogus "array subscript out of bound" }