Mercurial > hg > CbC > CbC_llvm
comparison compiler-rt/test/hwasan/TestCases/global.c @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 1d019706d866 |
children | 5f17cb93ff66 |
comparison
equal
deleted
inserted
replaced
220:42394fc6a535 | 221:79ff65ed7e25 |
---|---|
3 // RUN: not %run %t 1 2>&1 | FileCheck --check-prefixes=CHECK,RSYM %s | 3 // RUN: not %run %t 1 2>&1 | FileCheck --check-prefixes=CHECK,RSYM %s |
4 // RUN: not %env_hwasan_opts=symbolize=0 %run %t 1 2>&1 | FileCheck --check-prefixes=CHECK,RNOSYM %s | 4 // RUN: not %env_hwasan_opts=symbolize=0 %run %t 1 2>&1 | FileCheck --check-prefixes=CHECK,RNOSYM %s |
5 // RUN: not %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LSYM %s | 5 // RUN: not %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LSYM %s |
6 // RUN: not %env_hwasan_opts=symbolize=0 %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LNOSYM %s | 6 // RUN: not %env_hwasan_opts=symbolize=0 %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LNOSYM %s |
7 | 7 |
8 // Global aliasing is not implemented on x86. | |
9 // XFAIL: x86_64 | |
10 | |
8 int x = 1; | 11 int x = 1; |
9 | 12 |
10 int main(int argc, char **argv) { | 13 int main(int argc, char **argv) { |
11 // RSYM: is located 0 bytes to the right of 4-byte global variable x {{.*}} in {{.*}}global.c.tmp | 14 // RSYM: is located 0 bytes to the right of 4-byte global variable x {{.*}} in {{.*}}global.c.tmp |
12 // RNOSYM: is located to the right of a global variable in ({{.*}}global.c.tmp+{{.*}}) | 15 // RNOSYM: is located to the right of a 4-byte global variable in ({{.*}}global.c.tmp+{{.*}}) |
13 // LSYM: is located 4 bytes to the left of 4-byte global variable x {{.*}} in {{.*}}global.c.tmp | 16 // LSYM: is located 4 bytes to the left of 4-byte global variable x {{.*}} in {{.*}}global.c.tmp |
14 // LNOSYM: is located to the left of a global variable in ({{.*}}global.c.tmp+{{.*}}) | 17 // LNOSYM: is located to the left of a 4-byte global variable in ({{.*}}global.c.tmp+{{.*}}) |
15 // CHECK-NOT: can not describe | 18 // CHECK-NOT: can not describe |
16 (&x)[atoi(argv[1])] = 1; | 19 (&x)[atoi(argv[1])] = 1; |
17 } | 20 } |