llvm-project/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc
Alexey Samsonov e6a6183e9b Move TSan lit-tests under test/tsan
llvm-svn: 201414
2014-02-14 14:35:48 +00:00

16 lines
513 B
C++

// 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