summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp')
-rw-r--r--clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp b/clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
new file mode 100644
index 0000000..bd270dd
--- /dev/null
+++ b/clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s
+
+struct A {
+ virtual ~A();
+};
+
+template <typename Ty>
+struct B : public A {
+ ~B () { delete [] val; }
+private:
+ Ty* val;
+};
+
+template <typename Ty>
+struct C : public A {
+ C ();
+ ~C ();
+};
+
+template <typename Ty>
+struct D : public A {
+ D () {}
+ private:
+ B<C<Ty> > blocks;
+};
+
+template class D<double>;