repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git]
/
compiler-rt
/
test
/
hwasan
/
TestCases
/
use-after-scope-nobug.cpp
blob
feb5f1077d7399f929b8e46f18f35621b12d11e6
1
// This is the ASAN test of the same name ported to HWAsan.
2
3
// RUN: %clangxx_hwasan -O1 %s -o %t && %run %t
4
5
// REQUIRES: aarch64-target-arch || riscv64-target-arch
6
7
#include <stdio.h>
8
#include <stdlib.h>
9
10
int
*
p
[
3
];
11
12
int
main
() {
13
// Variable goes in and out of scope.
14
for
(
int
i
=
0
;
i
<
3
;
i
++) {
15
int
x
;
16
p
[
i
] = &
x
;
17
}
18
printf
(
"PASSED
\n
"
);
19
return
0
;
20
}