linux-packaging-mono/external/llvm-project/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc
Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

16 lines
514 B
C++

// Regression test for https://github.com/google/sanitizers/issues/410.
// The C++ variant is much more compact that the LLVM IR equivalent.
// RUN: %clangxx_tsan -O1 %s -o %t && %run %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;
fprintf(stderr, "OK\n");
}
// CHECK: OK