]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/cfi/bad-split.cpp
Vendor import of compiler-rt trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / cfi / bad-split.cpp
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: windows-msvc
5
6 struct Z {
7 };
8
9 struct ZZ : public virtual Z {
10 };
11
12 struct A : public ZZ {
13 };
14
15 struct B : public A {
16 };
17
18 int main() {
19   A* a = new B();
20   B *b = (B*)a;
21 }