[X86] Add reduced test case for #114360
[llvm-project.git] / clang / test / Driver / memtag-ld.c
blobaef08ddc5758a68dd3cecf71edd3e73cf07edc48
1 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
2 // RUN: -fsanitize=memtag %s 2>&1 | FileCheck %s \
3 // RUN: --check-prefixes=CHECK-SYNC,CHECK-HEAP,CHECK-STACK
5 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
6 // RUN: -fsanitize=memtag-stack %s 2>&1 | FileCheck %s \
7 // RUN: --check-prefixes=CHECK-SYNC,CHECK-NO-HEAP,CHECK-STACK
9 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
10 // RUN: -fsanitize=memtag-heap %s 2>&1 | FileCheck %s \
11 // RUN: --check-prefixes=CHECK-SYNC,CHECK-HEAP,CHECK-NO-STACK
13 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
14 // RUN: -fsanitize=memtag -fsanitize-memtag-mode=async %s 2>&1 | \
15 // RUN: FileCheck %s --check-prefixes=CHECK-ASYNC,CHECK-HEAP,CHECK-STACK
17 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
18 // RUN: -fsanitize=memtag-stack -fsanitize-memtag-mode=async %s 2>&1 \
19 // RUN: | FileCheck %s \
20 // RUN: --check-prefixes=CHECK-ASYNC,CHECK-NO-HEAP,CHECK-STACK
22 // RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \
23 // RUN: -fsanitize=memtag-heap -fsanitize-memtag-mode=async %s 2>&1 \
24 // RUN: | FileCheck %s \
25 // RUN: --check-prefixes=CHECK-ASYNC,CHECK-HEAP,CHECK-NO-STACK
27 // RUN: not %clang -### --target=aarch64-linux-android -march=armv8+memtag \
28 // RUN: -fsanitize=memtag-heap -fsanitize-memtag-mode=asymm %s 2>&1 \
29 // RUN: | FileCheck %s --check-prefixes=CHECK-INVALID-MODE
31 // RUN: not %clang -### --target=aarch64-linux-android -march=armv8+memtag \
32 // RUN: -fsanitize=memtag-stack -fsanitize=memtag-heap \
33 // RUN: -fsanitize-memtag-mode=asymm -fno-sanitize=memtag %s 2>&1 \
34 // RUN: | FileCheck %s --check-prefixes=CHECK-NONE
36 // CHECK-ASYNC: ld{{.*}} "--android-memtag-mode=async"
37 // CHECK-SYNC: ld{{.*}} "--android-memtag-mode=sync"
38 // CHECK-HEAP: "--android-memtag-heap"
39 // CHECK-NO-HEAP-NOT: "--android-memtag-heap"
40 // CHECK-STACK: "--android-memtag-stack"
41 // CHECK-NO-STACK-NOT: "--android-memtag-stack"
42 // CHECK-INVALID-MODE: invalid value 'asymm' in '-fsanitize-memtag-mode=',
43 // CHECK-INVALID-MODE-SAME: expected one of: {async, sync}
44 // CHECK-NONE-NOT: ld{{.*}} "--android-memtag
46 void f() {}