[tsan] reg test for tsan issue #3

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159737 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc b/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc
new file mode 100644
index 0000000..fd2febe
--- /dev/null
+++ b/lib/tsan/output_tests/virtual_inheritance_compile_bug.cc
@@ -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