aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/tsan.c
blob: 18b027fbceecee41ab4e49cacb82289fec257eaa (plain) (blame)
1
2
3
4
5
6
7
8
9
// RUN: %clang     -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O1 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O2 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O3 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang     -target i386-unknown-unknown -fsanitize=thread  %s -S -emit-llvm -o - | FileCheck %s
// Verify that -fsanitize=thread invokes tsan instrumentation.

int foo(int *a) { return *a; }
// CHECK: __tsan_init