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
2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
ubsan
/
vla-3.c
blob
6003fdddf3a227b1b567f5b71806cae159d913a4
1
/* { dg-do run } */
2
/* { dg-options "-fsanitize=vla-bound -fno-sanitize-recover=vla-bound" } */
3
4
/* Don't instrument the arrays here. */
5
int
6
foo
(
int
n
,
int
a
[])
7
{
8
return
a
[
n
-
1
];
9
}
10
11
int
12
main
(
void
)
13
{
14
int
a
[
6
] = { };
15
int
ret
=
foo
(
3
,
a
);
16
return
ret
;
17
}