diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-02-14 14:35:48 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-02-14 14:35:48 +0000 |
commit | e6a6183e9b8ecf7dec8808fa87577d5b574ca22e (patch) | |
tree | a6e5f3181f2e0c4ffc21f9648c5e9c873f34b330 /compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc | |
parent | 9f20d6703479a952465f7db0c2fbd70904c030c2 (diff) | |
download | bcm5719-llvm-e6a6183e9b8ecf7dec8808fa87577d5b574ca22e.tar.gz bcm5719-llvm-e6a6183e9b8ecf7dec8808fa87577d5b574ca22e.zip |
Move TSan lit-tests under test/tsan
llvm-svn: 201414
Diffstat (limited to 'compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc')
-rw-r--r-- | compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc b/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc new file mode 100644 index 00000000000..2275b8b8d21 --- /dev/null +++ b/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc @@ -0,0 +1,15 @@ +// Regression test for http://code.google.com/p/thread-sanitizer/issues/detail?id=3. +// The C++ variant is much more compact that the LLVM IR equivalent. + +// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s +#include <stdio.h> +struct AAA { virtual long aaa () { return 0; } }; // NOLINT +struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT +struct CCC: virtual AAA { }; +struct DDD: CCC, BBB { DDD(); }; // NOLINT +DDD::DDD() { } +int main() { + DDD d; + printf("OK\n"); +} +// CHECK: OK |