1// GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods.
2// RUN: %clangxx_cfi -o %t1 %s && %run %t1
3
4// UNSUPPORTED: target={{.*windows-msvc.*}}
5
6struct Z {
7};
8
9struct ZZ : public virtual Z {
10};
11
12struct A : public ZZ {
13};
14
15struct B : public A {
16};
17
18int main() {
19 A* a = new B();
20 B *b = (B*)a;
21}
22

source code of compiler-rt/test/cfi/bad-split.cpp