Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / force_inline_opt0.cpp
blobe6e5d26c7998ecc8555a64ccf7c83ee5d050bb16
1 // This test checks that we are no instrumenting a memory access twice
2 // (before and after inlining)
3 // RUN: %clangxx_asan -O1 %s -o %t && %run %t
4 // RUN: %clangxx_asan -O0 %s -o %t && %run %t
5 __attribute__((always_inline))
6 void foo(int *x) {
7 *x = 0;
10 int main() {
11 int x;
12 foo(&x);
13 return x;