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 sanitizer/65280
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
ubsan
/
bounds-2.c
blob
3e88035b2069cd4827c9a09f13c5ec0a131f37b3
1
/* PR sanitizer/65280 */
2
/* { dg-do run } */
3
/* { dg-options "-fsanitize=bounds" } */
4
5
void
6
foo
(
int
n
,
int
(*
b
)[
n
])
7
{
8
(*
b
)[
n
] =
1
;
9
}
10
11
int
12
main
()
13
{
14
int
a
[
20
];
15
foo
(
3
, (
int
(*)[
3
]) &
a
);
16
}
17
18
/* { dg-output "index 3 out of bounds for type 'int \\\[\\\*\\\]'\[^\n\r]*(\n|\r\n|\r)" } */