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))
6void foo(int *x) {
7 *x = 0;
8}
9
10int main() {
11 int x;
12 foo(x: &x);
13 return x;
14}
15

source code of compiler-rt/test/asan/TestCases/force_inline_opt0.cpp