2017-03-15 03:33:44 +08:00
|
|
|
// GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods.
|
2017-10-02 18:21:26 +08:00
|
|
|
// RUN: %clangxx_cfi -o %t1 %s && %run %t1
|
2017-03-15 03:33:44 +08:00
|
|
|
|
2017-03-15 04:02:42 +08:00
|
|
|
// UNSUPPORTED: win32
|
|
|
|
|
2017-03-15 03:33:44 +08:00
|
|
|
struct Z {
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ZZ : public virtual Z {
|
|
|
|
};
|
|
|
|
|
|
|
|
struct A : public ZZ {
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B : public A {
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
A* a = new B();
|
|
|
|
B *b = (B*)a;
|
|
|
|
}
|