Sign in
cobalt
/
cobalt
/
25902c6cb1ab9cfd8ae2ee6b0fb52953f73deda5
/
.
/
third_party
/
llvm-project
/
compiler-rt
/
test
/
asan
/
TestCases
/
use-after-scope-nobug.cpp
blob: e401c94672b06080fcf137a54579391abed9b395 [
file
] [
log
] [
blame
]
// RUN: %clangxx_asan -O1 %s -o %t && %run %t
#include
<stdio.h>
#include
<stdlib.h>
int
*
p
[
3
];
int
main
()
{
// Variable goes in and out of scope.
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
int
x
;
p
[
i
]
=
&
x
;
}
printf
(
"PASSED\n"
);
return
0
;
}