Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / tsan / virtual_inheritance_compile_bug.cpp
blob69fda3a007dae8fe498032c2c1f8757c3a2bbc3c
1 // Regression test for https://github.com/google/sanitizers/issues/410.
2 // The C++ variant is much more compact that the LLVM IR equivalent.
4 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
5 #include <stdio.h>
6 struct AAA {
7 virtual long aaa() { return 0; }
8 };
9 struct BBB : virtual AAA {
10 unsigned long bbb;
12 struct CCC: virtual AAA { };
13 struct DDD : CCC, BBB {
14 DDD();
16 DDD::DDD() { }
17 int main() {
18 DDD d;
19 fprintf(stderr, "OK\n");
21 // CHECK: OK