[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / use-after-scope-nobug.cpp
blobfeb5f1077d7399f929b8e46f18f35621b12d11e6
1 // This is the ASAN test of the same name ported to HWAsan.
3 // RUN: %clangxx_hwasan -O1 %s -o %t && %run %t
5 // REQUIRES: aarch64-target-arch || riscv64-target-arch
7 #include <stdio.h>
8 #include <stdlib.h>
10 int *p[3];
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;
18 printf("PASSED\n");
19 return 0;