From ab0bf875a5f328a6710f4e48258979ae1bc8da1c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:02:53 +0000 Subject: Vendor import of compiler-rt trunk r300422: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300422 --- test/cfi/bad-split.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/cfi/bad-split.cpp (limited to 'test/cfi/bad-split.cpp') diff --git a/test/cfi/bad-split.cpp b/test/cfi/bad-split.cpp new file mode 100644 index 000000000000..53504bd2710b --- /dev/null +++ b/test/cfi/bad-split.cpp @@ -0,0 +1,21 @@ +// GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods. +// RUN: %clangxx_cfi -o %t1 %s && %t1 + +// UNSUPPORTED: win32 + +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; +} -- cgit v1.3