| 1 | // Regression test for https://github.com/google/sanitizers/issues/410. |
| 2 | // The C++ variant is much more compact that the LLVM IR equivalent. |
| 3 | |
| 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; |
| 11 | }; |
| 12 | struct CCC: virtual AAA { }; |
| 13 | struct DDD : CCC, BBB { |
| 14 | DDD(); |
| 15 | }; |
| 16 | DDD::DDD() { } |
| 17 | int main() { |
| 18 | DDD d; |
| 19 | fprintf(stderr, format: "OK\n" ); |
| 20 | } |
| 21 | // CHECK: OK |
| 22 | |