xref: /aosp_15_r20/external/clang/test/Driver/msan.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang     -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
2*67e74705SXin Li // RUN: %clang -O1 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
3*67e74705SXin Li // RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
4*67e74705SXin Li // RUN: %clang -O3 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
5*67e74705SXin Li // RUN: %clang -target mips64-linux-gnu -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
6*67e74705SXin Li // RUN: %clang -target mips64el-unknown-linux-gnu -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
7*67e74705SXin Li // RUN: %clang -target powerpc64-unknown-linux-gnu -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
8*67e74705SXin Li // RUN: %clang -target powerpc64le-unknown-linux-gnu -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s
9*67e74705SXin Li // Verify that -fsanitize=memory invokes msan instrumentation.
10*67e74705SXin Li 
foo(int * a)11*67e74705SXin Li int foo(int *a) { return *a; }
12*67e74705SXin Li // CHECK: __msan_init
13