summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/vtable-cast-crash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/vtable-cast-crash.cpp')
-rw-r--r--clang/test/CodeGenCXX/vtable-cast-crash.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vtable-cast-crash.cpp b/clang/test/CodeGenCXX/vtable-cast-crash.cpp
new file mode 100644
index 0000000..cc419fd
--- /dev/null
+++ b/clang/test/CodeGenCXX/vtable-cast-crash.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -emit-llvm-only %s
+struct A
+{
+A();
+virtual ~A();
+};
+
+struct B: A
+{
+ B();
+ ~B();
+};
+
+B::B()
+{
+}
+
+B::~B()
+{
+}
+