blob: 7da581d80601bae620a3d3443856b258941bef89 [file] [log] [blame]
Pirama Arumuga Nainar799172d2016-03-03 15:50:30 -08001// Regression test for https://github.com/google/sanitizers/issues/410.
Stephen Hines2d1fdb22014-05-28 23:58:16 -07002// 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>
6struct AAA { virtual long aaa () { return 0; } }; // NOLINT
7struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT
8struct CCC: virtual AAA { };
9struct DDD: CCC, BBB { DDD(); }; // NOLINT
10DDD::DDD() { }
11int main() {
12 DDD d;
13 printf("OK\n");
14}
15// CHECK: OK