[llvm-commits] [compiler-rt] r159737 - /compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc

Kostya Serebryany kcc at google.com
Thu Jul 5 02:09:40 PDT 2012


Author: kcc
Date: Thu Jul  5 04:09:40 2012
New Revision: 159737

URL: http://llvm.org/viewvc/llvm-project?rev=159737&view=rev
Log:
[tsan] reg test for tsan issue #3

Added:
    compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc

Added: compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc?rev=159737&view=auto
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc (added)
+++ compiler-rt/trunk/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc Thu Jul  5 04:09:40 2012
@@ -0,0 +1,13 @@
+// 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.
+#include <stdio.h>
+struct AAA              {  virtual long aaa () { return 0; } };
+struct BBB: virtual AAA { unsigned long bbb; };
+struct CCC: virtual AAA { };
+struct DDD: CCC, BBB { DDD (); };
+DDD::DDD()  { }
+int main() {
+  DDD d;
+  printf("OK\n");
+}
+// CHECK: OK





More information about the llvm-commits mailing list