diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp1.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp1.C new file mode 100644 index 00000000000..4c6bac0cdfd --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp1.C @@ -0,0 +1,14 @@ +// Build don't link: + +template class D +{ +}; + +template class D,class E> class C +{ +}; + +int main() +{ + C c; // ERROR - args not match +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp10.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp10.C new file mode 100644 index 00000000000..ca0c9b636e1 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp10.C @@ -0,0 +1,30 @@ +// Build don't link: + +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; // ERROR - D is a template + public: + int f(); +}; + +template class D,class E> int C::f() +{ + return d.f(); // ERROR - d not properly declared +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C new file mode 100644 index 00000000000..213eb40d75f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C @@ -0,0 +1,25 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f() { return d.f(); } +}; + +int main() +{ + C c; + C d; + c.f(); + d.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp12.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp12.C new file mode 100644 index 00000000000..c9bc9f3a909 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp12.C @@ -0,0 +1,28 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class E,class D> class C +{ + E d; + public: + int f(); +}; + +template class E,class D> int C::f() +{ + return d.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp13.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp13.C new file mode 100644 index 00000000000..2745c7acfd2 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp13.C @@ -0,0 +1,28 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f(); +}; + +template class D,class E> int C::f() +{ + return d.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp14.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp14.C new file mode 100644 index 00000000000..3b284ae8700 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp14.C @@ -0,0 +1,30 @@ +template class D +{ + T a; + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class DD = D> class C +{ + DD d; + public: + int f(); +}; + +template class DD = D> int C::f() +{ + DD d2; + return d2.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp15.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp15.C new file mode 100644 index 00000000000..25f3c4d0cf7 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp15.C @@ -0,0 +1,29 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f(); +}; + +template class D,class E> int C::f() +{ + D d2; + return d2.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp16.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp16.C new file mode 100644 index 00000000000..ac736fabd79 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp16.C @@ -0,0 +1,30 @@ +template class D +{ + T a; + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f(); +}; + +template class D,class E> int C::f() +{ + D d2; + return d2.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp17.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp17.C new file mode 100644 index 00000000000..685240490b1 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp17.C @@ -0,0 +1,30 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f(); + int g() { return 0; } +}; + +template class D,class E> int C::f() +{ + C d2; + return d2.g(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp18.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp18.C new file mode 100644 index 00000000000..6c9e579281a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp18.C @@ -0,0 +1,30 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f(); + int g() { return 0; } +}; + +template class D,class E> int C::f() +{ + C d2; + return d2.g(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp19.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp19.C new file mode 100644 index 00000000000..8a249467abd --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp19.C @@ -0,0 +1,24 @@ +#include + +template class D,class E> class C +{ + D d; + public: + int size() { return d.size(); } +}; + +template class D,class E> int size(D &d1) +{ + d1.size(); + C d2; + d2.size(); + return 0; +} + +int main() +{ + std::vector c1; + std::vector c2; + size(c1); + size(c2); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp2.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp2.C new file mode 100644 index 00000000000..5badbe22fe0 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp2.C @@ -0,0 +1,14 @@ +// Build don't link: + +template class D +{ +}; + +template class D,int> class C +{ +}; + +int main() +{ + C<1,D> c; // ERROR - args not match +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp20.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp20.C new file mode 100644 index 00000000000..e3b26c65fc2 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp20.C @@ -0,0 +1,27 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C : D +{ + public: + int g(); +}; + +template class D,class E> int C::g() +{ + return f(); +} + +int main() +{ + C c; + c.g(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp21.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp21.C new file mode 100644 index 00000000000..c6cc24b3d87 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp21.C @@ -0,0 +1,33 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C : D +{ + public: + int g(); +}; + +template class D,class E> int C::g() +{ + return f(); +} + +class E : C +{ + public: + int h() { return g(); } +}; + +int main() +{ + E c; + c.h(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C new file mode 100644 index 00000000000..7eac0ed4261 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C @@ -0,0 +1,33 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class DD,class EE> class C : DD +{ + public: + int f(); +}; + +template class DD,class EE> int C::f() +{ + return DD::f(); +} + +class E : C +{ + public: + int f() { return C::f(); } +}; + +int main() +{ + E c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp23.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp23.C new file mode 100644 index 00000000000..636bb1cae26 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp23.C @@ -0,0 +1,33 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class E,class D> class C : E +{ + public: + int f(); +}; + +template class E,class D> int C::f() +{ + return E::f(); +} + +class E : C +{ + public: + int f() { return C::f(); } +}; + +int main() +{ + E c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C new file mode 100644 index 00000000000..1e6278f6b80 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C @@ -0,0 +1,22 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> int f() +{ + D d; + return d.f(); +}; + +int main() +{ + f(); + f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp25.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp25.C new file mode 100644 index 00000000000..c30905ed4c5 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp25.C @@ -0,0 +1,33 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f() { return d.f(); } +}; + +template class D,class E> int f(D &d1) +{ + d1.f(); + C d2; + d2.f(); + return 0; +} + +int main() +{ + D c1; + D c2; + f(c1); + f(c2); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp26.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp26.C new file mode 100644 index 00000000000..6e6425e99dd --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp26.C @@ -0,0 +1,33 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T)+sizeof(U); +} + +template class D,class E> class C +{ + D d; + public: + int f() { return d.f(); } +}; + +template class D,class E> int f(D &d1) +{ + d1.f(); + C d2; + d2.f(); + return 0; +} + +int main() +{ + D c1; + D c2; + f(c1); + f(c2); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp27.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp27.C new file mode 100644 index 00000000000..7ecf30197b5 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp27.C @@ -0,0 +1,35 @@ +template class D +{ + public: + int f() const; +}; + +template int D::f() const +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f() const { return d.f(); } +}; + +template class D,class E> int f(const D &d1) +{ + d1.f(); + C d2; + d2.f(); + return 0; +} + +int main() +{ + D c1; + D c2; + const D c3(c2); + f(c1); + f(c2); + f(c3); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp28.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp28.C new file mode 100644 index 00000000000..5948dc5d99a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp28.C @@ -0,0 +1,39 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +template class D,class E> class C +{ + D d; + public: + int f() { return d.f(); } +}; + +template class D,class E> int f(D &d1) +{ + d1.f(); + C d2; + d2.f(); + return 0; +} + +template<> int f<>(D &d1) +{ + d1.f(); + return 0; +} + +int main() +{ + D c1; + D c2; + f(c1); + f(c2); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C new file mode 100644 index 00000000000..b431ad0e38c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C @@ -0,0 +1,32 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +extern "C" void abort(); + +template class D,class E> class C +{ + D d; + public: + int f() { abort(); return 0; } +}; + +template class C +{ + D d; + public: + int f() { return d.f(); } +}; + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C new file mode 100644 index 00000000000..db22c6f0c65 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C @@ -0,0 +1,14 @@ +// Build don't link: + +template class D +{ +}; + +template class D,class E> class C +{ // ERROR - ref below +}; + +int main() +{ + C c; // ERROR - param list not match +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp30.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp30.C new file mode 100644 index 00000000000..c47b15758ad --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp30.C @@ -0,0 +1,37 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +extern "C" void abort(); + +template class D,class E> class C +{ + D d; + public: + int f() { abort(); return 0; } +}; + +template class C +{ + D d; + public: + int f(); +}; + +template int C::f() +{ + return d.f(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp31.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp31.C new file mode 100644 index 00000000000..4e1acf20720 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp31.C @@ -0,0 +1,32 @@ +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + return sizeof(T); +} + +extern "C" void abort(); + +template class D,class E> class C +{ + D d; + public: + int f() { abort(); return 0; } +}; + +template