xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm -o - %s
3f4a2713aSLionel Sambuc 
4f4a2713aSLionel Sambuc struct A {
5f4a2713aSLionel Sambuc    virtual ~A();
6f4a2713aSLionel Sambuc };
7f4a2713aSLionel Sambuc 
8f4a2713aSLionel Sambuc template <typename Ty>
9f4a2713aSLionel Sambuc struct B : public A {
~BB10f4a2713aSLionel Sambuc    ~B () { delete [] val; }
11f4a2713aSLionel Sambuc private:
12f4a2713aSLionel Sambuc      Ty* val;
13f4a2713aSLionel Sambuc };
14f4a2713aSLionel Sambuc 
15f4a2713aSLionel Sambuc template <typename Ty>
16f4a2713aSLionel Sambuc struct C : public A {
17f4a2713aSLionel Sambuc    C ();
18f4a2713aSLionel Sambuc    ~C ();
19f4a2713aSLionel Sambuc };
20f4a2713aSLionel Sambuc 
21f4a2713aSLionel Sambuc template <typename Ty>
22f4a2713aSLionel Sambuc struct D : public A {
DD23f4a2713aSLionel Sambuc      D () {}
24f4a2713aSLionel Sambuc    private:
25f4a2713aSLionel Sambuc      B<C<Ty> > blocks;
26f4a2713aSLionel Sambuc };
27f4a2713aSLionel Sambuc 
28f4a2713aSLionel Sambuc template class D<double>;
29