Files
clang-p2996/compiler-rt/test/asan/TestCases/force_inline_opt0.cc
Alexey Samsonov 9f20d67034 Move ASan lit-tests under test/asan
llvm-svn: 201413
2014-02-14 14:06:10 +00:00

15 lines
294 B
C++

// This test checks that we are no instrumenting a memory access twice
// (before and after inlining)
// RUN: %clangxx_asan -O1 %s -o %t && %t
// RUN: %clangxx_asan -O0 %s -o %t && %t
__attribute__((always_inline))
void foo(int *x) {
*x = 0;
}
int main() {
int x;
foo(&x);
return x;
}