Files
rk35xx-android14/external/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08: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