2015-11-30 22:11:48 +08:00
|
|
|
// Regression test for https://github.com/google/sanitizers/issues/410.
|
2012-07-05 17:09:40 +08:00
|
|
|
// The C++ variant is much more compact that the LLVM IR equivalent.
|
2012-09-18 15:23:54 +08:00
|
|
|
|
2014-05-01 05:34:17 +08:00
|
|
|
// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
|
2012-07-05 17:09:40 +08:00
|
|
|
#include <stdio.h>
|
2012-08-30 22:22:21 +08:00
|
|
|
struct AAA { virtual long aaa () { return 0; } }; // NOLINT
|
|
|
|
struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT
|
2012-07-05 17:09:40 +08:00
|
|
|
struct CCC: virtual AAA { };
|
2012-08-30 22:22:21 +08:00
|
|
|
struct DDD: CCC, BBB { DDD(); }; // NOLINT
|
2012-07-05 17:09:40 +08:00
|
|
|
DDD::DDD() { }
|
|
|
|
int main() {
|
|
|
|
DDD d;
|
2016-04-15 20:34:00 +08:00
|
|
|
fprintf(stderr, "OK\n");
|
2012-07-05 17:09:40 +08:00
|
|
|
}
|
|
|
|
// CHECK: OK
|