[llvm-commits] [compiler-rt] r166103 - /compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc

Kostya Serebryany kcc at google.com
Wed Oct 17 06:42:04 PDT 2012


Author: kcc
Date: Wed Oct 17 08:42:04 2012
New Revision: 166103

URL: http://llvm.org/viewvc/llvm-project?rev=166103&view=rev
Log:
[asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails)

Added:
    compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc

Added: compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc?rev=166103&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc (added)
+++ compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc Wed Oct 17 08:42:04 2012
@@ -0,0 +1,14 @@
+// This test checks that we are no instrumenting a memory access twice
+// (before and after inlining)
+// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t
+// FIXME (enable this line): %clangxx_asan -m64 -O0 %s -o %t && %t
+__attribute__((always_inline))
+void foo(int *x) {
+  *x = 0;
+}
+
+int main() {
+  int x;
+  foo(&x);
+  return x;
+}





More information about the llvm-commits mailing list