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
* init.c (build_vec_init): Call ubsan_instrument_bounds to check
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
vla-1.C
blob
e7f24945f7ae1ccdec2abe7209596b3d9e2cb4b0
1
// { dg-do run }
2
// { dg-options "-Wno-vla -fsanitize=undefined" }
3
// { dg-shouldfail "ubsan" }
4
// { dg-output "index 1 out of bounds" }
5
6
void f(int i) {
7
int ar[i] = { 42, 24 };
8
}
9
10
int main()
11
{
12
f(1);
13
}