diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt')
512 files changed, 0 insertions, 10035 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/alignof.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/alignof.C deleted file mode 100755 index 0cfeed4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/alignof.C +++ /dev/null @@ -1,21 +0,0 @@ -extern "C" void abort(); - -struct S -{ - char c; - double d; -}; - - -template <class T> -void foo(T) -{ - if (__alignof__(T) != __alignof__(S)) - abort(); -} - - -int main() -{ - foo(S()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/array1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/array1.C deleted file mode 100755 index 669600f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/array1.C +++ /dev/null @@ -1,10 +0,0 @@ -template <class T, unsigned N> - unsigned size(T (&)[N]) { return N; } -template <class T, unsigned N> - unsigned size(T const (&)[N]) { return N; } - -int main() { - short iarray[] = { 1, 2, 3, 4, 5 }; - const short carray[] = { 1, 2, 3, 4, 5 }; - return size(iarray) - size(carray); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/array2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/array2.C deleted file mode 100755 index 6c5810e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/array2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template<int N, class C> -class Bar {}; - -template<class C> -class Huh {}; - -template<int N> -void foo(const Bar<N,Huh<float[1]> > &x) {} - -int main() { - foo(Bar<3,Huh<float[1]> >()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/array3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/array3.C deleted file mode 100755 index ec5e1e0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/array3.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// Origin: Brendan Kehoe <brendan@cygnus.com> - - template <int x> int foo(char[4][x]) { return x; } - int (*bar)(char[4][3]) = &foo; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/auto_ptr.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/auto_ptr.C deleted file mode 100755 index dd5b988..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/auto_ptr.C +++ /dev/null @@ -1,54 +0,0 @@ -template <typename Y> struct auto_ptr_ref { - Y* py; - auto_ptr_ref(Y* p) : py(p) {} -}; -template<typename X> struct auto_ptr { - X* px; - public: - typedef X element_type; - - explicit auto_ptr(X* p =0) throw() : px(p) {} - auto_ptr(auto_ptr& r) throw() : px(r.release()) {} - template<typename Y> - auto_ptr(auto_ptr<Y>& r) throw() : px(r.release()) {} - - auto_ptr& operator=(auto_ptr& r) throw() { - reset(r.release()); - return *this; - } - template<typename Y> auto_ptr& operator=(auto_ptr<Y>& r) throw() { - reset(r.release()); - return *this; - } - - ~auto_ptr() { delete px; } - - X& operator*() const throw() { return *px; } - X* operator->() const throw() { return px; } - X* get() const throw() { return px; } - X* release() throw() { X* p=px; px=0; return p; } - void reset(X* p=0) throw() { if (px != p) delete px, px = p; } - - auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} - template<typename Y> operator auto_ptr_ref<Y>() throw() { - return auto_ptr_ref<Y>(release()); - } - template<typename Y> operator auto_ptr<Y>() throw() { - return auto_ptr<Y>(release()); - } -}; - -struct Base { Base() {} virtual ~Base() {} }; -struct Derived : Base { Derived() {}; }; - -auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; } -void g(auto_ptr<Derived>) { } -void h(auto_ptr<Base>) { } - -int main() { - auto_ptr<Base> x(f()); - auto_ptr<Derived> y(f()); - x = y; - g(f()); - h(f()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/bad-type.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/bad-type.C deleted file mode 100755 index 6b22b86..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/bad-type.C +++ /dev/null @@ -1,19 +0,0 @@ -template<class Type> -class A -{ -public: - Type m; -}; - -template<class Type> -void f(A<Type>& a, Type d) -{ - A.m=d; // ERROR - invalid use of template -} - -int main() -{ - A<int> a; - f(a,2); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/call1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/call1.C deleted file mode 100755 index b9836bb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/call1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -struct IsCompressed { }; -struct Field { - bool IsCompressed() const { return true; } -}; - -template<class C> -inline bool -for_each(const Field& p, IsCompressed, C) -{ - return p.IsCompressed(); -} - -template bool for_each<int>(const Field& p, IsCompressed, int); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/call2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/call2.C deleted file mode 100755 index 51b2469..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/call2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct IsCompressed { }; -struct Field { -}; - -template<class C> -inline bool -for_each(const Field& p, IsCompressed, C) -{ - return p.IsCompressed(); // ERROR - calling type like a method -} - -template bool for_each<int>(const Field& p, IsCompressed, int); // ERROR - instantiated from here diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/const1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/const1.C deleted file mode 100755 index 8ac8a51..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/const1.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -template <class T> struct B { static const int i = 3; }; -template <class T> struct A { static const int i = B<T>::i; }; -enum { i = A<int>::i }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/conv1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/conv1.C deleted file mode 100755 index 19e433e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/conv1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 {}; - -struct S2 -{ - template <class T> - operator S1<T>*(); -}; - -struct D: public S1<int> { -}; - -void f() -{ - S2 s; - (D*) s; // ERROR - cannot convert -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/conv2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/conv2.C deleted file mode 100755 index f3e0b35..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/conv2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template<class T> -class A { -public: - operator const T*() const; - const T* cast() const; -}; - -template<class T> -const T* A<T>::cast() const { - return operator const T*(); -} - -template class A<char>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/copy1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/copy1.C deleted file mode 100755 index 7981530..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/copy1.C +++ /dev/null @@ -1,29 +0,0 @@ -int i = 0; - -template <class T> -class F -{ -public: - F() {} - - template <class T2> F(F<T2>) - { - i = 1; - } -}; - - -F<int> -foo() -{ - F<int> f1; - F<int> f2(f1); - return f1; -} - -int -main() -{ - return i; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash1.C deleted file mode 100755 index 3d3dd5e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash1.C +++ /dev/null @@ -1,11 +0,0 @@ -template<class T> class A { - public: - class subA {}; -}; - - -template<class T> class B : public A<T> { - public: - class subB : public A::subA {}; // ERROR - not a class or namespace -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash10.C deleted file mode 100755 index 033e234..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash10.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template<int M, int N> -class GCD { -public: - enum { val = (N == 0) ? M : GCD<N, M % N>::val }; -}; - -int main() { - GCD< 1, 0 >::val; // ERROR - division -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash11.C deleted file mode 100755 index 30c72a6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash11.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -class A -{ - class A_impl; - public: - A(){} -}; - - -template <class j> class A::A_impl -{ // ERROR - does not declare a template -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash12.C deleted file mode 100755 index ade8139..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash12.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// Special g++ Options: -g - -template <class C> -class CenteringTag { -}; - -struct S { - template <class B, class C> - static void f() { - CenteringTag<C> ctag; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash13.C deleted file mode 100755 index f3de38e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash13.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class T> struct A {}; -template <class T> struct A<T>; // ERROR - does not specialize args -template <class T> const struct A; // ERROR - parse error -template <class T> template A<int>; // ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash14.C deleted file mode 100755 index f698316..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash14.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -template <class T> struct A {}; -template <class T> struct A<T*>; -A<int*> ai; // ERROR - incomplete type diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash15.C deleted file mode 100755 index 75b1054..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash15.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T> -template <class U> -struct A { // ERROR - too many template parameter lists -public: - A() {} - - A(const A<T>& b) {} // ERROR - invalid use of template -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash16.C deleted file mode 100755 index ed12b90..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash16.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// Special g++ Options: - -extern "C" void qsort(); - -struct R { - int count; - int state1; - int state2; -}; - -int cmp_d(const R* a, const R* b) { - return a->count > b->count; -} - -namespace CXX { - template<class T, int i1, int i2> - inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) { - ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp); - } -} - -using namespace CXX; - -void sort_machine() { - struct R d[256][256]; - qsort<R,256> (d, cmp_d); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash17.C deleted file mode 100755 index c4dd969..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash17.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <int B> -class foo; - -template <class U> -class bar -{ - typedef foo<(U::id > 0)> foobar; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash18.C deleted file mode 100755 index b12c702..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash18.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't run: - -template<class T> -class foo { - T deft; - - template<class U> int priv (U u, T t) { return u - t; } -public: - foo (T t) : deft (t) {} - - template<class U> int pub (U u) { - int (foo::*fn) (U, T); - fn = &foo<T>::template priv<U>; - return (this->*fn) (u, deft); - } -}; - -int -main () -{ - foo<long> fff (5); - return fff.pub (3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash19.C deleted file mode 100755 index 2da6dd9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash19.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -template <int I> -void f() -{ - class C { public: int c; }; - - struct S { - void g() { - C e; - e.c = 3; - }; - }; - - S s; - s.g(); -} - -template void f<7>(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash2.C deleted file mode 100755 index 3b900c7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 -{ - T* t; - static int foo; -}; - - -struct S2 : public S1<S2> -{ - S2* s; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C deleted file mode 100755 index 29b4281..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class T = int> -struct A { const T x; A() : x(0) { } A(T x) : x(x) { } }; - -template <class B> -void func () { B y; y = B(); } // ERROR - can't use default assignment - -int main (void) { func< A<> >(); } // ERROR - instantiated from here diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash21.C deleted file mode 100755 index c84809b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash21.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: -// Special g++ Options: - -class Pooled -{ -}; - -class RefCounted -{ -}; - -class BrickExpressionBase : public RefCounted, public Pooled -{ -}; - -template<unsigned Dim, class LHS, class RHS, class OP> -class BrickExpression : public BrickExpressionBase -{ -}; - -template <unsigned Dim, class T> -void f() -{ - typedef BrickExpression<Dim, T, T, T> ExprT; - ExprT(3).apply; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash22.C deleted file mode 100755 index e947ef3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash22.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 {}; - -template <class T, class U = S1<T> > -struct S2 {}; - -template struct S2<100>; // ERROR - type/value mismatch diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash23.C deleted file mode 100755 index ac4fae0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash23.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class A, class B> void foo(); -template <class C> class bar { -public: - int i; - template <class B> friend void foo<C,B>(); // ERROR - template-id -}; -template <class A, class B> void foo() { - bar<A> baz; baz.i = 1; - bar<int> buz; buz.i = 1; -} -int main() { - foo<void,void>(); - foo<int,void>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash24.C deleted file mode 100755 index 9c31af6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash24.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template<typename T, template <class> class U> void template_fn (T); -template<typename T> void callme ( void (*)(T)); - -template<typename T> struct S1; - -int main() -{ - callme(&template_fn<double, S1>); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash25.C deleted file mode 100755 index f587585..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash25.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -template <class T> -void f() -{ - int i[1 << 3]; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash26.C deleted file mode 100755 index d2101bd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash26.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Origin: Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> - -double f(double); -typedef double (*M)(double); - -class A { -public: - template <const M n> void g(); -}; - -class B: public A { -public: - void g() { A::g<f>(); } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash27.C deleted file mode 100755 index f52f1ba..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash27.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -template<int i> int f (void) -{ - if (__extension__ ({ 1; })) - return 0; - return 1; -} - -void g (void) -{ - f<1> (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash28.C deleted file mode 100755 index 752c970..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash28.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class ARRY> -inline unsigned int asize(ARRY &a) -{ - return sizeof(a) / sizeof(a[0]); -} - -int f(unsigned int n) { - int x[n]; - - asize(x); // ERROR - no matching function -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash3.C deleted file mode 100755 index 0d2a7cd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash3.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class Type> -class CVector { -public: - CVector<int> f() const - { - CVector<int> v(n); - return v; - } - CVector<long> g() const - { - CVector<long> v(n); - return v; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash4.C deleted file mode 100755 index 510d4cd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash4.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template <unsigned rank> -class Tensor -{ -}; - -template <unsigned rank> -class Tensor<2> : Tensor<rank> { // ERROR - template parameters not used -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash5.C deleted file mode 100755 index 786cdf2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash5.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T, int i> -struct K { - void f(); -}; - -template <class T> -void -K<T, i>::f() -{ // ERROR - template parameters -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C deleted file mode 100755 index 09e8df0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -template <class T> class List; - -template <class T> -struct ListIterator -{ - ListIterator (); - ListIterator (const ListIterator<T>& rhs); -}; - -template <class T> -struct List -{ - void length () const { - for (ListIterator<T> li; li; ); // ERROR - used where a `bool' - } -}; - -void test(List<int>& vals) -{ - vals.length(); // ERROR - instantiated from here -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash7.C deleted file mode 100755 index 9ee7b2c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash7.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -class foo -{ -}; - -template <class T : public foo> // ERROR - base clause -struct bar -{ -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash8.C deleted file mode 100755 index deff42d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash8.C +++ /dev/null @@ -1,34 +0,0 @@ -// Build don't link: - -template<class T> -class TestClass1 { -public: - TestClass1() { } -}; - -template<class T> -class TestClass2 { -public: - TestClass2() { } - T operator()(int) { } -}; - -template<class T> -void doit(T x) { - TestClass1<T> q1; - q1 = TestClass1<T>(); - TestClass2<T> q2; - q2 = TestClass2<T>(); - - TestClass1<T> p1; - p1 = TestClass1(); // ERROR - template used as expression - - TestClass2<T> p2; - p2 = TestClass2(); // ERROR - template used as expression -} - -int main() { - double x; - doit(x); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash9.C deleted file mode 100755 index 297b8ac..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash9.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template <class T> -void f(T) {} // ERROR - parameter has incomplete type - -class C; - -void g(const C& c) -{ - f(c); // ERROR - invalid use of undefined type -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ctor1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ctor1.C deleted file mode 100755 index 9e36706..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ctor1.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <typename _CharT> - struct moneypunct -{ - moneypunct (); -}; - -template <> - moneypunct<char>::moneypunct (); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/decl1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/decl1.C deleted file mode 100755 index 5814251..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/decl1.C +++ /dev/null @@ -1,19 +0,0 @@ -struct S { - template <class T> - int f(T), g(T); // ERROR - more than one declarator -}; - -template <class T> -void x(T), y(T); // ERROR - more than one declarator - -template <class T> -struct S2 -{ - static int i, j; // OK. -}; - -template <class T> -int S2<T>::i, S2<T>::j; // ERROR - more than one declarator - -template <> -int S2<int>::i, S2<double>::i; // ERROR - more than one declarator diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/decl2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/decl2.C deleted file mode 100755 index 2e2b91c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/decl2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -// Simplified from testcase by Christophe Boyanique <boyan@imac.u-paris2.fr> - -// crash test - XFAIL *-*-* - -template <class T> struct foo { foo(); }; -template<class T> foo<T>::foo() {} -T // ERROR - currently an ICE diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg.C deleted file mode 100755 index 314339d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg.C +++ /dev/null @@ -1,10 +0,0 @@ -template <class T> -void f(T t, int i = 10); - -template <class T> -void f(T t, int i) {} - -int main() -{ - f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg2.C deleted file mode 100755 index 444ecc4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg2.C +++ /dev/null @@ -1,17 +0,0 @@ -template <int S=0, class T=int> -struct X -{}; - -template <> -struct X<0,int> -{}; - -template <int S> -struct X<S,int> -: X<> -{}; - -int main() -{ - X<1,int> x; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg3.C deleted file mode 100755 index 9a7e046..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg3.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T> -struct S; - -template <class T = int> -struct S {}; - -template <class T> -struct S; - -void f() -{ - S<> s; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg4.C deleted file mode 100755 index 9d5df8c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg4.C +++ /dev/null @@ -1,32 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 -{ - void foo(T = t()); - - static T t(); -}; - - -template <class T> -struct S2 -{ - void bar(); -}; - - -template <class T> -void S2<T>::bar () -{ - S1<T> st; - st.foo(); -} - - -int main() -{ - S2<int> s2i; - s2i.bar(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg5.C deleted file mode 100755 index 6a68bad..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg5.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -template <int dim> -class Point { - public: - Point (Point<dim> &); - Point<dim> & operator = (Point<dim> &); -}; - - - -template <int dim> -class bar{ - public: - void foo (Point<dim> p = Point<dim>()); -}; - - - -template <> -void bar<2>::foo (Point<2> p) { - const int dim = 2; - Point<dim> q = p; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg6.C deleted file mode 100755 index 0094c5c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg6.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -template <class T> -struct C { - template <class U> - void f(U); // OK - - template <class V = int> - struct I {}; // OK - - template <class W = int> - void h(W); // ERROR - default argument - - template <class Y> - void k(Y); -}; - -template <class T> -template <class U = double> -void C<T>::f(U) {} // ERROR - default argument - -template <class X = void*> -void g(X); // ERROR - default argument - -template <class T = double> -template <class Y> -void C<T>::k(Y) {} // ERROR - default argument diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg7.C deleted file mode 100755 index 0db043f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg7.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template <int Dim, class T, class EngineTag> -class Engine {}; - -struct Brick; - -template<int Dim, class T = double , class EngineTag = Brick > -struct ConstArray { - static const int dimensions = Engine<Dim, T, EngineTag>::dimensions; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg8.C deleted file mode 100755 index 6bb1125..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/defarg8.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -// Default arguments containing more than one non-nested explicit -// template argument leads to parse error - -template <class T> class foo1; -template <class T, class U> class foo2; - -struct bar { - template <class T, class U> - bar(int i = foo1<T>::baz, // ok - int j = int(foo2<T, U>::baz), // ok - int k = foo2<T, U>::baz) {} // gets bogus error - before > - XFAIL *-*-* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/derived1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/derived1.C deleted file mode 100755 index e2275f4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/derived1.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -class A -{ -public: - typedef int Info; -}; - -template <class T> -class B : public A -{ -public: - typedef struct{ - int a; - int b; - } Info; -}; - -void f() -{ - B<A>::Info ie; - ie.a=1; - ie.b=2; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01.C deleted file mode 100755 index 154587b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't run: - -/* - - -*/ - - -template <class X> class TC { -public: - X aaa; - static X sss; - TC(X a) { aaa = a; } - TC(X a, X s) { aaa = a; sss = s; } - void sz(X s) { sss = s; } -}; - -float TC<float>::sss; -long TC<long>::sss; - -TC<long> xjj(1,2); - -int main(int,char*) { - TC<float> xff(9.9,3.14); - xjj.sz(123); - xff.sz(2.71828); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01a.C deleted file mode 100755 index 1a37eeb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01a.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class X> class TC { -public: - X aaa; - static X sss; - TC(X a) {aaa = a; } - TC(X a, X s) {aaa = a; sss = s; } - void sz(X s) { sss = s; } -}; - - -long TC<long>::sss; -float TC<float>::sss; - -TC<long> xjj(1,2); - -int main(int,char*) { - TC<float> xff(9.9,3.14); - xjj.sz(123); - xff.sz(2.71828); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01b.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01b.C deleted file mode 100755 index 51bb447..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/eichin01b.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class X> class TC { -public: - X aaa; - static X sss; - TC(X a) {aaa = a; } - TC(X a, X s) {aaa = a; sss = s; } - void sz(X s) { sss = s; } - void syy(X syarg) { sss = syarg; } -}; - -long TC<long>::sss; -float TC<float>::sss; - -TC<long> xjj(1,2); - -int main(int,char*) { - TC<float> xff(9.9,3.14); - xjj.sz(123); - xff.sz(2.71828); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum.C deleted file mode 100755 index 4fe84a4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed enums -template<class T> -struct templ -{ - enum { val = 0 }; -}; -struct Foo -{ - enum { - bar = 0, - len = templ<int>::val - }; -}; -void func() -{ - int s = Foo::bar; // Ensure that expansion of templ did not erase bar -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum10.C deleted file mode 100755 index 713c11c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum10.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T> -struct S { - enum E { a = (int) T::b }; -}; - -struct S2 { - enum E2 { b }; -}; - -template class S<S2>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum11.C deleted file mode 100755 index 77631c4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum11.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T> void f1() -{ - struct foo { enum T2 { - un, du, toi }; - }; -} - -void f2() { f1<int>(); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum12.C deleted file mode 100755 index b1c2b16..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum12.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <int I> -struct S1 { }; - -template <class T> -struct S2 { - enum { x = 3 }; - - void f(S1<x>&); -}; - -template <class T> -void S2<T>::f(S1<x>&) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum2.C deleted file mode 100755 index 5a2d7f3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum2.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -struct U { - static int STATIC; -}; - -template <int* x> class FOO { -public: - enum { n = 0 }; -}; - -template <class A> class BAR { -public: - enum { n = FOO<&A::STATIC>::n }; -}; - -int n = BAR<U>::n; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum3.C deleted file mode 100755 index d39da3a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum3.C +++ /dev/null @@ -1,14 +0,0 @@ -struct S { enum en { s0, s1, s2 }; }; - -template<typename S::en e> -int val( ) -{ - return e; -} - - -int main() -{ - return val<S::s0>( ); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum4.C deleted file mode 100755 index 28f4b29..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum4.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T> -struct U -{ - T mT; -}; - -template <class H> -struct M -{ - enum FLAG {On, Off}; - U<FLAG> mUF; -}; - -M<char> gm; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum5.C deleted file mode 100755 index fc88afa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum5.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: - -template <> -enum E {e}; // ERROR - template declaration of enum XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum6.C deleted file mode 100755 index acfd681..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum6.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template <class T> -struct vector {}; - -template<class T> -void fn(T) -{ - enum tern { H, L, X, U }; - - vector<tern> ternvec; // ERROR - composed from a local type -} - -template void fn(int); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum7.C deleted file mode 100755 index 47dcbfa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum7.C +++ /dev/null @@ -1,27 +0,0 @@ -template <int I> -int f() -{ - enum E { a = I }; - - struct S { - int g() { - E e; - e = a; - return (int) e; - }; - }; - - S s; - - return s.g(); -} - - -int main() -{ - if (f<7>() != 7) - return 1; - if (f<-3>() != -3) - return 1; - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum8.C deleted file mode 100755 index e5cc58a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum8.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <int I> -void f(); - -template <> -void f<4>() {} - -template <class T> -struct S -{ - enum E { a = 1, b = a + 3 }; -}; - -int main() -{ - f<S<int>::b>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/enum9.C deleted file mode 100755 index 5ab8e8b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/enum9.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -template <typename _CharT> -class _Format_cache -{ -public: - enum { - _S_digits, _S_digits_end = _S_digits+10, - _S_xdigits = _S_digits_end - }; -}; - -template class _Format_cache<int>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit1.C deleted file mode 100755 index 0daf54f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit1.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t) {} - -void bar() -{ - &foo<double>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit10.C deleted file mode 100755 index d90b8d0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit10.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t); - -int main() -{ - foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit11.C deleted file mode 100755 index fb7834f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit11.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t); - -template <class T> -struct S {}; - -int main() -{ - S<int> si; - - foo<S<int> >(si); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit12.C deleted file mode 100755 index 0defb19..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit12.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class U> -struct S -{ - template <class T> - void foo(T t); -}; - - -template <> -template <> -void S<char*>::foo<int>(int) {} - -int main() -{ - S<char*> s; - s.template foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit13.C deleted file mode 100755 index fbb7901..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit13.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: -// GROUPS passed templates - -template <class U> -struct S -{ - template <class T> - void foo(T t); - - template <class T> - void bar(T t) { this->template foo<U>(3.74); } -}; - -template <> -template <> -void S<int>::foo(int) { } - -int main() -{ - S<int> s; - s.bar(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit14.C deleted file mode 100755 index aa9d03f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit14.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -struct S -{ - template <class U> - typename U::R foo(U u); -}; - - -void bar() -{ - S<int> si; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C deleted file mode 100755 index 290da42..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<int N_rank> -class Array; - - -template<class T> -class ArraySectionInfo { -public: - enum { rank = 0 }; -}; - - -template<class T1> -class SliceInfo { -public: - enum { - rank = ArraySectionInfo<T1>::rank - }; - - typedef Array<rank> T_slice; -}; - -template<class T2> -typename SliceInfo<T2>::T_slice -foo(T2 r2) -{ - return SliceInfo<T2>::T_slice(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit16.C deleted file mode 100755 index c7a8733..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit16.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<int N_rank> -class Array; - - -template<class T> -class ArraySectionInfo { -public: - enum { rank = 0 }; -}; - - -template<class T1> -class SliceInfo { -public: - static const int rank = ArraySectionInfo<T1>::rank; - - typedef Array<rank> T_slice; -}; - -template<class T2> -typename SliceInfo<T2>::T_slice -foo(T2 r2) -{ - return SliceInfo<T2>::T_slice(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit17.C deleted file mode 100755 index 8e8688d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit17.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T, class U> -void foo(U u, T t); - -template <class T> -void foo(T t); - -template <class T> -struct S {}; - -template <class T> -void foo(const S<T>&); - -void bar() -{ - void (*fn)(double, int) = - (void (*)(double, int)) &foo<int>; - void (*fn2)(double) = foo<double>; - foo<int>(3, 3.0); - foo<int>(S<int>()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit18.C deleted file mode 100755 index 20c4b75..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit18.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t) { return 0; } - -int foo(int i); - -int main() -{ - return foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit19.C deleted file mode 100755 index b209bbe..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit19.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t); - -template <> -int foo<int>(int i) { return 0; } - -int main() -{ - return foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit2.C deleted file mode 100755 index 4d88c39..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t) {} - -void bar() -{ - (void (*)(int)) &foo<double>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit20.C deleted file mode 100755 index 918ff3a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit20.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -T foo(T t); - -template <> -int foo<char>(char c); // ERROR - does not match any template declaration diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit21.C deleted file mode 100755 index a99a49b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit21.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -T foo(T* t); - -template <> -int foo<char>(char c); // ERROR - does not match declaration. - -template <> -int bar<char>(); // ERROR - no template bar. diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit22.C deleted file mode 100755 index 2cb2338..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit22.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T, class U> -T foo(T t, U* u); // ERROR - template candidate - -template <class T> -T foo(T t, T* t); // ERROR - template candidate - -template <> -int foo<int>(int, int*); // ERROR - ambiguous template specialization diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit23.C deleted file mode 100755 index cdffb15..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit23.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t) { return 1; } - -template <> -int foo<int>(int i) { return 0; } - -int main() -{ - return foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit24.C deleted file mode 100755 index 42f4c3c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit24.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -int foo(T t); - -int foo<int>(int i) { return 0; } // ERROR - missing template <> - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit25.C deleted file mode 100755 index 0225216..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit25.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <int I> -class S {}; - -template <int I, class T> -void foo(T t, S<I>); - -void bar() -{ - S<3> s3; - foo<3>("abc", s3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit26.C deleted file mode 100755 index eba8d79..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit26.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t) { return 1; } - -template <> -int foo(int i) { return 0; } - -int main() -{ - &foo<int>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit27.C deleted file mode 100755 index 4a5adb5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit27.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -void foo(T t); - -template <> -void foo(int i) {} - -int main() -{ - &foo<int>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit28.C deleted file mode 100755 index b842b89..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit28.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t) { return 1; } - -template <> -int foo(int i) { return 0; } - -int main() -{ - return (*&foo<int>)(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit29.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit29.C deleted file mode 100755 index a247779..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit29.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T) { return 0; } - -int foo(int); - -int main() -{ - return foo<int>(3); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit3.C deleted file mode 100755 index 2a5309f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit3.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T, class U> -void foo(T t, U u) {} - -void bar() -{ - (void (*)(double, int)) &foo<double>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit30.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit30.C deleted file mode 100755 index 5a69713..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit30.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T, T*); - - -void bar() -{ - double d; - (*((void (*)(int, double*)) &foo<int>))(3, &d); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit31.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit31.C deleted file mode 100755 index 61190f7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit31.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -struct S -{ - template <class U> - static double foo(U u) { return (double) u; } -}; - - -int main() -{ - double d = S<int>::template foo<char>(3.3); - - return (d >= 3.1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit32.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit32.C deleted file mode 100755 index 5942fe7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit32.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -struct S -{ -}; - - -template <> -struct S<int> -{ - void foo(); -}; - - -void S<int>::foo() -{ -} - - -void bar() -{ - S<int> si; - si.foo(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit33.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit33.C deleted file mode 100755 index 048a356..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit33.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t); - -template <> -void foo(int) {}; - -void foo(int) {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit34.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit34.C deleted file mode 100755 index 0aede38..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit34.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t); - -template <> -void foo(int) {}; // ERROR - previously defined here. - -template <> -void foo<int>(int) {} // ERROR - duplicate specialization. diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit35.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit35.C deleted file mode 100755 index c928263..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit35.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: -// GROUPS passed templates -struct S -{ - template <class T> - void foo(T t); -}; - -template <> -void S::foo<int>(int i) { } - -int main() -{ - S s; - s.template foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit36.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit36.C deleted file mode 100755 index 6f9e7c6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit36.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -void foo(T); - -class S { - friend void foo<>(int); - - int i; -}; - - -template <> -void foo(int) -{ - S s; - s.i = 3; -} - - -int main() -{ - foo(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit37.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit37.C deleted file mode 100755 index 4d911a4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit37.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't run: -// GROUPS passed templates -class ostream {}; - -template <class T> -class S; - -template <class T> -void operator<<(ostream&, S<T>) {} - -template <class T> -class S -{ - friend void operator<<<>(ostream&, const S<T>); -}; - - -int main() -{ - ostream o; - - o << S<int>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit38.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit38.C deleted file mode 100755 index 27121b6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit38.C +++ /dev/null @@ -1,7 +0,0 @@ -template <int I> -void f(int j); - -void g() -{ - f<7, 12>(3); // ERROR - no matching function. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit39.C deleted file mode 100755 index 906ef30..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit39.C +++ /dev/null @@ -1,7 +0,0 @@ -template <class T> -void f(int i); - -void g() -{ - f<7>(3); // ERROR - no matching function. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit4.C deleted file mode 100755 index 911e7b3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit4.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t); - -template <class T> -struct S {}; - -template <class T> -void bar(T t) -{ - void (*f)(S<T> ) = &foo<S<T> >; -} - - -void baz() -{ - bar(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit40.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit40.C deleted file mode 100755 index d237924..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit40.C +++ /dev/null @@ -1,27 +0,0 @@ -extern "C" void abort(); - -template <void* P> -void f(int j); - -template <unsigned int I> -void f(int j); - - -template <void* P> -void f(int j) -{ - abort(); -} - - -template <unsigned int I> -void f(int j) -{ -} - - -int main() -{ - f<3>(7); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit41.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit41.C deleted file mode 100755 index b5ca475..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit41.C +++ /dev/null @@ -1,8 +0,0 @@ -template <int I> -void f(int i); - -void g() -{ - int i; - f<i>(7); // ERROR - template argument 1 is invalid. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit42.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit42.C deleted file mode 100755 index c19ffd0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit42.C +++ /dev/null @@ -1,17 +0,0 @@ -extern "C" void abort(void); - -template <int I> -void f(int i) -{ -} - -template <void*> -void f(int i) -{ - abort(); -} - -int main() -{ - f<0>(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit43.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit43.C deleted file mode 100755 index 6396f09..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit43.C +++ /dev/null @@ -1,23 +0,0 @@ -extern "C" void abort(void); - -void F(int) -{ -} - - -void F(double) -{ - abort(); -} - -template <void (*F)(int)> -void g() -{ - (*F)(3); -} - - -int main() -{ - g<&F>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit5.C deleted file mode 100755 index 2c2b763..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit5.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -void foo(T t) {} - -template <class T> -struct S {}; - -template <class T> -void bar(T t) -{ - void (*f)(S<T> ) = &foo<S<T> >; -} - - -void baz() -{ - bar(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit50.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit50.C deleted file mode 100755 index 8c424cc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit50.C +++ /dev/null @@ -1,15 +0,0 @@ -extern "C" void abort (); - -template <class T> int f () -{ - return sizeof(T); -} - -int main () -{ - if (f<long> () != sizeof(long) - || f<char> () != sizeof(char) - || f<long> () != sizeof(long) - || f<long int> () != sizeof(long int)) - abort (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit51.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit51.C deleted file mode 100755 index e4a0a64..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit51.C +++ /dev/null @@ -1,18 +0,0 @@ -extern "C" void abort (); - -template <int a> int fact () -{ - return 0; -} - -template <> int fact<1> () -{ - return 1; -} - -int main() -{ - if (fact<3> () != 0 || fact<1> () != 1 - || fact<3> () != 0 || fact<1> () != 1 || fact<1+0> () != 1) - abort (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit52.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit52.C deleted file mode 100755 index 368573e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit52.C +++ /dev/null @@ -1,18 +0,0 @@ -extern "C" void abort (); - -template <int a> inline int fact () -{ - return a * fact<a-1> (); -} - -template <> inline int fact<1> () -{ - return 1; -} - -int main() -{ - if (fact<3> () != 6 || fact<1> () != 1 - || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1) - abort (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit53.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit53.C deleted file mode 100755 index e66cca9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit53.C +++ /dev/null @@ -1,21 +0,0 @@ -extern "C" void abort (); - -template <int a> inline int fact (); -template <> inline int fact<1> (); - -template <int a> inline int fact () -{ - return a * fact<a-1> (); -} - -template <> inline int fact<1> () -{ - return 1; -} - -int main() -{ - if (fact<3> () != 6 || fact<1> () != 1 - || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1) - abort (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit54.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit54.C deleted file mode 100755 index 9d185be..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit54.C +++ /dev/null @@ -1,35 +0,0 @@ -extern "C" void abort (); - -template <int a> inline int fact2 (); - -template <int a> inline int fact () -{ - return a * fact2<a-1> (); -} - -template <> inline int fact<1> () -{ - return 1; -} - -template <int a> inline int fact2 () -{ - return a*fact<a-1>(); -} - -template <> inline int fact2<1> () -{ - return 1; -} - -int main() -{ - if (fact<3> () != 6 || fact<1> () != 1 - || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1) - abort (); - if (fact2<3> () != 6 || fact2<1> () != 1 - || fact2<3> () != 6 || fact2<1> () != 1 || fact2<1+0> () != 1) - abort (); - if (fact2<4> () != 24 || fact<4> () != 24) - abort (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit55.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit55.C deleted file mode 100755 index c9d3125..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit55.C +++ /dev/null @@ -1,14 +0,0 @@ -template <class T> T* create () -{ - return new T; -} - -template <class T> T* create2() -{ - return create<T>(); -} - -int main() -{ - int *p = create2<int>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit56.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit56.C deleted file mode 100755 index d202160..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit56.C +++ /dev/null @@ -1,16 +0,0 @@ -template <class T> T* create (); - -template <class T> T* create2() -{ - return create<T>(); -} - -template <class T> T* create () -{ - return new T; -} - -int main() -{ - int *p = create2<int>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit57.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit57.C deleted file mode 100755 index d1f0ea8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit57.C +++ /dev/null @@ -1,42 +0,0 @@ -extern "C" void abort (); - -int a = 0; - -template <class T> void f (); -template <class T> void g () -{ - if (a) - abort (); -} - -template <> void g<char> () -{ -} - -template <class T> class C -{ - public: - void ff () { f<T> (); } - void gg () { g<T> (); } -}; - -template <class T> void f () -{ - if (a) - abort (); -} - -template <> void f<char> () -{ -} - -int main () -{ - C<int> c; - c.ff(); - c.gg(); - a = 1; - C<char> d; - d.ff(); - d.gg(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit58.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit58.C deleted file mode 100755 index 7193d2d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit58.C +++ /dev/null @@ -1,41 +0,0 @@ -extern "C" void abort (); - -template <class T> void f (); -template <class T> void g () -{ - abort (); -} - -template <> void g<char> () -{ - abort (); -} - -template <class T> class C -{ - public: - template <class U> void f () {} - template <class U> void g () {} - void ff () { f<T> (); } - void gg () { g<T> (); } -}; - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ - abort (); -} - -int main () -{ - C<int> c; - c.ff(); - c.gg(); - C<char> d; - d.ff(); - d.gg(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit59.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit59.C deleted file mode 100755 index 847a80a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit59.C +++ /dev/null @@ -1,41 +0,0 @@ -extern "C" void abort (); - -template <class T> void f (); -template <class T> void g () -{ - abort (); -} - -template <> void g<char> () -{ - abort (); -} - -template <class T> class C -{ - public: - void ff () { f<T> (); } - void gg () { g<T> (); } - template <class U> void f () {} - template <class U> void g () {} -}; - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ - abort (); -} - -int main () -{ - C<int> c; - c.ff(); - c.gg(); - C<char> d; - d.ff(); - d.gg(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit6.C deleted file mode 100755 index 1ee7751..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit6.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't run: -// GROUPS passed templates -template <class T> -int foo(T t); - -template <> -int foo(int i) { return 0; } - -int main() -{ - return foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit60.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit60.C deleted file mode 100755 index 5fda333..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit60.C +++ /dev/null @@ -1,43 +0,0 @@ -extern "C" void abort (); - -template <class T> void f (); -template <class T> void g () -{ - abort (); -} - -template <> void g<char> () -{ - abort (); -} - -template <class T> class C -{ - public: - void ff () { f<T> (); } - void gg () { g<T> (); } - template <class U> void f () {} - template <class U> void g () {} - template <class U> void f (int) { abort(); } - template <class U> void g (int) { abort(); } -}; - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ - abort (); -} - -int main () -{ - C<int> c; - c.ff(); - c.gg(); - C<char> d; - d.ff(); - d.gg(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit61.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit61.C deleted file mode 100755 index 69b7891..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit61.C +++ /dev/null @@ -1,43 +0,0 @@ -extern "C" void abort (); - -template <class T> void f (); -template <class T> void g () -{ - abort (); -} - -template <> void g<char> () -{ - abort (); -} - -template <class T> class C -{ - public: - void ff () { f<T> (0); } - void gg () { g<T> (1); } - template <class U> void f () { abort(); } - template <class U> void g () { abort(); } - template <class U> void f (int) {} - template <class U> void g (int) {} -}; - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ - abort (); -} - -int main () -{ - C<int> c; - c.ff(); - c.gg(); - C<char> d; - d.ff(); - d.gg(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit62.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit62.C deleted file mode 100755 index 5917ce0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit62.C +++ /dev/null @@ -1,19 +0,0 @@ -extern "C" void abort (); - -template <class T> void f () -{ -} - - -template <class T> class C -{ - friend void f<char> (); - public: - void ff () { f<char> (); } -}; - -int main () -{ - C<int> c; - c.ff(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit63.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit63.C deleted file mode 100755 index ce4d99a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit63.C +++ /dev/null @@ -1,19 +0,0 @@ -extern "C" void abort (); - -template <class T> void f () -{ -} - - -template <class T> class C -{ - friend void f<T> (); - public: - void ff () { f<T> (); } -}; - -int main () -{ - C<int> c; - c.ff(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit64.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit64.C deleted file mode 100755 index 2208b30..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit64.C +++ /dev/null @@ -1,23 +0,0 @@ -extern "C" void abort (); - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ -} - -template <class T> class C -{ - friend void f<char> (); - public: - void ff () { f<char> (); } -}; - -int main () -{ - C<int> c; - c.ff(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit65.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit65.C deleted file mode 100755 index a026e8e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit65.C +++ /dev/null @@ -1,33 +0,0 @@ -extern "C" void abort (); - -template <class T> void f () -{ - abort (); -} - -template <> void f<char> () -{ - abort (); -} - -template <class T> void f (int) -{ - abort (); -} - -template <> void f<char> (int) -{ -} - -template <class T> class C -{ - friend void f<char> (int); - public: - void ff () { f<char> (0); } -}; - -int main () -{ - C<int> c; - c.ff(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit66.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit66.C deleted file mode 100755 index d4a3c62..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit66.C +++ /dev/null @@ -1,11 +0,0 @@ -void f(int) {} -void f(double); - -template <void (*fn)(int)> -void foo() {} - -int main() -{ - foo<f>(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit67.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit67.C deleted file mode 100755 index c8705f4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit67.C +++ /dev/null @@ -1,20 +0,0 @@ -struct S -{ - void f(int); - void f(double); -}; - -void g(int); -void g(double); - -template <int* IP> -void foo(); -template <long l> -void foo(); - -void bar() -{ - foo<S::f>(); // ERROR - no matching function - foo<g>(); // ERROR - no matching function - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit68.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit68.C deleted file mode 100755 index bc47c6c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit68.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -template <bool B> -struct S -{ - static void g(); -}; - -template <bool B> -void g(); - -template<unsigned Length> -void f() -{ - const bool b = true; - g<b>(); - const bool b1 = (Length == 2); - S<b1>::g(); -} - -void h() -{ - f<3>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit69.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit69.C deleted file mode 100755 index 671cf00..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit69.C +++ /dev/null @@ -1,2 +0,0 @@ -//Build don't link: -template class x {}; // ERROR - not a template instantiation diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit70.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit70.C deleted file mode 100755 index ade83fd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit70.C +++ /dev/null @@ -1,43 +0,0 @@ -// Build don't link: - -template <class T> -void f(T) {} - -template <class T> -struct S { - static T t; -}; - -template <class T> -T S<T>::t; - -template void f(int); -template void f(int); // ERROR - duplicate explicit instantiation -template int S<int>::t; -template int S<int>::t; // ERROR - duplicate explicit instantiation -template class S<double>; -template class S<double>; // ERROR - duplicate explicit instantiation - -extern template void f(double); // WARNING - extern not allowed -inline template class S<float>; // WARNING - inline not allowed - -template <class T> -struct S<T*> {}; - -template class S<void*>; // OK - explicit instantiation of partial - // specialization - -template <> -struct S<long double> {}; // ERROR - explicit specialization - -template class S<long double>; // ERROR - explicit instantiation after - -template <> -void f(long double) {} // ERROR - explicit specialization - -template void f(long double); // ERROR - explicit instantiation after - -template <class T> -void g(T); - -template void g(int); // ERROR - no definition of g. diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit71.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit71.C deleted file mode 100755 index c84eebc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit71.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// by Alexandre Oliva <oliva@dcc.unicamp.br> -// Based on a testcase by Reid M. Pinchback <reidmp@MIT.EDU> -// According to the C++ Standard [temp.expl.spec]/17-18, explicit -// specializations are only valid if all enclosing template classes -// of the specialized template are fully specialized too - -template <class X> -class bug { - template <class Y> - class a {}; -}; -template <class X> -template <> // ERROR - invalid specialization -class bug<X>::a<char> {}; // ERROR - "" diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit72.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit72.C deleted file mode 100755 index bc9edfb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit72.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// Contributed by Reid M. Pinchback <reidmp@MIT.EDU> -// Adapted by Alexandre Oliva <oliva@dcc.unicamp.br> -// plain char, signed char and unsigned char are distinct types - -template <class X, class Y> class bug {}; -template <class X> class bug<X,char> { typedef char t; }; -template <class X> class bug<X,unsigned char> { typedef unsigned char t; }; -template <class X> class bug<X,signed char> { typedef signed char t; }; -template <class X> class bug<char,X> { typedef char t; }; -template <class X> class bug<unsigned char,X> { typedef unsigned char t; }; -template <class X> class bug<signed char,X> { typedef signed char t; }; - -void foo() { - bug<int,char>::t(); - bug<int,signed char>::t(); - bug<int,unsigned char>::t(); - bug<char,int>::t(); - bug<signed char,int>::t(); - bug<unsigned char,int>::t(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit73.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit73.C deleted file mode 100755 index 106f573..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit73.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -// by Alexandre Oliva <oliva@dcc.unicamp.br> - -// According to [temp.expl.spec]/2, a template explicit specialization -// must be declared in the namespace that contains the declaration of -// the template - -namespace N { - template <class T> class foo; -} - -using namespace N; - -template <> class foo<void>; // ERROR - invalid specialization - XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit74.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit74.C deleted file mode 100755 index c49d169..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit74.C +++ /dev/null @@ -1,10 +0,0 @@ -// Reduced from a testcase by Yotam Medini <yotam@avanticorp.com> - -// egcs 1.1 seems to generate code that deletes a NULL pointer. - -template <class bar> struct foo { void fuz(); ~foo(); }; -struct baz { int i; foo<baz> j; } *p = 0; -template <class bar> void foo<bar>::fuz() { delete p; } -template <class bar> foo<bar>::~foo() { delete p; } -template class foo<baz>; -int main() { foo<baz>(); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit75.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit75.C deleted file mode 100755 index 433f0b1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit75.C +++ /dev/null @@ -1,11 +0,0 @@ -// Test for not complaining about mismatches during unification. -// Build don't link: - -template <void (*F)(int)> void f(); -template <void (*F)(double)> void f(); -extern void g(double); - -void h () -{ - f<g>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit76.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit76.C deleted file mode 100755 index 18c161c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit76.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -// Based on bug report by Simon A. Crase <s.crase@ieee.org> - -// crash test - XFAIL *-*-* - -struct foo { - template <class T> void bar(); -}; - -template void foo::bar<void>(); // gets bogus error - ICE - XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit8.C deleted file mode 100755 index 777c5d4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit8.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T, class U> -void foo(T t, U u); - -template <class U> -void foo(double, U) {} - -void baz() -{ - foo<char*>(3.0, "abc"); - foo<char*, double>("abc", 3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit9.C deleted file mode 100755 index 908374b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit9.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed templates -void foo(int); - -void bar() -{ - foo<int>(3); // ERROR - foo is not a template. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr1.C deleted file mode 100755 index cdb8687..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr1.C +++ /dev/null @@ -1,33 +0,0 @@ -template <int n> class vec { - double x[n]; - - public: - vec() { - for (int i=0; i<n-1; ++i) x[i]=0; - } - - vec(const vec<n>& v) { - for (int i=0; i<n; ++i) x[i]=v(i); - } - - vec(const vec<n-1>& v, const double& y) { - for (int i=0; i<n-1; ++i) x[i]=v(i); - x[n-1]=y; - } - - inline double operator()(const int i) const { - return x[i]; - } -}; - - -template <int n> vec<n + 1>& operator,(const vec<n>& v, const double& y) { - return *(new vec<n + 1>(v, y)); -} - - -int main() { - vec<4> v; - vec<5> w; - w=(v,3.); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr2.C deleted file mode 100755 index d6e5593..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <int I> -struct S {}; - -template <int J> -void foo(S<J + 2>); - -void bar() -{ - foo(S<3>()); // ERROR - no way to deduce J from this. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr3.C deleted file mode 100755 index 4d77370..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr3.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -template <int I> -struct S {}; - -template <int J> -void foo(S<J - 1>); - -template <class T> -void baz(S<sizeof(T)>); - -template <int J> -void fun(S<J>, S<J * 2>); - -void bar() -{ - foo<5>(S<4>()); // OK - 4 is 5 - 1. - baz<int>(S<sizeof(int)>()); // OK - fun(S<4>(), S<8>()); // OK - deduce J from first argument. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr4.C deleted file mode 100755 index 13298fe..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr4.C +++ /dev/null @@ -1,373 +0,0 @@ -template<class View, class W> -class TinyContainer { -public: - - typedef W T_Wrapped; - - TinyContainer() { } - TinyContainer(View data) : m_data(data) { } - - T_Wrapped &unwrap() - { - return *static_cast<T_Wrapped *>(this); - } - const T_Wrapped &unwrap() const - { - return *static_cast<const T_Wrapped *>(this); - } - -protected: - - mutable View m_data; -}; - -template<class Op, class Left, class Right> -class TinyBinaryExpr : - public TinyContainer< Op, TinyBinaryExpr<Op, Left, Right> > { -public: - - typedef typename Left::T_Return T_Return; - typedef TinyBinaryExpr<Op, Left, Right> T_Expr; - - T_Expr makeExpr() const { return *this; } - - TinyBinaryExpr(const Op &op, const Left &left, const Right &right) - : TinyContainer< Op, TinyBinaryExpr<Op, Left, Right> >(op), - m_left(left), m_right(right) - { } - - TinyBinaryExpr(const Left &left, const Right &right) - : m_left(left), m_right(right) - { } - - Op op() const { return m_data; } - Left left() const { return m_left; } - Right right() const { return m_right; } - -private: - - Left m_left; - Right m_right; -}; - -struct OpAdd { - - template<class T1, class T2> - static T1 apply(const T1 &l, const T2 &r) - { - return l + r; - } - -}; - -template<class V1, class T1, class V2, class T2> -inline TinyBinaryExpr<OpAdd, typename T1::T_Expr, typename T2::T_Expr> -operator+(const TinyContainer<V1,T1>& l, const TinyContainer<V2,T2>& r) -{ - typedef TinyBinaryExpr<OpAdd, typename T1::T_Expr, typename T2::T_Expr> ret; - return ret(l.unwrap().makeExpr(), r.unwrap().makeExpr()); -} - - -template<class Op, class T1, class T2, class Functor> -inline -typename T1::T_Return -for_each(const TinyBinaryExpr<Op,T1,T2>& node, Functor f) -{ - return Op::apply(for_each(node.left(),f), for_each(node.right(),f)); -} - -template<class T, unsigned Nrows, unsigned Ncols, unsigned S1, unsigned S2> -class DenseDataView - : public TinyContainer< T*, DenseDataView<T, Nrows, Ncols, S1, S2> > { -public: - - typedef T T_Return; - typedef DenseDataView<T, Nrows, Ncols, S1, S2> T_Expr; - - T_Expr makeExpr() const { return *this; } - - T *beginLoc(unsigned i, unsigned j) const - { return m_data + S1 * i + S2 * j; } - - DenseDataView(T *pData) - : TinyContainer< T*, DenseDataView<T, Nrows, Ncols, S1, S2> >(pData) { } - - T &offset(unsigned i, unsigned j) - { - return m_data[S1 * i + S2 * j]; - } - - T offset(unsigned i, unsigned j) const - { - return m_data[S1 * i + S2 * j]; - } - - template<unsigned I, unsigned J> - struct Offset { - - static T &apply(DenseDataView<T, Nrows, Ncols, S1, S2> &d) - { - return d.m_data[S1 * I + S2 * J]; - } - - static T constApply(const DenseDataView<T, Nrows, Ncols, S1, S2> &d) - { - return d.m_data[S1 * I + S2 * J]; - } - - }; - -}; - -template<unsigned I, unsigned J> -struct Eval2 { }; - -template<class T, unsigned Nrows, unsigned Ncols, unsigned S1, unsigned S2, - unsigned I, unsigned J> -inline T -for_each(const DenseDataView<T, Nrows, Ncols, S1, S2> &d, - const Eval2<I,J> &e) -{ - return d.offset(I, J); -} - -template<class T, unsigned Nrows, unsigned Ncols> -class DenseData - : public TinyContainer< T[Nrows * Ncols], DenseData<T, Nrows, Ncols> > { -public: - - typedef T T_Return; - typedef DenseDataView<T, Nrows, Ncols, 1, Nrows> T_Expr; - - T_Expr makeExpr() const { return T_Expr(m_data); } - - T *beginLoc(unsigned i, unsigned j) const - { return &m_data[i + Nrows * j]; } - - T &operator[](unsigned i) - { - return m_data[i]; - } - - T operator[](unsigned i) const - { - return m_data[i]; - } - - T &offset(unsigned i, unsigned j) - { - return m_data[i + Nrows * j]; - } - - T offset(unsigned i, unsigned j) const - { - return m_data[i + Nrows * j]; - } - - template<unsigned I, unsigned J> - struct Offset { - - static T &apply(DenseData<T, Nrows, Ncols> &d) - { - return d.m_data[I + Nrows * J]; - } - - static T constApply(const DenseData<T, Nrows, Ncols> &d) - { - return d.m_data[I + Nrows * J]; - } - - }; - -}; - -template<class T, unsigned Nrc> -class DiagonalData { -public: - - T &offset(unsigned i, unsigned j) - { - assert(i == j); - return m_data[i]; - } - - T offset(unsigned i, unsigned j) const - { - return (i == j) ? m_data[i] : T(0); - } - - template<unsigned I, unsigned J> - struct Offset { - - static T &apply(DiagonalData<T,Nrc> &d) - { - assert(I == J); - return d.m_data[I]; - } - - static T constApply(const DiagonalData<T,Nrc> &d) - { - return (I == J) ? d.m_data[I] : T(0); - } - - }; - -private: - - T m_data[Nrc]; -}; - -template<unsigned I, unsigned J, unsigned C1> -struct InnerLoop { - - template<class LHS, class RHS> - static inline void eval(LHS &l, const RHS &r) - { - l.offset(I,J) = for_each(r, Eval2<I,J>()); - InnerLoop<I + 1, J, C1 - 1>::eval(l, r); - } - -}; - -template<unsigned I, unsigned J> -struct InnerLoop<I, J, 0> { - - template<class LHS, class RHS> - static inline void eval(LHS &, const RHS &) { } - -}; - -template<unsigned I, unsigned J, unsigned C1, unsigned C2> -struct Loop2 { - - template<class LHS, class RHS> - static inline void eval(LHS &l, const RHS &r) - { - InnerLoop<I, J, C1>::eval(l, r); - Loop2<I, J + 1, C1, C2 - 1>::eval(l, r); - } -}; - -template<unsigned I, unsigned J, unsigned C1> -struct Loop2<I, J, C1, 0> { - - template<class LHS, class RHS> - static inline void eval(LHS &l, const RHS &r) { } - -}; - - -template<unsigned Begin, unsigned End, unsigned Stride = 1> -class TinyRange { -public: - - static const unsigned b = Begin; - static const unsigned e = End; - static const unsigned s = Stride; - static const unsigned n = (End - Begin) / Stride + 1; - - static unsigned index(unsigned i) - { - return b + s * i; - } -}; - -template<class Range1, class Range2, class Data> -struct Merge { }; - -template<class Range1, class Range2, class T, unsigned Nrows, unsigned Ncols> -struct Merge<Range1, Range2, DenseData<T, Nrows, Ncols> > -{ - static const unsigned s2 = Nrows * Range2::s; - typedef - DenseDataView<T, Range1::n, Range2::n, Range1::s, s2> type; -}; - -template<class Range1, class Range2, class T, unsigned Nrows, unsigned Ncols, - unsigned S1, unsigned S2> -struct Merge<Range1, Range2, DenseDataView<T, Nrows, Ncols, S1, S2> > -{ - static const unsigned s1 = S1 * Range1::s; - static const unsigned s2 = S2 * Range2::s; - - typedef - DenseDataView<T, Range1::n, Range2::n, s1, s2> type; -}; - -template<class T, unsigned Nrows, unsigned Ncols, - class Data = DenseData<T, Nrows, Ncols> > -class TinyMatrix : - public TinyContainer< Data, TinyMatrix<T, Nrows, Ncols, Data> > { -public: - - typedef T T_Return; - typedef typename Data::T_Expr T_Expr; - typedef TinyContainer< Data, TinyMatrix<T, Nrows, Ncols, Data> > T_Base; - - T_Expr makeExpr() const { return m_data.makeExpr(); } - - TinyMatrix() { } - - TinyMatrix(const T &a0, const T &a1, const T &a2, - const T &a3, const T &a4, const T &a5) - { - m_data[0] = a0; m_data[1] = a1; m_data[2] = a2; - m_data[3] = a3; m_data[4] = a4; m_data[5] = a5; - } - - TinyMatrix(const T &a0, const T &a1) - { - m_data[0] = a0; m_data[1] = a1; - } - - TinyMatrix(const Data &d) : T_Base(d) { } - - T operator()(unsigned i, unsigned j) const - { - return m_data.offset(i, j); - } - - template<unsigned B1, unsigned E1, unsigned S1, - unsigned B2, unsigned E2, unsigned S2> - TinyMatrix<T, TinyRange<B1, E1, S1>::n, - TinyRange<B2, E2, S2>::n, - typename - Merge< TinyRange<B1, E1, S1>, TinyRange<B2, E2, S2>, Data>::type> - operator()(const TinyRange<B1, E1, S1> &r1, const TinyRange<B2, E2, S2> &r2) - { - typedef typename - Merge< TinyRange<B1, E1, S1>, TinyRange<B2, E2, S2>, Data>::type - T_DataType; - typedef TinyMatrix<T, TinyRange<B1, E1, S1>::n, - TinyRange<B2, E2, S2>::n, T_DataType> T_RetType; - - return T_RetType(T_DataType(m_data.beginLoc(B1, B2))); - } - - template<class V1, class T1> - void operator=(const TinyContainer<V1, T1> &rhs) - { - Loop2<0, 0, Nrows, Ncols>::eval(m_data, rhs.unwrap().makeExpr()); - } - -}; - - -int main() -{ - TinyMatrix<double, 2, 3> a, b(1.0, 2.0, 3.0, 4.0, 5.0, 6.0), - c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6), d(0.01, 0.02, 0.03, 0.04, 0.05, 0.06); - TinyMatrix<double, 1, 2> e, f(17.0, 48.3); - - a = b + c + d; - - a(TinyRange<0,1>(), TinyRange<0,2,2>()); - - a(TinyRange<0,1>(), TinyRange<0,2,2>()) - (TinyRange<0,0>(), TinyRange<0,1>()); - - e = f + a(TinyRange<0,1>(), TinyRange<0,2,2>()) - (TinyRange<0,0>(), TinyRange<0,1>()); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr5.C deleted file mode 100755 index 4cb5078..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T, int i> -struct S1; - -template <class T, int i, int j> -struct S2 -{ - typedef typename S1<T, (i >= j ? 0 : 1) >::type type; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/expr6.C deleted file mode 100755 index e1d38de..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/expr6.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -// Based on a bug report by tveldhui <tveldhui@extreme.indiana.edu> - -// excess errors test - XFAIL *-*-* - -template <int X> class foo {}; - -foo< true ? 1 : 0 > bar; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend1.C deleted file mode 100755 index ba642ba..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend1.C +++ /dev/null @@ -1,24 +0,0 @@ -template <class T> -void f(T); - -class C -{ - template <class T> - friend void f(T); - - int i; -}; - - -template <class T> -void f(T) -{ - C c; - c.i = 3; -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend10.C deleted file mode 100755 index bff432b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend10.C +++ /dev/null @@ -1,29 +0,0 @@ -template <class T> -void f(T); - -template <class U> -class C -{ - template <class T> - friend void f(T) - { - C<U> c; - c.i = 3; - } - -public: - - void g() - { - f(3.0); - } - - int i; -}; - -int main() -{ - f(7); - C<double> c; - c.g(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend11.C deleted file mode 100755 index d70fae6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend11.C +++ /dev/null @@ -1,31 +0,0 @@ -template <class T> -class C; - -template <class T> -struct S -{ - template <class U> - void f(U u) - { - C<U> cu; - cu.i = 3; // ERROR - S<double>::f<U> is a friend, but this is - // S<int>::f<double>. - } -}; - - -template <class T> -class C -{ - template <class U> - friend void S<T>::f(U); - - int i; -}; - - -int main() -{ - S<int> si; - si.f(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend12.C deleted file mode 100755 index ef9bfc8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend12.C +++ /dev/null @@ -1,33 +0,0 @@ -template <class T> -class C; - -template <class T> -struct S -{ - template <class U> - void f(U u1, U u2) {} - - template <class U> - void f(U u) - { - C<T> ct; - ct.i = 3; - } -}; - - -template <class T> -class C -{ - template <class U> - friend void S<T>::f(U); - - int i; -}; - - -int main() -{ - S<int> si; - si.f(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend13.C deleted file mode 100755 index 251d52a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend13.C +++ /dev/null @@ -1,33 +0,0 @@ -template <class T> -class C; - -template <class U> -struct S -{ - template <class V> - void f(V v) - { - C<V> cv; - cv.i = 3; - } -}; - - -template <class T> -class C -{ - template <class U> - template <class V> - friend void S<U>::f(V); - - int i; -}; - - -int main() -{ - S<int> si; - si.f(3.0); - S<long> sl; - sl.f('c'); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend14.C deleted file mode 100755 index 4ed5fcc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend14.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -template <class U> -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - - -template <class T> -class S2 -{ -public: - static void f() { S1<T>::i = 3; } -}; - - -void g() -{ - S2<double>::f(); - S2<long>::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend15.C deleted file mode 100755 index 8d49f6a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend15.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - - -template <class T> -class S2 -{ -public: - static void f() { S1::i = 3; } -}; - - -void g() -{ - S2<double>::f(); - S2<char>::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend16.C deleted file mode 100755 index 7f13e5b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend16.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: - -template <class T> -class S2 -{ -public: - static void f(); -}; - - -template <class U> -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - - -template <class T> -void S2<T>::f() -{ - S1<T>::i = 3; -} - -void g() -{ - S2<double>::f(); - S2<char>::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend17.C deleted file mode 100755 index cb12ce8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend17.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: - -template <class T> -class S2 -{ -public: - static void f(); -}; - -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - -template <class T> -void S2<T>::f() -{ - S1::i = 3; -} - -void g() -{ - S2<double>::f(); - S2<char>::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend18.C deleted file mode 100755 index 998e163..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend18.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: - -template <class U> -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - - -template <class T> -class S2 -{ -public: - static void f() { S1<T>::i = 3; } -}; - - -void g() -{ - S2<double>::f(); - S2<long>::f(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend19.C deleted file mode 100755 index 998e163..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend19.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: - -template <class U> -class S1 -{ - template <class T> - friend class S2; - - static int i; -}; - - -template <class T> -class S2 -{ -public: - static void f() { S1<T>::i = 3; } -}; - - -void g() -{ - S2<double>::f(); - S2<long>::f(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend20.C deleted file mode 100755 index 40d5370..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend20.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T = int> struct A; - -template <class T> struct B -{ - friend class A<T>; -}; - -template class B<int>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend21.C deleted file mode 100755 index c89fe1d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend21.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: - -template <class T> struct A { - static void f(); -}; - -template <class T> class B -{ - friend class A<T>; - static int i; -}; - -template <class T> class C -{ - template <class U> - friend class A; - - static int i; -}; - -template <class T> -void A<T>::f() -{ - B<T>::i = 3; - C<T>::i = 3; - C<double>::i = 3; - B<double>::i = 3; // ERROR - member `i' is private -} - -template void A<int>::f(); // ERROR - instantiated from here diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend22.C deleted file mode 100755 index ed459d7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend22.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T = int> -struct S -{ - template <class U> - friend class S; -}; - -template struct S<int>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend23.C deleted file mode 100755 index 21065f1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend23.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T = int> // ERROR - original definition -struct S -{ // ERROR - redefinition of default arg - template <class U = int> - friend class S; -}; - -template struct S<int>; // ERROR - instantiated from here diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend24.C deleted file mode 100755 index d312b38..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend24.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - template <class U = T> - friend class S; - - void f(T); -}; - -template struct S<int>; - -void g() -{ - S<> s; - s.f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend25.C deleted file mode 100755 index f93e73b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend25.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class T> struct A; - -struct B -{ - template <class U> - friend class A<U>; // ERROR - does not specialize any args -}; - -struct C -{ - template <class U> - friend class A<U*>; // ERROR - partial specialization -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend26.C deleted file mode 100755 index a426f8b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend26.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -struct S -{ - friend void f<>(int); // ERROR - does not match any template -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend27.C deleted file mode 100755 index 0f11a49..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend27.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -class S -{ - friend void f<>(int); // ERROR - does not match any template - int i; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend28.C deleted file mode 100755 index f86d0b6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend28.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -class mystream; - -template <class T> class a { -public: - friend mystream& operator>> <>( mystream&, a<T>& thea ); -private: - T amember; -}; - -template <class T> mystream& operator>>( mystream& s, a<T>& thea ); - -template<> mystream& operator>> <int>( mystream& s, a<int>& thea ); - -template class a<int>; - -template<> mystream& operator>> <int>( mystream& s, a<int>& thea ) -{ - thea.amember = 0; - return s; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend29.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend29.C deleted file mode 100755 index e141aaa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend29.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T> class a { -public: - friend void foo<>( a<T>& thea ); -private: - T amember; -}; - -template <class T> void foo( a<T>& thea ) -{ - thea.amember = 0; -} - -template class a<int>; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend3.C deleted file mode 100755 index 77aabd3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend3.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -template <class T> -void f(T); - -class C -{ - friend void f<>(double); - - int i; -}; - - -template <class T> -void f(T) -{ - C c; - c.i = 3; // ERROR - f<double> is a friend, this is f<int>. -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend30.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend30.C deleted file mode 100755 index 61dd8fc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend30.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <class T, class U> -struct S { - template <class X, class Y, class Z> - friend X f(X, Y, Z); -}; - -template <class X, class Y, class Z> -X f(X x, Y, Z) { - return x; -} - -template char f(char, long, short); -template char* f(char*, long*, short*); -template class S<int, double>; -template class S<void*, double>; -template double* f(double*, long*, short*); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend31.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend31.C deleted file mode 100755 index 15a380b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend31.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 { -}; - -template <> -struct S1<int> {}; - -struct S2 { - friend class S1<int>; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend32.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend32.C deleted file mode 100755 index b1f173a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend32.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T, class U> -struct S { - template <class X, class Y, class Z> - friend X f(X, Y, Z); -}; - -template class S<int, double>; -template char f(char, long, short); -template char* f(char*, long*, short*); - -template <class X, class Y, class Z> -X f(X x, Y, Z) { - return x; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend33.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend33.C deleted file mode 100755 index 5feec1a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend33.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't run: -// Special g++ Options: -g - -template <class P1> -struct S1 -{ - struct SS1 - { - }; - friend void Foo (const SS1& ss1) - { - } -}; - -template <class P1> -void Foo(const S1<P1>& s1) -{ - typedef typename S1<P1>::SS1 TYPE; - TYPE t; - Foo(t); -} - -int main () -{ - S1<double> obj; - Foo(obj); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend34.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend34.C deleted file mode 100755 index 56eb80a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend34.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// excess errors test - -// This testcase won't fail if class ::foo is forward-declared in the -// global namespace, nor if class bar is not a template class. - -template <typename T = void> -class bar { -public: - friend class foo; // this is not bar::foo, it forward-declares ::foo - class foo {}; - bar() { foo(); } // but this should refer to bar::foo -}; - -bar<> baz; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend35.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend35.C deleted file mode 100755 index c2c22c7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend35.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -class foo { - friend void bar<int>(int); // ERROR - must be declared first -}; - -template <typename T> void bar(T); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend36.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend36.C deleted file mode 100755 index 4a9042a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend36.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T> -void f(T) {} // ERROR - previously defined here - -template <class U> -struct S { - template <class T> - friend void f(T) {} // ERROR - redeclaration -}; - -S<int> si; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend37.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend37.C deleted file mode 100755 index 2379d5f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend37.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// Simplified from report by Volker Dobler <volker@hugo.physik.uni-konstanz.de> - -// crash test - XFAIL *-*-* - -template <class T> class A { - friend int ice<>( int k=0 ); // ERROR - undeclared -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend38.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend38.C deleted file mode 100755 index 41c7714..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend38.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -// Overly simplified from testcase by "B. K. Oxley" <binkley@bigfoot.com> - -// crash test - XFAIL *-*-* - -template<class P> struct foo { - typedef P parent_type; - friend parent_type; // ERROR - template parameters cannot be friends -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend39.C deleted file mode 100755 index 836c830..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend39.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -template <class T> -struct S; - -template <class T> -class C -{ - friend void S<T>::f(); - - int i; -}; - -template <class T> -struct S -{ - void f() { - C<T> c; - c.i = 3; - } -}; - -template void S<int>::f(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend4.C deleted file mode 100755 index ea43927..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend4.C +++ /dev/null @@ -1,21 +0,0 @@ -class C -{ - template <class T> - friend void f(T); - - int i; -}; - - -template <class T> -void f(T) -{ - C c; - c.i = 3; -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend5.C deleted file mode 100755 index 516be4d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend5.C +++ /dev/null @@ -1,17 +0,0 @@ -class C -{ - template <class T> - friend void f(T) - { - C c; - c.i = 3; - } - - int i; -}; - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend6.C deleted file mode 100755 index 5651421..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend6.C +++ /dev/null @@ -1,28 +0,0 @@ -template <class T> -void f(T); - -class C -{ - template <class T> - friend void f(T) - { - C c; - c.i = 3; - } - -public: - - void g() - { - f(3.0); - } - - int i; -}; - -int main() -{ - f(7); - C c; - c.g(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend7.C deleted file mode 100755 index 2962d92..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend7.C +++ /dev/null @@ -1,25 +0,0 @@ -template <class T> -void f(T); - -template <class U> -class C -{ - template <class T> - friend void f(T); - - int i; -}; - - -template <class T> -void f(T) -{ - C<T> c; - c.i = 3; -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend8.C deleted file mode 100755 index ffa9122..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend8.C +++ /dev/null @@ -1,18 +0,0 @@ -template <class T> -class C -{ - friend void f (C<T> c) - { - c.i = 3; - } - - int i; -}; - - -int main() -{ - C<int> ci; - - f(ci); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/friend9.C deleted file mode 100755 index 63455d0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/friend9.C +++ /dev/null @@ -1,22 +0,0 @@ -template <class U> -class C -{ - template <class T> - friend void f(T); - - int i; -}; - - -template <class T> -void f(T) -{ - C<int> c; - c.i = 3; -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/goto.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/goto.C deleted file mode 100755 index c6c1a56..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/goto.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template<class T> -void compute(T) { - goto Exit; -Exit: ; - } - -int main() -{ - compute(0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate1.C deleted file mode 100755 index 11f9c78..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate1.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -template <class T> -void f(T t) {} - -template void f<int>(int); -template void f<>(long); - -template <class T> -struct S -{ - void bar(int) {} - - template <class U> - void baz(U u) {} -}; - - -template S<char>; -template void S<int>::bar(int); -template void S<double>::baz<short>(short); -template void S<long>::baz<>(char); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate2.C deleted file mode 100755 index a5c6c49..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template<class T> -struct X_two { - template <class T2> T2 conv_compare_ge(T2 test) { - T2 tmp_value = T2 (0); - return (tmp_value > test ? tmp_value : test); - } -}; - -template int X_two<double>::conv_compare_ge(int); - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate3.C deleted file mode 100755 index 62062f7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate3.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - S(const T&) {} - S(int, long); -}; - -template S<double>::S(const double&); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate4.C deleted file mode 100755 index 296356b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate4.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build then link: - -// Special g++ Options: -frepo -Werror - -// Submitted by Melissa O'Neill <oneill@cs.sfu.ca> -// the vtable of Foo<int> wouldn't be generated - -template <typename A> -struct Foo { - virtual void foo() {} -}; - -template <typename A> -struct Bar { - void bar(); -}; - -template <typename A> -void Bar<A>::bar() { - Foo<A> oof; -} - -int main () { - Bar<int> rab; - - rab.bar(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5-main.cc b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5-main.cc deleted file mode 100755 index be64bdb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5-main.cc +++ /dev/null @@ -1,3 +0,0 @@ -// this file is part of testcase instantiate5.C - -int main() {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.C deleted file mode 100755 index 70eefcb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't run: - -// Additional sources: instantiate5.cc instantiate5-main.cc - -// `global constructors' are given the same name, based on foo(), on -// both translation units, which is wrong, because it must be possible -// to define template functions in multiple translation units, as long -// as they're given the same definition - -// simplified from test case submitted by Daniel X. Pape <dpape@canis.uiuc.edu> - -template <class T> void foo() { } -inline int bar() { foo<void>(); return 1; } -static int i = bar(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.cc b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.cc deleted file mode 100755 index fc86e0f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate5.cc +++ /dev/null @@ -1,5 +0,0 @@ -// this file is part of testcase instantiate5.C - -template <class T> void foo() { } -inline int bar() { foo<void>(); return 1; } -static int i = bar(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate6.C deleted file mode 100755 index e896ed3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/instantiate6.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build then link: -// Special g++ Options: -frepo - -// Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il> -// excess errors test - XFAIL *-*-* - -template <class T> -class foo{ -public: - void g(); - void h(); -}; - -template <class T> -void foo<T>::g() { - h(); -} - -template <class T> -void foo<T>::h() { -} - -int main() { - foo<int> f; - f.g(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/label1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/label1.C deleted file mode 100755 index 964d1d7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/label1.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -template <class T> -struct S {}; - -template <class T> -inline void g(T t) -{ - here: - S<T> st; - goto here; -} - -template <class T> -void f(T t) -{ - here: - g(t); - goto here; -} - -void h() -{ - f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local1.C deleted file mode 100755 index 1b9e515..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local1.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class STRUCT, class MEMBER> inline STRUCT * -setback(MEMBER *bp, MEMBER STRUCT::*offset) -{ - if(!bp) return 0; - union { int i; MEMBER STRUCT::*of; } u; - u.of = offset; - return (STRUCT *) ((int) bp - u.i); -} - - -struct S -{ - int i; -}; - -int main() -{ - S s; - - S* sp = setback (&s.i, &S::i); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local2.C deleted file mode 100755 index 4aafc69..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local2.C +++ /dev/null @@ -1,20 +0,0 @@ -extern "C" void abort(); - -template <class T> -void f(T) -{ - struct S { - int i; - } s; - - s.i = 3; - - if (s.i != 3) - abort(); -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local3.C deleted file mode 100755 index ea1b386..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local3.C +++ /dev/null @@ -1,26 +0,0 @@ -extern "C" void abort(); - -template <class T> -void f(T) -{ - int j; - - j = 6; - - struct S { - int i; - }; - - S s; - - s.i = j; - - if (s.i != 6) - abort(); -} - - -int main() -{ - f(7); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local4.C deleted file mode 100755 index 6a7eb34..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local4.C +++ /dev/null @@ -1,25 +0,0 @@ -extern "C" void abort(); - -template <class T> -struct S {}; - -S<int> si; - -template <class T> -int f(T t) -{ - struct S { - int g(int i) { return i + 2; } - }; - - S s; - - return s.g(t) + s.g(t); -} - - -int main() -{ - if (f(3) != 10) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local5.C deleted file mode 100755 index b49525c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local5.C +++ /dev/null @@ -1,24 +0,0 @@ -template <class INT> -class b -{ -private: - char a(int x) - { - union { - int i; - char c; - } val; - val.i = x; - return val.c; - }; - -public: - b() { - } -}; - -int main() { - b<int> n; - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/local6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/local6.C deleted file mode 100755 index d3f2f4c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/local6.C +++ /dev/null @@ -1,24 +0,0 @@ -extern "C" void abort(); - -template <class T> -int f(T) -{ - struct S1 { - virtual int foo() { return 1; } - }; - - struct S2 : public S1 { - int foo() { return 2; } - }; - - S1* s2 = new S2; - - return s2->foo(); -} - - -int main() -{ - if (f(3) != 2) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup1.C deleted file mode 100755 index 359915c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template <class T, class Allocator> - struct __vector_alloc_base -{ - typedef int allocator_type; -}; - -template <class T> - struct vector : __vector_alloc_base<T,int> -{ - typedef short allocator_type; - explicit vector(const allocator_type& a = allocator_type()) {} -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup2.C deleted file mode 100755 index 169aee0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// Special g++ Options: - -class A -{ -protected: - void f1() {}; -}; - -template <class T> class B : private A { -protected: - using A::f1; -}; - -template <class T> class D : private B<T> -{ -public: - void f2() { f1(); }; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup3.C deleted file mode 100755 index 9ada72f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup3.C +++ /dev/null @@ -1,17 +0,0 @@ -template<class T> -class A { -public: - void f() { } -}; - -class B : public A<int> { -public: - void f(); -}; - -int main() -{ - B b; - B& b1 = b; - b1.A<int>::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup4.C deleted file mode 100755 index fe15252..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup4.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -void h(int); - -template <class T> -class i {}; - -struct B -{ - int i; -}; - -template <class T> -struct D : public B -{ - void f(); - void g() { h(i); } -}; - -template <class T> -void D<T>::f() -{ - h(i); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup5.C deleted file mode 100755 index e38b222..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup5.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct B { - int i; -}; - -struct D: public B { - int i; -}; - -template <class T> -struct D2 : public D { - void f() { i = 3; } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup6.C deleted file mode 100755 index ae1f5ca..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/lookup6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -// Based on bug report by Miniussi <miniussi@ilog.fr> - -class t {}; - -template <class T> struct A { typedef T t; typedef T u; }; - -template <class T> struct B : public A<T> { - // according to [temp.dep.type], `t' and `u' cannot be dependent types, - // and so there's no reason to delay lookup to specialization time. - void f(t p); // this is ::t [temp.dep]/3 - void f(typename A<T>::t p); // gets bogus error - redefinition - void g(u p); // ERROR - unknown type name -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m1.C deleted file mode 100755 index 7de0e0c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -int f1 () { - struct A { - A() : b (2) { } - int fred () { return b.hi_mom; } - struct B { - int hi_mom; - B (int a) { hi_mom = a; } - }; - B b; - }; - A aa; - return aa.fred(); -} -/* crashes with signal 11 */ diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m2.C deleted file mode 100755 index 00fdbad..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct A { A() { a = 2; } int a; }; - -int f1 () { - struct A { A() { a = 2; } int a; }; - A aa; - return aa.a; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m3.C deleted file mode 100755 index 492b261..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m3.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct A { A() { a = 2; } int a; }; - -struct B { - struct A { A() { a = 2; } int a; }; - A aa; -}; -char xx[]="../tests/m3.cc:4: redefinition of `struct A'"; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m4.C deleted file mode 100755 index bbfb227..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m4.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct A1 { struct B { B(); } b; }; -struct A2 { struct B { ~B(); } b; }; -char xx[] ="../tests/m4.cc:1: warning: return type specification for constructor invalid"; - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m5.C deleted file mode 100755 index e834970..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m5.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -struct B { struct A { A(); int a; } aa; }; -struct A { A(); int a; }; -B::A::A () { a = 37; } -char xx[]="../tests/m5.cc:3: Segmentation violation"; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m6.C deleted file mode 100755 index 5d0c81e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m6.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct B { struct A { A(); int a; } aa; }; -B::A::A () { a = 37; } -char* xx[] = { -"../tests/m6.cc:1: warning: return type specification for constructor invalid", -"../tests/m6.cc:2: semicolon missing after declaration of `A'", -"../tests/m6.cc:2: warning: empty declaration", -"../tests/m6.cc: In function int A ():", -"../tests/m6.cc:2: `a' undeclared (first use this function)", -"../tests/m6.cc:2: (Each undeclared identifier is reported only once", -"../tests/m6.cc:2: for each function it appears in.)", -"../tests/m6.cc:2: warning: control reaches end of non-void function" }; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m7.C deleted file mode 100755 index 06d2ba3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m7.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -struct B { struct A { A(); int a; }; A aa; }; -B::A::A () { a = 37; } -char *xx[]= {"/*", -"../tests/m7.cc:1: warning: return type specification for constructor invalid", -"../tests/m7.cc: In function struct A A ():", -"../tests/m7.cc:2: `a' undeclared (first use this function)", -"../tests/m7.cc:2: (Each undeclared identifier is reported only once", -"../tests/m7.cc:2: for each function it appears in.)", -"../tests/m7.cc:2: warning: control reaches end of non-void function", - "*/" }; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m8.C deleted file mode 100755 index 22d0144..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m8.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -class A { - int a; - public: - A (int aa = 3); -}; - -class B { - class A { - public: - A (int, int); - }; - A aa; - public: - B (int); -}; - -extern void foo(); -B::B (int z) : aa (1, z) { - foo (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m9.C deleted file mode 100755 index d519dbd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m9.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -struct A { A() { a = 1; } int a; }; -struct Q { - struct A { A() { a = 2; } int a; }; - struct R { - struct A { A() { a = 3; } int a; }; - A aaz; - }; - R rrr; - A aay; -} -; - -Q qqq; -A aav; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/m9a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/m9a.C deleted file mode 100755 index 9118306..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/m9a.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -struct A { A() { a = 1; } int a; }; // ERROR - -struct A { A() { a = 2; } int a; }; // ERROR - -A aavv; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass1.C deleted file mode 100755 index 5ad839c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass1.C +++ /dev/null @@ -1,13 +0,0 @@ -template <class T> struct A { - template <class U> struct B { - template <class V> void f (V) { } - void g () { } - }; -}; - -int main () -{ - A<int>::B<char> b; - b.f (42); - b.g (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass10.C deleted file mode 100755 index 1deb380..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass10.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -struct S1 -{ - template <class T> - struct S2 {}; // ERROR - previous definition - - template <class T> - struct S2 {}; // ERROR - redefinition -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass11.C deleted file mode 100755 index 6eee67a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass11.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct S1 -{ - template <class T> - struct S2; - - template <class T> - struct S2 { - enum E { a }; - }; -}; - -int i = (int) S1::S2<double>::a; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass12.C deleted file mode 100755 index f4d0354..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass12.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -struct outer { - template <class T> struct inner; -} o; -template <class T> struct outer::inner {}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass13.C deleted file mode 100755 index 7eddc27..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass13.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class X, class Y> -struct Inner; - -template <class T> -struct S -{ - template <class U> - struct Inner - { - }; -}; - - -S<double>::Inner<int> si; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass14.C deleted file mode 100755 index ad1b2b4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass14.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class X, class Y> -struct Inner; - -struct S -{ - template <class U> - struct Inner - { - }; -}; - - -S::Inner<int> si; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass15.C deleted file mode 100755 index 52f92bf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass15.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 -{ - template <class U> - struct S2 {}; - - template <class X, class Y, class Z> - void f(X, Y, Z) - { - S2<Z> s2z; - } - - template <class X, class Z> - void g(X, Z) - { - S2<Z> s2z; - } -}; - - -void h() -{ - S1<int> si; - si.g(3, 4); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass16.C deleted file mode 100755 index e8e5643..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass16.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -template <class Q> -class A { -public: - - typedef enum { X, Y } B; - template <B c> class Traits{ }; -}; - - -template class A<int>; -template class A<double>::Traits<A<double>::X>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass17.C deleted file mode 100755 index 96024e2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass17.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -template <class T> struct S -{ - template <class U> struct I - { - }; - - S(); - S(S& s); - S(I<T>); - - template <class U> operator I<U>(); -}; - -S<int> f(); -void g(S<int>); - -void h() -{ - g(f()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass18.C deleted file mode 100755 index bb7f6f1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass18.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class T> struct A { - template <class U> struct B; -}; - -template <class T> template <class U> struct A<T>::B { }; - -A<int>::B<int> b; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass19.C deleted file mode 100755 index 6a8b0a7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass19.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class T> struct A { - template <class U> struct B; -}; - -template <class T> template <class U> struct A<T>::B<U*> { }; - -A<int>::B<int*> b; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass2.C deleted file mode 100755 index 895fd61..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass2.C +++ /dev/null @@ -1,18 +0,0 @@ -template <class T> struct A { - template <class U> struct B { - template <class V> void f (V) { } - void g () { } - }; - template <class W> struct B<W*> { - void h () { } - }; -}; - -int main () -{ - A<int>::B<char> b; - b.f (42); - b.g (); - A<double>::B<void*> b2; - b2.h (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass3.C deleted file mode 100755 index 77744f8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass3.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class T> struct A { - template <class U> struct B { - template <class V> struct C { - template <class W> struct D { - template <class X> struct E { - template <class Y> struct F { - template <class Z> void f (Z) { } - void g () { } - }; - }; - }; - }; - }; -}; - -int main () -{ - A<int>::B<int>::C<int>::D<int>::E<int>::F<int> b; - b.f (42); - b.g (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass4.C deleted file mode 100755 index 4c101c6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass4.C +++ /dev/null @@ -1,23 +0,0 @@ -#include <typeinfo> - -template <class T> -struct allocator { - typedef T* pointer; - - template <class U> struct rebind { - typedef allocator<U> other; - }; -}; - -template <class T, class Allocator> -struct alloc_traits -{ - typedef typename Allocator::template rebind<T>::other allocator_type; -}; - -int main () -{ - typedef alloc_traits<int, allocator<void> >::allocator_type at; - - return typeid (at) != typeid (allocator <int>); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass5.C deleted file mode 100755 index 06a1413..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass5.C +++ /dev/null @@ -1,22 +0,0 @@ -template <class T> struct A { - template <class U> struct B { - template <class V> static void f () { } - void g () { } - }; -}; - -template <class T, class U> -void f () -{ - A<T>::template B<U>::template f<T> (); - typename A<T>::B<U> b; - typename A<T>::template B<U> b2; - b.A<T>::template B<U>::~B(); -} - -template <class T> struct C: public A<T>::B<T> { }; - -int main () -{ - f<int, char>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass6.C deleted file mode 100755 index 65de1d1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass6.C +++ /dev/null @@ -1,18 +0,0 @@ -// Compiler: egcs-2.91.12 980302 -// Error: compiler error in ctor of 'foo::bar<T>::bar(T const &)' - -struct foo -{ - template <typename T> - struct bar - { - bar(T const &t) : tt(t) {} - T tt; - }; -}; - -int main() -{ - foo::bar<int> fb(3); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass7.C deleted file mode 100755 index 1a5cabe..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass7.C +++ /dev/null @@ -1,18 +0,0 @@ -struct S -{ - template <class U> - struct Y { - template <class T> - void foo(T t); - }; -}; - -template <> -template <> -void S::Y<char>::foo<int>(int i) { } - -int main() -{ - S::Y<char> s; - s.template foo<int>(3.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass8.C deleted file mode 100755 index 431d41d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass8.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -template <class T> -class S -{ - template <class U> - struct S2 { - S2(const S2<U>& s2u) {} - }; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass9.C deleted file mode 100755 index 824ee76..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memclass9.C +++ /dev/null @@ -1,32 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 -{ - template <class U> - struct S2 - { - S2(U); - - void g() - { - S2<U> s2u (u); - } - - U& u; - }; - - template <class U> - void f(U u) - { - S2<U> s2u(u); - s2u.g(); - } -}; - -void g() -{ - S1<int> s1; - s1.f(3.0); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp1.C deleted file mode 100755 index 94274e5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S { - template <class T> - void foo(T&); -}; - - -template <class T> -void S::foo(T&) -{ -} - - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp10.C deleted file mode 100755 index 9e97b5e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp10.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T> - operator T*(); -}; - - -template <class T> -S::operator T*() -{ - printf("Hello, world.\n"); - return 0; -} - - -int main() -{ - S s; - - char* cp = s.operator char*(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp11.C deleted file mode 100755 index a0d681d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp11.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S -{ - template <class U> - S(U u, int i) {} - - template <class T> - T foo(T t) - { - printf("Hello, world.\n"); - return t; - } -}; - - -int main() -{ - S s(3, 4); - int i = s.foo(3); - s.foo("hello"); - s.foo(s); - - S s2("hello", 5); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp12.C deleted file mode 100755 index 94a8c3c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp12.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - void foo(U); -}; - -void f() -{ - S<int> s; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp13.C deleted file mode 100755 index d6bc7b9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp13.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - void foo(U); -}; - -void f() -{ - S<int> s; - s.foo(3); - s.foo("hello"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C deleted file mode 100755 index e24a3a7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" const char* printf(const char*, ...); - -template <class T> -struct S -{ - template <class U, class V> - void foo(U, V); -}; - - -template <class T> -template <class U, class V> -void S<T>::foo(U, V) -{ - printf("Hello, world.\n"); -} - - -int main() -{ - S<int> s; - s.foo(3, 3); - s.foo("hello", s); - - S<char*> s2; - s2.foo(3, 3); - s2.foo("hello", s); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp15.C deleted file mode 100755 index 140730b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp15.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - void foo(U) {} -}; - - -void f() -{ - S<int> s; - s.foo(3); - s.foo("hello"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp16.C deleted file mode 100755 index cfa66aa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp16.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class U> -struct S { - template <class T> - void operator+(T); -}; - -template <class U> -template <class T> -void S<U>::operator+(T) -{ - printf("Hello, world.\n"); -} - - -int main() -{ - S<int> s; - s + 3; - s + s; - s.operator+("Hi"); - - S<S<int> > s2; - s2 + 3; - s2 + s; - s2.operator+("Hi"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp17.C deleted file mode 100755 index 0816b36..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp17.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class V> -struct S { - template <class T, class U> - S(T, U, T); -}; - - -template <class V> -template <class T, class U> -S<V>::S(T t1, U u1, T t2) -{ - printf("Hello, world.\n"); -} - - -int main() -{ - S<int> s1(3, "abc", 3); - S<int> s2('a', s1, 'a'); - - S<char> s3("abc", 3, "abc"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp18.C deleted file mode 100755 index 638e5e3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp18.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S -{ - template <class T> - void foo(T) {} -}; - -template void S::foo(int); - -int main() -{ - S s; - s.foo(3); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp19.C deleted file mode 100755 index 8551531..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp19.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T> - operator T(); -}; - -template <class T> -S::operator T() -{ - printf("Hello, world.\n"); - return T(); -} - - -template S::operator int(); - -int main() -{ - S s; - - int i = s.operator int(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp2.C deleted file mode 100755 index e000ffa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S { - template <class T> - void foo(T&); -}; - - -template <class U> -void S::foo(U&) -{ -} - - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp20.C deleted file mode 100755 index a79c534..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp20.C +++ /dev/null @@ -1,43 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S -{ - template <class T, class U> - void foo(T t, U u); - - template <class U> - void foo(char*, U); - - void foo(int i); -}; - -template <class T, class U> -void S::foo(T t, U u) -{ - printf ("T,U version\n"); -} - - -template <class U> -void S::foo(char*, U u) -{ - printf ("char*,U version\n"); -} - - -void S::foo(int i) -{ - printf ("int version\n"); -} - - -int main() -{ - S s; - s.foo(3); - s.foo(3, 3); - s.foo("abc", s); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp23.C deleted file mode 100755 index 5310b62..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp23.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - S() - { printf ("In S::S()\n"); f(3); } - - S(char) - { printf ("In S::S(char)\n"); f(*this); } - - template <class U> - void f(U u) - { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); } - - int c[16]; -}; - -int main() -{ - S<char*> s; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp24.C deleted file mode 100755 index b1bfac1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp24.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - S() - { printf ("In S::S()\n"); f(3); } - - S(char) - { printf ("In S::S(char)\n"); f(*this); } - - template <class U> - void f(U u) - { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); } - - int c[16]; -}; - -int main() -{ - S<char*> s; - S<char*> s2('a'); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp25.C deleted file mode 100755 index 672a9c8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp25.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - template <class U> - void f(U u) { printf ("%d\n", sizeof (U)); } - - int i[4]; -}; - - -int main() -{ - S<char*> s; - s.f(3); - s.f(s); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp26.C deleted file mode 100755 index cbfc93e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp26.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - template <class U> - void f(U u); - - int i[4]; -}; - - -template <class X> -template <class U> -void S<X>::f(U u) -{ - printf ("%d\n", sizeof (U)); -} - - -int main() -{ - S<char*> s; - s.f(3); - s.f(s); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp27.C deleted file mode 100755 index b1bfac1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp27.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - S() - { printf ("In S::S()\n"); f(3); } - - S(char) - { printf ("In S::S(char)\n"); f(*this); } - - template <class U> - void f(U u) - { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); } - - int c[16]; -}; - -int main() -{ - S<char*> s; - S<char*> s2('a'); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C deleted file mode 100755 index 37e79c8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C +++ /dev/null @@ -1,27 +0,0 @@ -extern "C" void abort(); - -int k; - -template <class X> -struct S -{ - template <class U> - void f(U u) - { ++k; g(u); } - - template <class U> - void g(U u) - { ++k; } - - int c[16]; -}; - -int main() -{ - S<char*> s; - s.f(3); - s.f("adf"); - - if (k != 4) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp29.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp29.C deleted file mode 100755 index 4000070..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp29.C +++ /dev/null @@ -1,32 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - template <class U> - void f(U u); - - template <class U> - void g(U U); - - int c[16]; -}; - -template <class X> -template <class U> -void S<X>::f(U u) - { printf ("In S::f(U)\n"); g(u); } - -template <class X> -template <class U> -void S<X>::g(U u) - { printf ("In S::g(U)\n"); } - -int main() -{ - S<char*> s; - s.f(3); - s.f("adf"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp3.C deleted file mode 100755 index 2a4dbb8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp3.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T> - void foo(T); -}; - - -template <class T> -void S::foo(T) -{ - printf("Hello, world.\n"); -} - - - -int main() -{ - S s; - s.foo(3); - s.foo(s); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp30.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp30.C deleted file mode 100755 index 923ec85..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp30.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - template <class U> - void g(U u) { this; } -}; - - -int main() -{ - S<char*> s; - s.g(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp31.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp31.C deleted file mode 100755 index 3bb1cd3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp31.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S -{ - template <class U> - void g(U u) - { this; } -}; - -int main() -{ - S s; - s.g(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp32.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp32.C deleted file mode 100755 index 3f0bfc7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp32.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S -{ - template <class U> - void g(U u) - { i = 3; } - - int i; -}; - -int main() -{ - S s; - s.g(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp33.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp33.C deleted file mode 100755 index 500abe0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp33.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class T> -struct S -{ - template <class U> - void g(U u) - { i; } - - int i; -}; - -int main() -{ - S<char> s; - s.g(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp34.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp34.C deleted file mode 100755 index 29e1101..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp34.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - static void f(U u) - {} -}; - -int main() -{ - S<int>::f(3); - S<char>::f("abc"); - S<int>::f("abc"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp35.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp35.C deleted file mode 100755 index 7603d94..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp35.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - S(const S& s) {} - - template <class U> - S(S<U>& s) - { - S<U> s2(s); - } -}; - - -extern S<int>& si; - -void foo() -{ - S<char*> sc(si); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp36.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp36.C deleted file mode 100755 index 6c57a97..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp36.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class X> -struct R -{ -}; - - -template <class T> -struct S -{ - template <class U> - S(R<U> r); -}; - - -void foo() -{ - R<int> r; - S<char*> s(r); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp37.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp37.C deleted file mode 100755 index 186083b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp37.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - void f(U u); -}; - - -template <class T> -template <class U> -void S<T>::f(U) -{ -} - -enum -{ - a = 3 -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp39.C deleted file mode 100755 index 146d329..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp39.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct S -{ - template <class U> - void f(U u) { g(u); } - - template <class U> - void g(U u) { f(u); } -}; - -void foo() -{ - S<int> si; - si.f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp4.C deleted file mode 100755 index b9f9c16..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp4.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S { - template <class T> - void operator+(T); -}; - - -template <class T> -void S::operator+(T) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp40.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp40.C deleted file mode 100755 index 70506f0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp40.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class T> -struct R -{ - template <class U> - void g(U u) {} -}; - -template <class T> -struct S -{ - template <class U> - void f(U u) { R<T> r; r.g(u); } -}; - -void foo() -{ - S<int> si; - si.f("abc"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp41.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp41.C deleted file mode 100755 index 603f702..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp41.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <int i> -struct S -{ - static void foo() {} -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp42.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp42.C deleted file mode 100755 index 3c11dd4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp42.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<class T, int N> -class Foo { - -public: - template<int N2> - Foo<T,N> operator=(const Foo<T,N2>& z) - { - return Foo<T,N>(); - } -}; - -int main() -{ - Foo<double,4> x; - Foo<double,7> y; - x = y; - - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp43.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp43.C deleted file mode 100755 index 3d8e3ad..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp43.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<class T, int N> -class A -{ -public: - template<class U> - void operator=(A<U, N> const & a) { return; } -}; - -int main() -{ - A<float, 3> a; - A<double, 3> b; - a = b; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp44.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp44.C deleted file mode 100755 index c8d6f16..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp44.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<class T> -class A -{ -}; - -template<> -class A<float> -{ -public: - template<class U> - void func(U v1) {} -}; - -int main() -{ - A<float> a; - a.func(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp45.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp45.C deleted file mode 100755 index d71f25d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp45.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<class T> -class A -{ -}; - -template<> -class A<float> -{ -public: - template<class U> - void func(U v1 = 0) {} -}; - -int main() -{ - A<float> a; - a.func(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp46.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp46.C deleted file mode 100755 index 2212a52..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp46.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<class T, class U> -class A -{ -}; - -template<class U> -class A<float, U> -{ -public: - template <class V> - void func(V v1 = 0) {} -}; - -int main() -{ - A<float, int> a; - a.func("abc"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp47.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp47.C deleted file mode 100755 index e4f7ebf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp47.C +++ /dev/null @@ -1,29 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -template <class X> -struct S -{ - template <class U> - void g(U u) - { printf ("In S::g(U)\n"); } - - int c[16]; -}; - - -template <class X> -struct T : public S<X> -{ - template <class U> - void f(U u) - { printf ("In T::f(U)\n"); g(u); } -}; - -int main() -{ - T<char*> t; - t.f(3); - t.f("adf"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp48.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp48.C deleted file mode 100755 index 8ce6f66..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp48.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S -{ - template <class T> - void f(T t1, T t = T()) - {} -}; - - -void foo() -{ - S si; - si.f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp49.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp49.C deleted file mode 100755 index f2d610f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp49.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <class X> -struct S -{ - template <class T> - void f(T t1, T t = T()) - {} -}; - - -void foo() -{ - S<int> si; - si.f(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp5.C deleted file mode 100755 index 14647a3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp5.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T> - void operator+(T); -}; - - -template <class T> -void S::operator+(T) -{ - printf("Hello, world.\n"); -} - - - -int main() -{ - S s; - s + 3; - s + s; - s.operator+("Hi"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp52.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp52.C deleted file mode 100755 index 25dc7e7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp52.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template<class T, int N> -class A { }; - -template<int N> -struct X { - template<class T2, int N2> - void f(A<T2,N>&, A<int,N2>&) - { } -}; - - -void foo() -{ - X<3> x; - A<char*, 3> a1; - A<int, 2> a2; - x.f(a1, a2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp53.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp53.C deleted file mode 100755 index 4fd65b9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp53.C +++ /dev/null @@ -1,36 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -template<int N> -struct I { -}; - -template<class T> -struct A { - - int r; - - template<class T1, class T2> - void operator()(T1, T2) - { r = 0; } - - template<int N1, int N2> - void operator()(I<N1>, I<N2>) - { r = 1; } -}; - -int main() -{ - A<float> x; - I<0> a; - I<1> b; - - x(a,b); - if (x.r != 1) - return 1; - - x(float(), double()); - if (x.r != 0) - return 1; - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp55.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp55.C deleted file mode 100755 index b955189..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp55.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template<class X> class _bz_update { }; - -template<class T> -struct S { -template<int N_destRank> -void foo() { _bz_update<int>(); } -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp56.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp56.C deleted file mode 100755 index ef6b286..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp56.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template<class P_numtype, int N_length> -class TinyVector {}; - -template<class P_numtype, int N_rank> -struct Array -{ - template<int N_rank2> - Array() {} - - template<int N_rank2> - P_numtype operator()(const TinyVector<int,N_rank2>& index) const {} -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp58.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp58.C deleted file mode 100755 index 38c2953..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp58.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template<int N, class T> -struct B { -}; - -template<int N1, int N2, int N3> -struct D { - struct E { - template<int N4, class T> - static void f(B<N4,T>) - { } - }; -}; - -template<int N> -struct A { - template<int N2, class T, int N3> - static void f(B<N2,T>, B<N3,T> b) - { - typedef typename D<N2,N3,N>::E E; - E::f(b); - } -}; - -void foo() -{ - A<5>::f(B<5,float>(),B<3,float>()); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp59.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp59.C deleted file mode 100755 index fbdc0d8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp59.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -template <int N> -struct IndexPlaceholder {}; - -template <int N1, int N2, int N3> -struct ArrayIndexMapping {}; - -template <class T_numtype, int N_rank> -struct Array -{ - template<int N0, int N1> - ArrayIndexMapping<N_rank, N0, N1> - f(IndexPlaceholder<N0>, IndexPlaceholder<N1>); -}; - - -template <class T_numtype> -void foo(T_numtype) -{ - Array<T_numtype, 1> t; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp6.C deleted file mode 100755 index 6989a7d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp6.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S { - template <class T, class U> - S(T, U, T); -}; - - -template <class T, class U> -S::S(T, U, T) -{ -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp60.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp60.C deleted file mode 100755 index 7358d72..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp60.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed membertemplates -template <class T> -struct S -{ - S(const S<T>& x) {} - - template <class U> - S(const S<U>& x) {} -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp61.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp61.C deleted file mode 100755 index 1fdb055..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp61.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed membertemplates -struct S -{ - template <class T> - void foo(T t); -}; - - -template <> -void S::foo(int i) -{ -} - - -int main() -{ - S s; - s.foo(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp62.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp62.C deleted file mode 100755 index 8cfadef..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp62.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't run: -// GROUPS passed membertemplates -struct S -{ - template <class T> - void foo(T t); -}; - - -template <> -void S::foo<int>(int i) -{ -} - - -int main() -{ - S s; - s.foo(3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp63.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp63.C deleted file mode 100755 index 4f793d4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp63.C +++ /dev/null @@ -1,13 +0,0 @@ -template <class T> struct A { - template <class U> void f (U u); -}; - -A<int> a; - -template <class T> template <class U> void A<T>::f (U u) { } - -int main() -{ - a.f (24); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp64.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp64.C deleted file mode 100755 index 6185d3d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp64.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 {}; - -template <class T> -void f(T); - -template <class C> -struct S2 -{ - template <class T> - void f<S1<T> >(T) {} // ERROR - bad specialization. -}; - - -template <class T> -struct S3 -{ - friend class S2<T>; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp65.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp65.C deleted file mode 100755 index ef49d84..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp65.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -template<unsigned int n> struct PartialDotProduct { - template<class T> - static T Expand(T* a, T* b) { return T(); } -}; - -const int N = 10; - -template<class In1, class In2> -void -dot(In1 f1, In2 f2) -{ - PartialDotProduct<N>::Expand(f1, f2); - -} - -int main() -{ - double a[N], b[N]; - - dot(&a[0], &b[0]); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp66.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp66.C deleted file mode 100755 index d7c1f57..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp66.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - template <class U> - void f(U u) { this->template f<>(3); } -}; - - -void g() -{ - S<char> s; - s.f(1.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp67.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp67.C deleted file mode 100755 index 7170c90..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp67.C +++ /dev/null @@ -1,19 +0,0 @@ -template <class T> -struct A -{ - template <class T2> - operator A<T2>() const { return A<T2>(); } -}; - -int main() -{ - A<int> a1; - A<long> a2; - A<double> a3; - A<char> a4; - - a2 = a1.operator A<long>(); - a3 = (A<double>) a1; - a4 = a1; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp68.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp68.C deleted file mode 100755 index 96a0814..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp68.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - - struct locale - { - template<class _Facet> - locale (const locale&, _Facet*); - locale(int*) throw(); - }; - void f(int* p) { locale keep (p); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp69.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp69.C deleted file mode 100755 index 4c9a2a9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp69.C +++ /dev/null @@ -1,35 +0,0 @@ -struct S -{ - template <class T> - void f(T (&i)[7]) - {} - - void g() - { - int i[] = {1, 2, 3, 4, 5, 6, 7}; - f(i); - int j[7]; - f(j); - } -}; - -struct foo { - template <typename T, int N> - static T* array_end(T(&array)[N]) { return &array[N]; } -}; - -struct X -{ - template <class T1> - void f(const T1&) {} -}; - -int main(int ac, char* av[]) { - S s; - s.g(); - int i[] = {1,2,3,4,5}; - int* e = foo::array_end(i); - X x; - x.f("hello"); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp7.C deleted file mode 100755 index 2dee058..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp7.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T, class U> - S(T, U, T); -}; - - -template <class T, class U> -S::S(T t1, U u1, T t2) -{ - printf("Hello, world.\n"); -} - - -int main() -{ - S s1(3, "abc", 3); - S s2('a', s1, 'a'); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp70.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp70.C deleted file mode 100755 index 2a9fe8a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp70.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -template <class T> -class X { -public: - T x; -}; - -class Y { -public: - template <class T> static void f(X<T>& a) {} - - void g(void); -}; - -void -Y::g(void) -{ - X<int> a; - - f(a); -} - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp71.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp71.C deleted file mode 100755 index 38cf5c7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp71.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -class A -{ - template<class T>T epsilon; // ERROR - invalid member template -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp72.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp72.C deleted file mode 100755 index 52332c6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp72.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -template<class P> struct B -{ - template<class T> void f(T& t) { t = T(); } -}; - -enum ptype { t1, t2}; - -struct D : public B<ptype> -{ - void g(double& d) { f(d); } -}; - - -D d; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp73.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp73.C deleted file mode 100755 index 5732d49..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp73.C +++ /dev/null @@ -1,18 +0,0 @@ -template <class T> struct A { - template <class U> void f(U); -}; - -template <int i> struct B { }; - -template <class T> template <class U> -void A<T>::f (U) -{ - enum { foo }; - B<foo> b; -} - -int main () -{ - A<char> a; - a.f (42); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp74.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp74.C deleted file mode 100755 index e99103f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp74.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -template <class T> -class S -{ -protected: - template <class U> - void f(U); // ERROR - is protected - -private: - template <class U> - void g(U); // ERROR - is private -}; - - -void f() -{ - S<double> s; - s.f(3); // ERROR - within this context - s.g(2.0); // ERROR - within this context -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp75.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp75.C deleted file mode 100755 index 4ff38b6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp75.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -void -print(const int& i) -{ -} - -template<class A> -class bar -{ -public: - template<void (*B)(const A& a)> - void doit(const A& a) - { - B(a); - } -}; - - -int -main() -{ - bar<int> b; - b.template doit<print>(2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp76.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp76.C deleted file mode 100755 index b202851..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp76.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -class base -{ -public: - virtual void method()=0; -}; - -class der: public base -{ -public: - template<class C> - void method() - { - C foo; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C deleted file mode 100755 index ca4cf20..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C +++ /dev/null @@ -1,25 +0,0 @@ -extern "C" int strcmp(const char*, const char*); - -template <class T> -struct S3 -{ - template <class U> - static char* h(U); -}; - -template <> -template <> -char* S3<double>::h(int) { return __PRETTY_FUNCTION__; } - -template <> -template <> -char* S3<char>::h(int) { return __PRETTY_FUNCTION__; } - -int main() -{ - if (strcmp (S3<double>::h(7), - "static char * S3<double>::h<int>(int)") == 0) - return 0; - else - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp78.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp78.C deleted file mode 100755 index 945e7ff..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp78.C +++ /dev/null @@ -1,56 +0,0 @@ -// Build don't link: - -struct A -{ - void f() {} - - template <class U> - void f() {} -}; - - -template <class T> -struct B -{ - void f() {} - - template <class U> - void f() {} -}; - -template struct B<int>; - -struct C -{ - template <class U> - void f() {} - - template <class U> - void f() {} // ERROR - redeclaration -}; - - -template <class T, class U> -struct D -{ - void f(T); - void f(U); -}; - -template struct D<int, double>; - -template <class T, class U> -struct D2 -{ - void f(T); - void f(U); // ERROR - redeclaration -}; - -template struct D2<int, int>; - -struct E -{ - void f(); - void f(); // ERROR - redeclaration -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp79.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp79.C deleted file mode 100755 index 4eeffde..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp79.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -struct foo { - template<typename T> static void bar( foo* ); - template<typename T> void bar() const; // gets bogus error - quals XFAIL *-*-* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp8.C deleted file mode 100755 index 1bf0890..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp8.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates membertemplates -struct S { - template <class T> - operator T(); -}; - - -template <class T> -S::operator T() -{ -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp80.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp80.C deleted file mode 100755 index 61a2fb8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp80.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template<typename T> T baz() { return 0; } - -struct foo { - template<typename T> static T staticbar() { return 0; } - template<typename T> T bar() { return 0; } -}; - -void f() -{ - foo t; - int i = baz<int>(); - int j = foo::staticbar<int>(); - int k = t.bar<int>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp81.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp81.C deleted file mode 100755 index 1584f88..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp81.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -template <int i> class a -{ -public : -int k; - -template <int j> int f() const { return this->f<j-1>(); } - -int g() const { return f<i>(); }; -}; - -template <> -template <> -int a<2>::f<0>() const { - return 0; -} - -int main() -{ -a<2> x; -return x.g(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp82.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp82.C deleted file mode 100755 index 9abd390..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp82.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// excess errors test - XFAIL *-*-* - -struct foo { - template<typename T> T bar() { return staticbar<T>( this ); } - template<typename T> static T staticbar( foo* ) { return 0; } -}; - -void f() -{ - foo t; - int k = t.bar<int>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp9.C deleted file mode 100755 index 943dbfb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp9.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: -// GROUPS passed templates membertemplates -extern "C" int printf(const char*, ...); - -struct S { - template <class T> - operator T(); -}; - -template <class T> -S::operator T() -{ - printf("Hello, world.\n"); - return T(); -} - -int main() -{ - S s; - - int i = s.operator int(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/mi1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/mi1.C deleted file mode 100755 index 8282261..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/mi1.C +++ /dev/null @@ -1,75 +0,0 @@ -// Test that binfos aren't erroneously shared between instantiations. - -class PK_CryptoSystem -{ -}; -class PK_Encryptor : public virtual PK_CryptoSystem -{ -}; -class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem -{ -public: - virtual unsigned int CipherTextLength() const =0; -}; -class PK_FixedLengthEncryptor : public virtual PK_Encryptor, public virtual PK_FixedLengthCryptoSystem -{ -}; -class PK_SignatureSystem -{ -public: - virtual ~PK_SignatureSystem() {}; -}; -class PK_Signer : public virtual PK_SignatureSystem -{ -public: - virtual void Sign() = 0; -}; -class PK_Verifier : public virtual PK_SignatureSystem -{ -}; -class PK_Precomputation -{ -}; -template <class T> class -PK_WithPrecomputation : public T, public virtual PK_Precomputation -{ -}; -typedef PK_WithPrecomputation<PK_FixedLengthEncryptor> PKWPFLE; -typedef PK_WithPrecomputation<PK_Signer> PKWPS; -template <class EC> class -ECPublicKey : public PKWPFLE -{ -public: - unsigned int CipherTextLength() const { return 1; } - EC ec; -}; -template <class EC> -class ECPrivateKey : public ECPublicKey<EC>, public PKWPS -{ - void Sign() {} - int d; -}; -template <class EC> -class ECKEP : public ECPrivateKey<EC> -{ -}; -class GF2NT : public PK_CryptoSystem -{ - int t1; -}; -class EC2N : public PK_CryptoSystem -{ - GF2NT field; - int a; -}; -template class ECKEP<EC2N>; -template class ECKEP<int>; - -int -main () -{ - ECKEP<EC2N> foo; - - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/nested1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/nested1.C deleted file mode 100755 index 3df7c47..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/nested1.C +++ /dev/null @@ -1,47 +0,0 @@ -// Build don't link: - -template <class T1,class T2> -struct X -{ - T1 a; - - struct Y - { - T2 x; - Y (T2 _x) { x=_x; } - }; - -}; - -template <class T1> -struct X<T1,int> -{ - T1 a; - - struct Y - { - int x; - Y (int _x) { x=_x; } - }; - -}; - -template <> -struct X<int,int> -{ - int a; - - struct Y - { - int x; - Y (int _x) { x=_x; } - }; - -}; - -void f () -{ - X<char,char> t1; - X<char,int> t2; - X<int,int> t3; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01.C deleted file mode 100755 index 6dcf9d3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class T> struct A {}; -template <class T> struct B : A<B<T> > {}; - -B<int> x; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01a.C deleted file mode 100755 index 027f2ae..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01a.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -struct A { - friend struct B : A { // ERROR - - int x; - }; - int y; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01b.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01b.C deleted file mode 100755 index fa2e5ac..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas01b.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class T> struct A { T *t; inline A() { t = 0; } }; -template <class T> struct B : A<B<T> > { int x; inline B() { x = 3; } }; - -B<int> x; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas02.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas02.C deleted file mode 100755 index b4d300d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas02.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -struct B { int foo (); }; -int B::foo() { return 37; } - -template <class A> struct X { - void f(int); -}; - -template <class A> void X<A>::f (int jj) -{} - -X<int> x; - -void xxx () { x.f (1); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas03.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas03.C deleted file mode 100755 index 29b1972..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/niklas03.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class A> struct X { - A operator[] (int); -}; - -template <class A> A X<A>::operator[] (int i) -{ - return A(); // gets bogus error -} - -X<int> x; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype1.C deleted file mode 100755 index 120282a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -template<int N_length> -struct B -{ - B(); - ~B(); -}; -template<class P, int N> -struct D -{ - D(int r0); - D(B<N-1> &, int); -}; -template<class T> -void func() -{ - D<T,1> tmp; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype2.C deleted file mode 100755 index e181411..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -enum E { }; - -template <const E* ep> -struct S1 -{ -}; - - -struct S2 -{ - static E es[1]; -}; - - -struct S3 -{ - typedef S1<S2::es> S3_Type; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype3.C deleted file mode 100755 index d6f3394..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype3.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: - -enum E { e }; - -template <const E* ep> -struct S1 -{ - static char* s; -}; - -template <int D> -struct S2 {}; - -template <> -struct S2<1> -{ - static E es[1]; -}; - -struct S3 -{ - typedef S1<S2<1>::es> S3_Type; -}; - -E S2<1>::es[1] = {e}; - -template <> -char* S1<S2<1>::es>::s = "abc"; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype4.C deleted file mode 100755 index 2aa38b1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/nontype4.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: - -template <class R, void (R::* A) (void)> -class s -{ -public: - s (R &r) : _r (r) {} - - void e (void) { (_r.*A) (); } - -private: - R &_r; -}; - -class x -{ -public: - void test1 (void) { int j = 0; } - void test2 (void) { int j = 1; } -}; - -int -main (void) -{ - x r; - - s<x, &x::test1> c4 (r); - s<x, &x::test2> c5 (r); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload1.C deleted file mode 100755 index 25a40b1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload1.C +++ /dev/null @@ -1,15 +0,0 @@ -template <class T> struct B { }; - -template <class T> struct A { - template <class U, class V> int operator () (U u, V v); - template <class U, class V> void operator () (B<U> u, B<V> v) { } -}; - -int -main () -{ - A<int> a; - B<char> b1; - B<short> b2; - a (b1, b2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload10.C deleted file mode 100755 index 19dd174..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload10.C +++ /dev/null @@ -1,16 +0,0 @@ -struct B { - int f(int) { return 1; } -}; - -struct D { - template <class T> - int f(T) { return 0; } -}; - -int main() -{ - int (D::*g)(int) = &D::f; - - D d; - return (d.*g)(0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload11.C deleted file mode 100755 index 300d91e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload11.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't run: - -template <class T> -int f(int (*fn)(T)) -{ - return (*fn)(3); -} - -struct S { - static int g(int) { return 1; } - static void g(); - - int h(); -}; - -int S::h() -{ - return f(&g); -} - - -int main() -{ - S s; - if (s.h () != 1) - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload2.C deleted file mode 100755 index 809fac4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload2.C +++ /dev/null @@ -1,16 +0,0 @@ -//Build don't link: -template<class T> -class C -{ -public: - C<T*> O(); - C<T*> O() const; -}; - - -int -main() -{ - C<char*> c; - char* p = Z(c.O); //ERROR - ambiguous c.O -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload3.C deleted file mode 100755 index a716917..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload3.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <class T> -void g(T, T); - -template <class T> -void g(int*, T); - -struct S -{ - void f() const - { - g(X, X+3); - } - - double X[3]; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload4.C deleted file mode 100755 index f4e58e2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload4.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T> void foo(T); - -template <class T> void bar(void (*)(T), T); - -void baz() { - bar<int>(foo, 1); - bar(foo<int>, 1); - bar<int>(foo<int>, 1); - bar(foo, 1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload5.C deleted file mode 100755 index 058f4f4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload5.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class T> void foo(); // ERROR - candidate - -void (*bar)() = foo<void>; -void (*baz)() = foo; // ERROR - can't deduce T diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload6.C deleted file mode 100755 index 10f793a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload6.C +++ /dev/null @@ -1,13 +0,0 @@ -// Check that foo<int> isn't resolved too early. - -template <class T> void foo(T*); -template <class T, class U> void foo(T*, U) { } - -template <class T, class U> void bar(void (*)(T, U), U) { } - -int main() { - bar<int*>(&foo, 1); - bar<int*>(&foo<int>, 1); - bar<int*>(foo, 1); - bar<int*>(foo<int>, 1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload7.C deleted file mode 100755 index bfd8b5a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload7.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -// Adapted from testcase by Corey Kosak <kosak@cs.cmu.edu> - -template<class T> -struct moo_t { - struct cow_t {}; -}; - -template<class T> void foo(typename moo_t<T>::cow_t) {} - -template<class T> void foo(moo_t<T>) { - typename moo_t<T>::cow_t p; - foo(p); // gets bogus error - no matching function for call - XFAIL *-*-* -} - -int main() { - moo_t<int> x; - foo(x); // gets bogus error - instantiated from here - XFAIL *-*-* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload8.C deleted file mode 100755 index 9f38a5c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload8.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -// Simplified from bug report by Tim Rowley <tor@cs.brown.edu> - -struct baz; - -void operator*(baz&, double); - -template <class T> inline T operator*(double s, const T &p) - ; // gets bogus error - must have argument of class type - XFAIL *-*-* - -void m(baz& a) { a * .5; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/overload9.C deleted file mode 100755 index bd9eeb1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/overload9.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class T> -int f(T) -{ - return 1; -} - - -template <class T> -int f(T*) -{ - return 0; -} - - -int main() -{ - int (*h)(int*) = &f; - int (&k)(int*) = f; - - return (*h)(0) || (*k)(0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/partial1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/partial1.C deleted file mode 100755 index 7a92996..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/partial1.C +++ /dev/null @@ -1,26 +0,0 @@ -template<class T_type, int N> -class foo { -public: - enum bar { z = 0 }; -}; - -template<int N> -class foo<double, N> { -public: - enum bar { z = 1 }; -}; - -template<class T_type> -class foo<T_type, 2> { -public: - enum bar { z = 2 }; -}; - -int main() -{ - if ((foo<int,3>::z == 0) && (foo<double,3>::z == 1) - && (foo<float,2>::z == 2)) - return 0; - else - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/partial2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/partial2.C deleted file mode 100755 index cdf2199..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/partial2.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: -// Tests partial specialization -template<class T> struct foo1 {}; -template<class T, int n> struct foo1<T[n]>; -foo1<char> bar1; -foo1<char[10]> baz1; // ERROR - incomplete type - -template<class T> struct foo2 {}; -template<class T, unsigned n> struct foo2<T[n]>; -foo2<char> bar2; -foo2<char[10]> baz2; // ERROR - incomplete type - -typedef unsigned int other1_t; -template<class T> struct foo3 {}; -template<class T, other1_t n> struct foo3<T[n]>; -foo3<char> bar3; -foo3<char[10]> baz3; // ERROR - incomplete type - - -typedef int other2_t; -template<class T> struct foo4 {}; -template<class T, other1_t n> struct foo4<T[n]>; -foo4<char> bar4; -foo4<char[10]> baz4; // ERROR - incomplete type - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/pointer1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/pointer1.C deleted file mode 100755 index f854976..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/pointer1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -template <class T> -struct S1 -{ -}; - -template <class T> -struct S2 -{ - typedef T* pointer_t; -}; - -int f(S2<S1<int> >::pointer_t p1, S2<S1<int> >::pointer_t p2) -{ - return (int) (p1 - p2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem1.C deleted file mode 100755 index e14c726..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem1.C +++ /dev/null @@ -1,18 +0,0 @@ -class foo -{ -public: - template<class T> - T bar() { return 7; } -}; - -int -main() -{ - foo f; - - int (foo::*s)() = &foo::template bar<int>; - if ((f.*s)() == 7) - return 0; - else - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem2.C deleted file mode 100755 index c6927d1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem2.C +++ /dev/null @@ -1,43 +0,0 @@ -struct S; - -template <S* (S::*p)()> -struct F { - S* f (S& s) - { - return (s.*p)(); - } -}; - -template <int S::*p> -struct D { - void d (S& s) - { - (s.*p) = 3; - } -}; - -struct S { - S* g (); - int i; - F<&S::g> fg; - D<&S::i> di; - S* h(), k(F<&S::h>); - F<&S::g> fg2; - D<&S::i> di2; -}; - -S* S::g() -{ - return this; -} - -int main() -{ - S s; - s.i = 2; - s.di.d (s); - if (s.i != 3) - return 1; - if (s.fg2.f(s) != &s) - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem3.C deleted file mode 100755 index 8b7c373..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -template <class T> -struct S : public S<T*> {}; -template <> -struct S<int**> {}; - -void g() -{ - int S<int*>::*p; - int S<int>::*q = p; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem4.C deleted file mode 100755 index 139be92..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem4.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't run: - -template<class T,class T1> -int connect_to_method(T* receiver, - int (T1::*method)()) -{ - return (receiver->*method)(); -} - -class Gtk_Container -{ -public: - int remove_callback() { return 1; } - void remove_callback(int); - int f(); -}; - -int Gtk_Container::f() -{ - return connect_to_method(this, &Gtk_Container::remove_callback); -} - -int main() -{ - Gtk_Container gc; - if (gc.f () != 1) - return 1; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem5.C deleted file mode 100755 index c9e6c9b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ptrmem5.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -// Based on testcase by adriang@campbellsoft.com - -struct Null { - template <typename T> operator T*() { return 0; } - template <typename C, typename T> operator T C::*() { return 0; } -#if WORK_AROUND - typedef int pmf(); - template <typename C> operator pmf C::* () { return 0; } -#endif -} NULL; - -int *pd = NULL; -int (*pf)() = NULL; -int Null::*pmd = NULL; -int (Null::*pmf)() = NULL; // gets bogus error - cannot convert - XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion.C deleted file mode 100755 index 7efaeb0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: - -const double M_PI=3.14159265358979323846; - -template<int N,int I,int J,int K> -inline double SineSeries() -{ - const double x=I*2*M_PI/N; - const bool go=K+1!=J; - return 1.0-x*x/(2*K+2)/(2*K+3)*SineSeries<N*go,I*go,J*go,(K+1)*go>(); -} - -template<> -inline double SineSeries<0,0,0,0>() -{ - return 1.0; -} - -template<int N,int I> -inline double Sine() -{ - const double x=(I*2*M_PI/N); - return x * SineSeries<N,I,10,0>(); -} - -int main() -{ - double f=Sine<32,5>(); - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion2.C deleted file mode 100755 index 8cb3a2b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/recursion2.C +++ /dev/null @@ -1,25 +0,0 @@ -template< int i > struct T : -public T< i-1 > -{ -}; - -template<> struct T< 0 > -{ -}; - -template< class F > struct T1 : -public T< F::dim > -{ -}; - -template< int i > struct S -{ - enum { dim = i } ; -}; - -int main() -{ - T1< S< 4 > > t ; - return( 0 ) ; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl1.C deleted file mode 100755 index 283d83f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl1.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -template <class T> -struct S1; // ERROR - previous declaration - -template <class T, class U> -struct S1 {}; // ERROR - used 1 template parameter - -template <class T = int> // ERROR - original def of default -struct S2; - -template <class T = int> -struct S2; // ERROR - redefinition of default - -template <class T> // ERROR - template parameter -struct S3; - -template <int I> -struct S3; // ERROR - redeclared here - -template <template <class T> class C> -struct S3; // ERROR - redeclared here diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl2.C deleted file mode 100755 index 0b65e1e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/redecl2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct A -{ - template <class A> - void f(A) {} -}; - -void g() -{ - A a; - a.f(3); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ref1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ref1.C deleted file mode 100755 index 8b117a5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ref1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -int i; - -template <void (&FN)()> -void g () -{ - FN (); -} - -void h () -{ - i = 7; -} - -template void g<h>(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/scope1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/scope1.C deleted file mode 100755 index cfd9cdf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/scope1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -template<class X, class Z> -class foo -{ -public: - typedef X y; - - class bar { - public: - void blah () { y Y; } - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/shadow1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/shadow1.C deleted file mode 100755 index dfe99c7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/shadow1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -template <class T> -struct S { - typedef T X; - - class C { - typedef T X; - }; -}; - -template <int I> -struct S2 { - enum { A = I }; - - void f() { - int A; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof.C deleted file mode 100755 index 41915b3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof.C +++ /dev/null @@ -1,17 +0,0 @@ -extern "C" void abort(); - -template <int I> -int bar() { return I; } - -template <class T> -int foo(T) -{ - return bar<sizeof(T) + 4>() + bar<sizeof(long) + 7>(); -} - - -int main() -{ - if (foo(2) != sizeof(int) + 4 + sizeof(long) + 7) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof2.C deleted file mode 100755 index 566665a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Although template class B is not used at all, it causes the -// incorrect specialization of A to be selected - -// Adapted from testcase by Oskar Enoksson <osken393@student.liu.se> - -extern "C" void abort(); - -template<int N, class T> // Base class -class A { public: static int n() { return sizeof(T); } }; - -template<int N> // Derived #1 -class B: public A<N,char[N]> {}; - -template<int N, int M> // Derived #2 (wrong!) -class C: public A<N,char[M]> {}; - -int main() { - if (C<1,2>::n() != 2) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof3.C deleted file mode 100755 index cd5f701..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/sizeof3.C +++ /dev/null @@ -1,25 +0,0 @@ -// Adapted from testcase by Oskar Enoksson <osken393@student.liu.se> - -extern "C" void abort(); - -template<class T0> -class A { -public: - typedef T0 T; -}; - -template<int K> -class B { - typedef A<char[K]> BC; -}; - -template<int N, int M> -class C { -public: - typedef A<char[M]> AC; -}; - -int main() { - if (sizeof(C<3,7>::AC::T) != 7) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec1.C deleted file mode 100755 index 7467293..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec1.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -template <class S, class T> -class mem_fun1_t { -public: - mem_fun1_t(S (T::*pf)(double)) {} -}; - -template <class T> -class mem_fun1_t<void, T> { -public: - mem_fun1_t(void (T::*pf)(double)) {} -}; - -struct Operation { - double eval(double) {} -}; - -int main() { - mem_fun1_t<double, Operation> m(&Operation::eval); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec10.C deleted file mode 100755 index 5d53e2d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec10.C +++ /dev/null @@ -1,27 +0,0 @@ -extern "C" void abort(); - -template <class T> -struct S -{ - template <int i> - int f(int j) { abort(); return 0; } -}; - -template <> -template <> -int S<double>::f<7>(int j) { return j + 7; } - -template <> -template <> -int S<double>::f<8>(int j) { return j + 8; } - -int main() -{ - S<double> s; - - if (s.template f<7>(3) != 10) - abort(); - - if (s.template f<8>(3) != 11) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec11.C deleted file mode 100755 index 340b58e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec11.C +++ /dev/null @@ -1,20 +0,0 @@ -extern "C" void abort(); - -template <class T> -struct S -{ - template <class U> - int f(U u); -}; - -template <> -template <> -int S<char>::f(int i) { return 1; } - -int main() -{ - S<char> sc; - - if (sc.f(3) != 1) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec12.C deleted file mode 100755 index d9c3965..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec12.C +++ /dev/null @@ -1,21 +0,0 @@ -extern "C" void abort(); - -template <class T> -struct S -{ - template <class U> - int f(U u); -}; - - -template <> -template <> -int S<char>::f<int>(int i) { return 1; } - -int main() -{ - S<char> sc; - - if (sc.f(3) != 1) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec13.C deleted file mode 100755 index e5748f5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec13.C +++ /dev/null @@ -1,43 +0,0 @@ -template <class T> -void f(T t); - -template <class T> -void f(T* t); - -template <> -void f(int* ip) {} - -struct S1 -{ - template <class T> - void f(T t); - - template <class T> - void f(T* t); -}; - -template <> -void S1::f(int* ip) {} - -template <class U> -struct S2 -{ - template <class T> - void f(T t); - - template <class T> - void f(T* t); -}; - -template <> -template <> -void S2<double>::f(int* ip) {} - -int main() -{ - int* ip; - S1 s1; - s1.f(ip); - S2<double> s2; - s2.f(ip); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec14.C deleted file mode 100755 index 0380c61..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec14.C +++ /dev/null @@ -1,9 +0,0 @@ -class X -{ -public: - template <typename A, typename B, typename C> - X() {} - - template <typename A, typename B> - X::X<A, void, B>() {} // ERROR - non-template type used as a template -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec15.C deleted file mode 100755 index 2e97b04..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec15.C +++ /dev/null @@ -1,49 +0,0 @@ -extern "C" void abort(); - -template <class T> -struct S1 -{ - static void f(); -}; - -template <> -void S1<int>::f() {} - -struct S2 -{ - template <class T> - static void g(T); -}; - -template <> -void S2::g(double) {} - -template <> -void S2::g<int>(int) {} - -template <class T> -struct S3 -{ - template <class U> - static int h(U); -}; - -template <> -template <> -int S3<double>::h(int) { return 0; } - -template <> -template <> -int S3<char>::h(int) { return 1; } - -int main() -{ - S1<int>::f(); - S2::g(3.0); - S2::g(7); - - if (S3<double>::h(7) != 0) - abort(); - if (S3<char>::h(7) != 1) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec16.C deleted file mode 100755 index 9f6da97..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec16.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -template<class K> -struct A { - int foo(const K&); - int bar(const K&); -}; - -template<class K> -int -A<K>::bar(const K& k) -{ - return(foo(k)); -} - -template<> -int -A<const char*>::foo(const char*const& k) -{ - return((int)k); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec17.C deleted file mode 100755 index 3e3dd63..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec17.C +++ /dev/null @@ -1,44 +0,0 @@ -// Build don't link: - -template<class T> -struct Foo { }; - -template<class T1, class T2> -struct BT { }; - -template<class T1, class T2> -struct BT< Foo<T1>, Foo<T2> > { static const int i = 1; }; - -template<class T1, class T2> -struct BT< T1, Foo<T2> > { static const int i = 2; }; - -template<class T1, class T2> -struct BT< Foo<T1>, T2 > { static const int i = 3; }; - -template<class T1, class T2> -int foo(Foo<T1>, Foo<T2>) -{ - return 1; -} - -template<class T1, class T2> -int foo(T1, Foo<T2>) -{ - return 2; -} - -template<class T1, class T2> -int foo(Foo<T1>, T2) -{ - return 3; -} - -void f() -{ - BT< double, Foo<int> >::i; - BT< Foo<int>, Foo<int> >::i; - BT< Foo<int>, float >::i; - foo(1.0, Foo<int>()); - foo(Foo<int>(), Foo<int>()); - foo(Foo<int>(), 1.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec18.C deleted file mode 100755 index d7d034d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec18.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: - -template<class A, class B> -void foo(const A& a, const B& b) -{ -} - -template<class A, class B> -void foo(const A& a, const int& b) -{ -} - -template<class A*, class B> -void foo(const A*& a, const B& b) -{ -} - -template<> -void foo(const int&, const double&) -{ -} - - -int -main() -{ - foo("98239", 23); - foo(232, 1.022); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec19.C deleted file mode 100755 index f9b6011..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec19.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -template<class T> T f(T o) { return o; } -template<> int f(int o) { return o; } // ERROR - after specialization -template int f(int); // ERROR - explicit instantiation diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec2.C deleted file mode 100755 index 338c69e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec2.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -class X -{ - public: - virtual void f() const = 0; -}; - -template <class T> -class Y: public X -{ - public: - virtual void f() const; -}; - -template <class T> -void Y<T>::f() const -{ -} - -template <> -void Y<bool>::f() const; - -template <> -void Y<bool>::f() const -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec20.C deleted file mode 100755 index c6b699d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec20.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -// According to the non-normative example in -// [temp.class.spec.mfunc]/2, these should be valid, but the grammar -// in the Standard does not allow partial nor full specializations as -// member-declarations, so we'd better not support them. - -template <class T> -struct S { - template <class U> void f(U); - template <> void f<int>(int); // ERROR - invalid specialization - - template <class V> struct I {}; - template <class V> struct I<V*> {}; - template <> struct I<int>; // ERROR - invalid specialization -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec21.C deleted file mode 100755 index 95e12d2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec21.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T> struct S {}; -template <class T = int> struct S<T*> {}; // ERROR - default argument - -template <int I, int J> struct A {}; -template <int I> struct A<I+5, I*2> {}; // ERROR - argument involves parameter - -template <class T, T t> struct C {}; -template <class T> struct C<T, 1>; // ERROR - type depends on parameter -int i; -template <class T> struct C<T*, &i>; // ERROR - type depends on parameter - -template< int X, int (*array_ptr)[X] > class B {}; -int array[5]; -template< int X > class B<X,&array> { }; // ERROR - type depends on parameter diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec22.C deleted file mode 100755 index 88d55d3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec22.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - template <class U> - void f(); -}; - - -template <class T> -template <> // ERROR - enclosing classes not specialized -void S<T>::f<int> () -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec23.C deleted file mode 100755 index 0e9ee61..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec23.C +++ /dev/null @@ -1,10 +0,0 @@ -/* [temp.expl.spec] p18. */ - -template<class T> -struct A { - template <class U> class B { }; -}; - -template<class T> -class A<T>::B<void> { // ERROR - only one template header -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec24.C deleted file mode 100755 index 2b7d336..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec24.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -template <class T> class A; -// template <> -class A<int>; // ERROR - missing template header - XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec25.C deleted file mode 100755 index 884abf0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec25.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class T, int I> -struct S { -}; - -template <int I> -struct S <double, I> { -}; - -template <class T> -void f () -{ - S<double, T::x> s; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C deleted file mode 100755 index 1bd40b6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C +++ /dev/null @@ -1,11 +0,0 @@ -// From: lat@iki.fi (Lassi A. Tuura) -// Test that a specialization without an initializer is not a definition, -// as specified in [temp.expl.spec]. - -// Build don't link: - -struct X; -template <class T> struct Y { static const X array[]; }; -template <> const X Y<int>::array []; -struct X { int i; }; -template <> const X Y<int>::array [] = { 0, 1, 2, 3 }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec27.C deleted file mode 100755 index 63aae4c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec27.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <class T, class U> -struct Y {}; - -template <class T> -struct X {}; - -template <class T, class U> -void f() -{ - typename X<Y<T, U> >::A a; -} - -template <class T, class U> -struct X<Y<T, U> > -{ -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec3.C deleted file mode 100755 index b0e710f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec3.C +++ /dev/null @@ -1,37 +0,0 @@ -extern "C" void abort(); - -class X -{ - public: - virtual int f() const = 0; -}; - -template <class T> -class Y: public X -{ - public: - virtual int f() const; -}; - -template <class T> -int Y<T>::f() const -{ - abort(); - return 0; -} - -template <> -int Y<bool>::f() const; - -template <> -int Y<bool>::f() const -{ - return 0; -} - -int main() -{ - Y<bool> yb; - - yb.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec4.C deleted file mode 100755 index b6e6858..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec4.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -template <class T> -struct S {}; - -template <> -struct S<int> -{ - void f(); - void g(); -}; - -void S<int>::f() {} - -template <> -void S<int>::g() {} // ERROR - does not match any template declaration diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec5.C deleted file mode 100755 index 553d956..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec5.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -template <class T> -void f(T t1, T t2); - -template <> -void f(int i, int j); - -template <class T> -void g(T t1, T t2) {} - -template void g(int i, int j); - -void h() -{ - f(3, 'c'); // ERROR - no matching function - g(3, 'c'); // ERROR - no matching function -} - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec6.C deleted file mode 100755 index 4ef8e65..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec6.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: - -struct S1 -{ - template <class T> - void f(T t1, T t2); -}; - - -template <> -void S1::f(int i1, int i2); - -template <class U> -struct S2 -{ - template <class T> - void f(T t1, T t2); -}; - -template <> -template <> -void S2<char>::f(int i1, int i2); - -void h() -{ - S1 s1; - s1.f(3, 'c'); // ERROR - no matching function - - S2<char> s2; - s2.f(3, 'c'); // ERROR - no matching function -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec7.C deleted file mode 100755 index 81358d9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec7.C +++ /dev/null @@ -1,19 +0,0 @@ -extern "C" void abort(); - -template <class T> -void f(T t1, T t2); - -template <> -void f(int i, int j) -{ - abort(); -} - -void f(short s, char c) -{ -} - -int main() -{ - f(3, 'c'); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec8.C deleted file mode 100755 index 966f69f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec8.C +++ /dev/null @@ -1,27 +0,0 @@ -extern "C" void abort(); - -template <void* P> -void f(int j); - -template <int I> -void f(int j); - - -template <void* P> -void f(int j) -{ - abort(); -} - - -template <int I> -void f(int j) -{ -} - - -int main() -{ - f<3>(7); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec9.C deleted file mode 100755 index e2a2208..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec9.C +++ /dev/null @@ -1,21 +0,0 @@ -extern "C" void abort(); - -template <class T> -inline int f(T t) -{ - return 0; -} - -int main() -{ - if (!f(3)) - abort(); -} - -template <> -int f(int i) -{ // ERROR - specialization of f<int>(int) after instantiation - return 1; -} - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static1.C deleted file mode 100755 index 67e2363..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static1.C +++ /dev/null @@ -1,21 +0,0 @@ -extern "C" void abort(); - -template <class T> -class A -{ - public: - static int foo(int); -}; - -template <> -int A<int>::foo(int i) -{ - return i; -} - - -int main() -{ - if (A<int>::foo(22) != 22) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static2.C deleted file mode 100755 index 5060cfd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static2.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -template <class A> -class TEST -{ -public: - TEST (A) {} -}; - -template <class A> -class TEST2 -{ - static A i; -}; - -template <class A> -A TEST2 <A>::i (0); - -TEST2 <TEST <int> > a; - -template class TEST2 <TEST <int> >; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static3.C deleted file mode 100755 index 6fe33f9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static3.C +++ /dev/null @@ -1,16 +0,0 @@ -// On targets that don't support weak symbols, we require an explicit -// instantiation of arr. -// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux* - -template<class T> -struct A { - static T arr[5]; -}; - -template <class T> -T A<T>::arr[5] = { 0, 1, 2, 3, 4 }; - -int main () -{ - return A<int>::arr[0]; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static4.C deleted file mode 100755 index 2ff3221..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static4.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - static const T t = 3; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static5.C deleted file mode 100755 index f6e125d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static5.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - static const T t = 3; // ERROR - initializing non-integral type -}; - -double d = S<double>::t; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static6.C deleted file mode 100755 index 785bc4e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static6.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't run: - -// Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il> - -// excess errors test - XFAIL *-*-* - -template <class T> struct A { - static const int l[1]; -}; - -template<class T> -const int A<T>::l[1] = {1}; - -int i = A<int>::l[0]; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/static_cast.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/static_cast.C deleted file mode 100755 index 26f26c5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/static_cast.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -template <class InputIterator, class BinaryOperation> -void accumulate(InputIterator first, - BinaryOperation binary_op) { -} - - -template<class R> int p( int val, R& r ) -{ - return val + r; -} - -template<class R> void f(R) -{ - accumulate(0, static_cast<int (*)(int, R&)>(p) ); -} - -int main() -{ - f(0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr.C deleted file mode 100755 index 57ef7e3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr.C +++ /dev/null @@ -1,16 +0,0 @@ -extern "C" void abort(); - -template <class T> -T f(T) -{ - T t = __extension__ ({ T j = 4; j + 3; }); - return t; -} - - -int main() -{ - if (f(3) != 7) - abort(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr2.C deleted file mode 100755 index 475ad72..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/stmtexpr2.C +++ /dev/null @@ -1,24 +0,0 @@ -extern "C" void abort(); - -int i; - -void g() -{ - i++; -} - -template <class T> -void f(T) -{ - __extension__ ({g();}); -} - -int main() -{ - f(3.0); - if (i != 1) - abort(); - - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t00.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t00.C deleted file mode 100755 index 14bfcf8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t00.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -int f1 () { - struct A { A() { a = 2; } int a; } ; - A aa; - return aa.a; -} -int f2 () { - struct A { A() { a = 2; } int a; } ; - A ab; - return ab.a; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t01.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t01.C deleted file mode 100755 index b1d7d38..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t01.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class A> class B { public: A a; }; -static B<int> b_int; - -int foo () { return b_int.a; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t03.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t03.C deleted file mode 100755 index 29f687a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t03.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -template <class A> class B { public: A a; }; -static B<int> b_int; -static B<char> b_char; - -int foo () { return b_int.a + b_char.a; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t04.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t04.C deleted file mode 100755 index faa04fc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t04.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class A> class B { public: A a; }; -static B<int> b_int; -static B<char> b_char; -static B<unsigned char> b_uchar; - -int foo () { return b_int.a + b_char.a + b_uchar.a; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t05.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t05.C deleted file mode 100755 index 5c99f77..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t05.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class A> class B { - A a; - public: - B(A&aa); // ERROR - near match - ~B(); -}; // ERROR - candidates -static B<int> b_int (3); // ERROR - no matching function diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t06.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t06.C deleted file mode 100755 index 8681f53..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t06.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -typedef int I; -int i; - -template <class A> class B { - A a; - public: - B(A&aa); - B(); - ~B(); -}; - -template <class B> class C { public: B b; }; - -template <class I, class i> class D : I { public: i ii; }; - -typedef B<int> b_int; -typedef C<int> c_int; -typedef C<b_int> c_b_int2; - -c_b_int2 x2; -int z; -D<c_b_int2,b_int> d; -int q; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t07.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t07.C deleted file mode 100755 index 3cdb3da..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t07.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class A> class B { - A a; - public: - const A& value () { return a; } -}; -static B<int> b_int; - -int foo () { return b_int.value(); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t08.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t08.C deleted file mode 100755 index ce24cca..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t08.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class A> class B { - A a; - public: - B (); - ~B (); -}; -B<int> b_int; -B<int> *bp = &b_int; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t09.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t09.C deleted file mode 100755 index dab4730..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t09.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -struct bs_1 { - typedef int (*pfi) (void); -}; -static bs_1::pfi fp; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t10.C deleted file mode 100755 index 4f3fc18..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t10.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -template <class A> class B { public: A a; B(); }; -class B<char> { public: int y[10]; }; -static B<int> bi; -static B<char> bc; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t11.C deleted file mode 100755 index 8137349..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t11.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class A> -class B { -public: - A a; - B() { x = 2; } // ERROR - no x -}; -static B<int> bi; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t11a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t11a.C deleted file mode 100755 index 0dcd297..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t11a.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <class A> -class B { -public: - A a; - B() { a = 2; } -}; -static B<int> bi; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t12.C deleted file mode 100755 index 0ebb045..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t12.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -class OBJECT {int a;}; -class STDFILE {int b;}; - -template <class T> class VECTOR { - T *v; - int sz; -public: - T& elem(int i) { return v[i]; } - T& operator[] (int i); -}; - -template <class T> -class PVECTOR : VECTOR<void *> { -public: - T*& elem(int i) - {return (T*&) VECTOR<void *>::elem(i); } - T*& operator[] (int i) - {return (T*&) VECTOR<void *>::operator[](i);} -}; - -PVECTOR<OBJECT *> *foo; - -PVECTOR<STDFILE *> *goo; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t12a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t12a.C deleted file mode 100755 index e0f1e65..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t12a.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -int a (void * x) { return 1; } -typedef void *T; -int b (T x) { return 2; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t13.C deleted file mode 100755 index 2f589a7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t13.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -template <class A> class B { -public: - B(); - A a; - int i; -}; - -void *f () { - return new B<char *>; -} - -struct foo { int i[10]; }; -extern B<foo> *foop; - -void f2 () { - foop = new B<foo>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t14.C deleted file mode 100755 index 8532f2b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t14.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -class OBJECT -{ - int a; -}; - - - -template <class T> class TESTA -{ -public: - TESTA(); - T foo(int i) {T t = 0; return t}; // ERROR - no semi -}; - - - -void foo() -{ - TESTA<OBJECT *> *foo; - - foo = new TESTA<OBJECT *>; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t14a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t14a.C deleted file mode 100755 index 694f846..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t14a.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -class OBJECT -{ - int a; -}; - - - -template <class T> class TESTA -{ -public: - TESTA(); - T foo(int i) {T t = 0; return t;} -}; - - - -void foo() -{ - TESTA<OBJECT *> *foo; - - foo = new TESTA<OBJECT *>; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t16.C deleted file mode 100755 index 4cdf3a2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t16.C +++ /dev/null @@ -1,30 +0,0 @@ -extern "C" void printf (char *, ...); -template <class T> T max (const T&x, const T&y) -{ - return (x>y)?x:y; -} -int min (const float&, const float&); -int min (const int& i1, const int& i2) { - return (i1 < i2) ? i1 : i2; -} - -class complex -{ - double re, im; - public: - complex (double r, double i=0) { re = r; im = i; } - friend int operator > (const complex& x, const complex &y) { return 0; } - void print () { } -}; - -int main () -{ - complex c1 (1, 0); - complex c2 (2, 0); - - int j = max (1, 37); - complex m1 = max (c1, c2); - m1.print (); - printf ("j=%d\n", j); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t18.C deleted file mode 100755 index 760747e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t18.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -extern void byebye (); -template <class T1, class T2> -struct A -{ - T1 t1; - T2 t2; - A() { t1 = 0; t2 = 0; } - ~A() { byebye(); } -}; - -template <class Q> -int f (A<int, Q> a) { - return a.t1; -} - -extern A<int,double*> aa; -int foop () { return f(aa); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t20.C deleted file mode 100755 index 07a86fa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t20.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template <class X> class A { -public: - X aaa; - int foo(); -}; - -template <class X> A<X> f(X); - -void frep() { - int x; - x = f(6.4).foo(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t21.C deleted file mode 100755 index f05f89f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t21.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X> class A { public: int a; X x; }; -template <class X> X f (A<X> a) { return a.x; } - -extern A<double> a_dbl; - -double fred () { return f (a_dbl); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t22.C deleted file mode 100755 index 1102baa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t22.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -class AA { public: static int xx; }; -template <class X> class A { - public: - static int x; -}; - -int AA::xx; -template <class Y> int A<Y>::x; // gets bogus error diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t23.C deleted file mode 100755 index 82221b3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t23.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template <class T> class temp1 -{ -public: - T tvar; -}; - - -template <class T2> class temp2 -{ -public : - temp1<T2> t1var; -}; - - -temp1<int> temp1var; -temp2<int> temp2var; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t24.C deleted file mode 100755 index 6032270..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t24.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class X> int f (X x, X y) { return 23; } - -int foo () { - return f (7); // ERROR - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t25.C deleted file mode 100755 index 2319774..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t25.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X> int f (X x, X y) { return 23; } -template <class X> int f (X x, int j = 3) { return 29; } - -int foo () { - return f (7); // gets bogus error - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t26.C deleted file mode 100755 index cfc1591..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t26.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X> int f (X x, unsigned int j = 3) { return 29; } -template <class X> int f (X x, X y) { return 23; } - -int foo () { - return f (7.0, 9.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t27.C deleted file mode 100755 index f3246e8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t27.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X> int f (X x, int * j) { return 29; } -template <class X> int f (X x, ...) { return 23; } - -int foo () { - return f (7.0, 9.0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t28.C deleted file mode 100755 index dd524cb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t28.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class X> class B; -template <class X> int f (B<X> b) { return 37; } -template <class Y> class B { public: Y y; B() { y = 1; } }; - -int foo () { - B<double> bd; - return f(bd); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t29.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t29.C deleted file mode 100755 index 54a5052..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t29.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; } -extern int i[30]; -extern double d[99]; - -int foo (int ii) { return f (&i); } // causes abort -double foo (double dd) { return f (&d); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t30.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t30.C deleted file mode 100755 index 42d88ea..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t30.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; } -extern int i[30], i2[33]; -extern double d[99]; - -int foo (int ii) { return f (&i) + f(&i2); } // causes abort -double foo (double dd) { return f (&d); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t31.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t31.C deleted file mode 100755 index 8800ebe..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t31.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -struct B { int foo (); }; -int B::foo() { return 37; } - -template <class A> struct X { - void f(); -}; - -template <class A> void X<A>::f () -{} - -X<int> x; - -void xyzzy () { - x.f (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t32.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t32.C deleted file mode 100755 index 89f8db1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t32.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template <class X> struct A { - int fooo (int x); - int x; - inline int y () { return 3; } - inline int z () { return 5; } -}; - -template <class Y> int A<Y>::fooo (int t) { return (this->*(x?&A<Y>::y : &A<Y>::z))() + t; }; // gets bogus error - -A<int> ai; - -int frop () { return ai.fooo (100); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t32a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t32a.C deleted file mode 100755 index 13dfda1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t32a.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -struct A { - int x; - int y (); - int z (); - int foo (int j); -}; - -int A::foo (int q) { return q + (this->*(x ? &A::y : &A::z)) (); } // gets bogus error diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t34.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t34.C deleted file mode 100755 index acf858a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t34.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -template <class X> struct A { int operator [] (int); }; -template <class Y> int A<Y>::operator[] (int j) { return j * j; } - -extern A<void **> avpp; - -int q () { return avpp[99]; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t34a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t34a.C deleted file mode 100755 index 7d5aebf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t34a.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -struct A { - int operator[] (int); -}; - -//int A::operator[] (int); - -int A::operator[] (int j) -{ - return j * j; -} - -extern A a; - -int q () { return a[99]; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t35.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t35.C deleted file mode 100755 index f0ed971..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t35.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// Special g++ Options: -template<class X> struct A { - A (); - ~A(); - int x, y, z; -}; - -template <class Y> inline A<Y>::A () { x = y = 3; z = 99; } -template <class Z> inline A<Z>::~A() { y = 9999; } - -A<int> ai; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t36.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t36.C deleted file mode 100755 index bb791b9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t36.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -void * foo () { - typedef int * ip; - return new ip; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t37.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t37.C deleted file mode 100755 index 434dadd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t37.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -class A { -public: - A(int); // ERROR - referenced below - A(float); // ERROR - referenced below - ~A(); -}; // ERROR - synthesized copy ctor - -A::A() { // ERROR - -} - -A::A(int) { -} - -A::~A() { -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t37a.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t37a.C deleted file mode 100755 index 797b78d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t37a.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -class A { -public: - A(int); - A(float); - ~A(); -}; - -A::A(float f) { -} - -A::A(int i) { -} - -A::~A() { -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t38.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t38.C deleted file mode 100755 index cd89282..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t38.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// Special g++ Options: -extern "C" int printf (const char *, ...); - -template<class X> struct A { - A (int, char); - ~A (); - A (X *, float); -}; - -template<class Y> inline A<Y>::A (int i, char c) { - printf ("%d, %d\n", i, c); -} -template<class Z> A<Z>::~A() {} -template<class W> A<W>::A (W * d, float f) { - printf ("%x, %e\n", d, f); -} - -A<void> avoid (9, 0); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C deleted file mode 100755 index d12ef81..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C +++ /dev/null @@ -1,25 +0,0 @@ -extern "C" int printf (const char *, ...); - -template <class T> -struct frob { - T *ptr; - void print (); - frob (T* init) { ptr = init; } -}; - -template <class T> -void frob<T>::print () { - printf ("this = %08x\n", this); - printf (" ptr = %08x\n", ptr); - printf (" values = %x %x %x ...\n", ptr[0], ptr[1], ptr[2]); -} - - static int x[10]; - frob<char> fc ("hello"); - frob<int> fi (x); - -int main () { - fc.print (); - fi.print (); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t40.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t40.C deleted file mode 100755 index 34768a9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t40.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -struct A { - struct B { - B (int); - }; - static int foop (B); - static int splat () { - return foop (B (1)); - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t41.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t41.C deleted file mode 100755 index c02f677..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t41.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -struct A { - struct B { - B (int); - }; - static int foop (B); - int splat () { - return foop (B (1)); - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t42.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t42.C deleted file mode 100755 index 5545994..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/t42.C +++ /dev/null @@ -1,17 +0,0 @@ -extern "C" void abort (); - -struct A { - struct stat { - int x; - stat (int j) { abort (); } - }; - static int stat (double d) { return 0; } // gets bogus error - cfront takes it - static int zap () { - stat (0); - return stat (1); // gets bogus error - this should work - } -}; - -int main () { - return A::zap (); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/test5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/test5.C deleted file mode 100755 index dc74c2d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/test5.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: - -template <char *a, const char *b, char *const c> class A{int x;}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann1r.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann1r.C deleted file mode 100755 index 65e6807..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann1r.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -struct bs_1 -{ - typedef int (*p_user_hashf)(int); -}; - -bs_1::p_user_hashf i_user_hashf; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann2.C deleted file mode 100755 index 4c71541..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/tiemann2.C +++ /dev/null @@ -1,34 +0,0 @@ -extern "C" void printf (char *, ...); -template <class T> T max (const T&x, const T&y) -{ - return (x>y)?x:y; -} - -class complex -{ - double re, im; - public: - complex (double r, double i=0) { re = r; im = i; } - friend int operator > (const complex& x, const complex &y); - void print () { printf ("re = %g; im = %g;\n", re, im); } -}; -int operator >(const complex& x, const complex &y) -{ - double c1 = x.re * x.re + x.im * x.im; - double c2 = y.re * y.re + y.im * y.im; - return c1 > c2; -} - -int main () -{ - complex c1 (1, 0); - complex c2 (2, 0); - complex c3 (2, 3); - complex c4 (2, 1); - - complex m1 = max (c1, c2); - complex m2 = max (c3, c4); - m1.print (); - m2.print (); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/to2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/to2.C deleted file mode 100755 index 936729c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/to2.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -template <class A> class B { public: A a; }; -static B<int> b_int; -static B<int> b_int2; - -int foo () { return b_int.a + b_int2.a; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/tt.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/tt.C deleted file mode 100755 index e597875..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/tt.C +++ /dev/null @@ -1,33 +0,0 @@ -// Build don't link: - -#define DEF_A struct A { A() { a = 2; } int a; } - -#if 1 -int f1 () { - DEF_A; - A aa; - return aa.a; -} - -int f2 () { - DEF_A; - A ab; - return ab.a; -} -/* results: -tt.cc: In function int f2 (): -tt.cc:9: conflicting types for `A::A ()' -tt.cc:3: previous declaration of `A::A ()' -/u2/projects/gcc2/src/cplus-cvt.c:1149: failed assertion `distance >= 0' -gcc2: Program cc1plus got fatal signal 6. -*/ -#else - -struct B1 { DEF_A; A aa; }; - -struct B2 { DEF_A; A aa; }; -/* results: -/u2/projects/gcc2/src/cplus-decl.c:5469: failed assertion `return_type == return_ctor' -gcc2: Program cc1plus got fatal signal 6. -*/ -#endif diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/tt2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/tt2.C deleted file mode 100755 index f6c435b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/tt2.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -int f1 () { - struct A { - A() : b (2) { } - int fred () { return b.hi_mom; } - struct B { - int hi_mom; - B (int a) { hi_mom = a; } - }; - B b; - }; - A aa; - return aa.fred(); -} - -int f2 () { - struct A { - ~A() { a = 3; } - int a; - int fred () { return a + 1; } - }; - - A ab; - ab.a = 12; - return ab.fred(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp1.C deleted file mode 100755 index 4c6bac0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template<class E> class D -{ -}; - -template<template<class> class D,class E> class C -{ -}; - -int main() -{ - C<int,D> c; // ERROR - args not match -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp10.C deleted file mode 100755 index ca0c9b6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp10.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: - -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D d; // ERROR - D is a template - public: - int f(); -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - return d.f(); // ERROR - d not properly declared -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp11.C deleted file mode 100755 index 213eb40..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp11.C +++ /dev/null @@ -1,25 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -int main() -{ - C<D,int> c; - C<D,char> d; - c.f(); - d.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp12.C deleted file mode 100755 index c9bc9f3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp12.C +++ /dev/null @@ -1,28 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class E,class D> class C -{ - E<D> d; - public: - int f(); -}; - -template<template<class> class E,class D> int C<E,D>::f() -{ - return d.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp13.C deleted file mode 100755 index 2745c7a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp13.C +++ /dev/null @@ -1,28 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - return d.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp14.C deleted file mode 100755 index 04877d6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp14.C +++ /dev/null @@ -1,30 +0,0 @@ -template<class T> class D -{ - T a; - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<class E,template<class> class DD = D> class C -{ - DD<E> d; - public: - int f(); -}; - -template<class E,template<class> class DD> int C<E,DD>::f() -{ - DD<E> d2; - return d2.f(); -} - -int main() -{ - C<int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp15.C deleted file mode 100755 index 25f3c4d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp15.C +++ /dev/null @@ -1,29 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - D<E> d2; - return d2.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp16.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp16.C deleted file mode 100755 index ac736fa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp16.C +++ /dev/null @@ -1,30 +0,0 @@ -template<class T> class D -{ - T a; - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - D<E> d2; - return d2.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp17.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp17.C deleted file mode 100755 index 6852404..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp17.C +++ /dev/null @@ -1,30 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); - int g() { return 0; } -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - C<D,E> d2; - return d2.g(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp18.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp18.C deleted file mode 100755 index 6c9e579..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp18.C +++ /dev/null @@ -1,30 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); - int g() { return 0; } -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - C<D,char> d2; - return d2.g(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp19.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp19.C deleted file mode 100755 index 8a24946..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp19.C +++ /dev/null @@ -1,24 +0,0 @@ -#include <vector> - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int size() { return d.size(); } -}; - -template<template<class> class D,class E> int size(D<E> &d1) -{ - d1.size(); - C<D,E> d2; - d2.size(); - return 0; -} - -int main() -{ - std::vector<int> c1; - std::vector<char> c2; - size(c1); - size(c2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp2.C deleted file mode 100755 index 5badbe2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template<class E> class D -{ -}; - -template<template<class> class D,int> class C -{ -}; - -int main() -{ - C<1,D> c; // ERROR - args not match -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp20.C deleted file mode 100755 index e3b26c6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp20.C +++ /dev/null @@ -1,27 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C : D<E> -{ - public: - int g(); -}; - -template<template<class> class D,class E> int C<D,E>::g() -{ - return f(); -} - -int main() -{ - C<D,int> c; - c.g(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp21.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp21.C deleted file mode 100755 index c6cc24b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp21.C +++ /dev/null @@ -1,33 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C : D<E> -{ - public: - int g(); -}; - -template<template<class> class D,class E> int C<D,E>::g() -{ - return f(); -} - -class E : C<D,int> -{ - public: - int h() { return g(); } -}; - -int main() -{ - E c; - c.h(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp22.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp22.C deleted file mode 100755 index 7eac0ed..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp22.C +++ /dev/null @@ -1,33 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class DD,class EE> class C : DD<EE> -{ - public: - int f(); -}; - -template<template<class> class DD,class EE> int C<DD,EE>::f() -{ - return DD<EE>::f(); -} - -class E : C<D,int> -{ - public: - int f() { return C<D,int>::f(); } -}; - -int main() -{ - E c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp23.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp23.C deleted file mode 100755 index 636bb1c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp23.C +++ /dev/null @@ -1,33 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class E,class D> class C : E<D> -{ - public: - int f(); -}; - -template<template<class> class E,class D> int C<E,D>::f() -{ - return E<D>::f(); -} - -class E : C<D,int> -{ - public: - int f() { return C<D,int>::f(); } -}; - -int main() -{ - E c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp24.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp24.C deleted file mode 100755 index 1e6278f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp24.C +++ /dev/null @@ -1,22 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> int f() -{ - D<E> d; - return d.f(); -}; - -int main() -{ - f<D,int>(); - f<D,char>(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp25.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp25.C deleted file mode 100755 index c30905e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp25.C +++ /dev/null @@ -1,33 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -template<template<class> class D,class E> int f(D<E> &d1) -{ - d1.f(); - C<D,E> d2; - d2.f(); - return 0; -} - -int main() -{ - D<int> c1; - D<char> c2; - f(c1); - f(c2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp26.C deleted file mode 100755 index 6e6425e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp26.C +++ /dev/null @@ -1,33 +0,0 @@ -template<class T, class U = int> class D -{ - public: - int f(); -}; - -template<class T, class U> int D<T,U>::f() -{ - return sizeof(T)+sizeof(U); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -template<template<class> class D,class E> int f(D<E> &d1) -{ - d1.f(); - C<D,E> d2; - d2.f(); - return 0; -} - -int main() -{ - D<int> c1; - D<char> c2; - f(c1); - f(c2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp27.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp27.C deleted file mode 100755 index 7ecf301..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp27.C +++ /dev/null @@ -1,35 +0,0 @@ -template<class T> class D -{ - public: - int f() const; -}; - -template<class T> int D<T>::f() const -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() const { return d.f(); } -}; - -template<template<class> class D,class E> int f(const D<E> &d1) -{ - d1.f(); - C<D,E> d2; - d2.f(); - return 0; -} - -int main() -{ - D<const int> c1; - D<char> c2; - const D<char> c3(c2); - f(c1); - f(c2); - f(c3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp28.C deleted file mode 100755 index 5948dc5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp28.C +++ /dev/null @@ -1,39 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -template<template<class> class D,class E> int f(D<E> &d1) -{ - d1.f(); - C<D,E> d2; - d2.f(); - return 0; -} - -template<> int f<>(D<char> &d1) -{ - d1.f(); - return 0; -} - -int main() -{ - D<int> c1; - D<char> c2; - f(c1); - f(c2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp29.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp29.C deleted file mode 100755 index b431ad0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp29.C +++ /dev/null @@ -1,32 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -extern "C" void abort(); - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { abort(); return 0; } -}; - -template<class E> class C<D,E> -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp3.C deleted file mode 100755 index 322dd19..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -template<class E,class F> class D -{ -}; - -template<template<class> class D,class E> class C -{ -}; - -int main() -{ - C<D,int> c; // ERROR - param list not match// WARNING - sees it as not having a type -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp30.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp30.C deleted file mode 100755 index c47b157..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp30.C +++ /dev/null @@ -1,37 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -extern "C" void abort(); - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { abort(); return 0; } -}; - -template<class E> class C<D,E> -{ - D<E> d; - public: - int f(); -}; - -template<class E> int C<D,E>::f() -{ - return d.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp31.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp31.C deleted file mode 100755 index 4e1acf2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp31.C +++ /dev/null @@ -1,32 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -extern "C" void abort(); - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { abort(); return 0; } -}; - -template<template <class> class F> class C<F,int> -{ - F<int> d; - public: - int f() { return d.f(); } -}; - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp32.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp32.C deleted file mode 100755 index 5c7a63a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp32.C +++ /dev/null @@ -1,37 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -extern "C" void abort(); - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { abort(); return 0; } -}; - -template<template <class> class F> class C<F,int> -{ - F<int> d; - public: - int f(); -}; - -template<template<class>class F> int C<F,int>::f() -{ - return d.f(); -} - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp33.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp33.C deleted file mode 100755 index 3755ff3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp33.C +++ /dev/null @@ -1,31 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - template<template<class> class F> int f(F<int>); -}; - -template<template<class> class D,class E> -template<template<class> class F> int C<D,E>::f(F<int>) -{ - F<E> d2; - return d2.f(); -} - -int main() -{ - C<D,int> c; - D<int> d; - c.f(d); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp34.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp34.C deleted file mode 100755 index d605043..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp34.C +++ /dev/null @@ -1,31 +0,0 @@ -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - return sizeof(T); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f(); -}; - -template<template<class> class D,class E> int C<D,E>::f() -{ - D<E> d2; - return d2.f(); -} - -template class C<D,int>; - -int main() -{ - C<D,int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp35.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp35.C deleted file mode 100755 index 655f406..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp35.C +++ /dev/null @@ -1,35 +0,0 @@ -template<int T, class U = int> class D -{ - public: - int f(); -}; - -template<int T, class U> int D<T,U>::f() -{ - return T+sizeof(U); -} - -template<template<int> class D,class E> class C -{ - D<1> d; - public: - int f() { return d.f(); } -}; - -template<template<int> class D> int f(D<2> &d1) -{ - d1.f(); - return 0; -} - -template<template<int> class D> int f(D<1> &d1) -{ - d1.f(); - return 0; -} - -int main() -{ - D<1> c1; - f(c1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp36.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp36.C deleted file mode 100755 index 976bc0e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp36.C +++ /dev/null @@ -1,29 +0,0 @@ -template<int T, class U = int> class D -{ - public: - int f(); -}; - -template<int T, class U> int D<T,U>::f() -{ - return T+sizeof(U); -} - -template<template<int> class D,class E> class C -{ - D<1> d; - public: - int f() { return d.f(); } -}; - -template<template<int> class D> int f(D<1> &d1) -{ - d1.f(); - return 0; -} - -int main() -{ - D<1> c1; - f(c1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp37.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp37.C deleted file mode 100755 index 01b0d29..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp37.C +++ /dev/null @@ -1,29 +0,0 @@ -template<int T, class U = int> class D -{ - public: - int f(); -}; - -template<int T, class U> int D<T,U>::f() -{ - return T+sizeof(U); -} - -template<template<int> class D,class E> class C -{ - D<1> d; - public: - int f() { return d.f(); } -}; - -template<template<int> class D, int T> int f(D<T> &d1) -{ - d1.f(); - return T; -} - -int main() -{ - D<1> c1; - f(c1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp38.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp38.C deleted file mode 100755 index 00c663c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp38.C +++ /dev/null @@ -1,29 +0,0 @@ -template<class T, class U = int> class D -{ - public: - int f(); -}; - -template<class T, class U> int D<T,U>::f() -{ - return sizeof(T)+sizeof(U); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -template<template<class> class D> int f(D<int> &d1) -{ - d1.f(); - return 0; -} - -int main() -{ - D<int> c1; - f(c1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp39.C deleted file mode 100755 index 24ff6c0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp39.C +++ /dev/null @@ -1,29 +0,0 @@ -template<class T, class U = T> class D -{ - public: - int f(); -}; - -template<class T, class U> int D<T,U>::f() -{ - return sizeof(T)+sizeof(U); -} - -template<template<class> class D,class E> class C -{ - D<E> d; - public: - int f() { return d.f(); } -}; - -template<template<class> class D> int f(D<int> &d1) -{ - d1.f(); - return 0; -} - -int main() -{ - D<int> c1; - f(c1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp4.C deleted file mode 100755 index 249ad9c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp4.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template<class E> class D -{ -}; - -template<template<class> class D,class E> class C -{ - D<1> d; // ERROR - arg not match -}; - -int main() -{ - C<D,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp40.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp40.C deleted file mode 100755 index d30b4d6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp40.C +++ /dev/null @@ -1,20 +0,0 @@ -#include <vector> - -template<class E,template<class> class DD = std::vector> class C -{ - DD<E> d; - public: - int f(); -}; - -template<class E,template<class> class DD> int C<E,DD>::f() -{ - DD<E> d2; - return d2.size(); -} - -int main() -{ - C<int> c; - c.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp41.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp41.C deleted file mode 100755 index f206c03..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp41.C +++ /dev/null @@ -1,23 +0,0 @@ -template<template<class> class D,class E> class C -{ - public: - int g() { return 1; } -}; - -template<class T> class D -{ - public: - int f(); -}; - -template<class T> int D<T>::f() -{ - C<D,D> c; - return c.g(); -} - -int main() -{ - D<char> d; - d.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp42.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp42.C deleted file mode 100755 index b2610df..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp42.C +++ /dev/null @@ -1,21 +0,0 @@ -template <class T, template <class T> class C> -struct X -{}; - -template <class T> -struct Y -{}; - -template <class T> -struct Z -{}; - -template <class T> -struct X<T,Y> -{}; - -int main() -{ - X<int,Y> a; - X<int,Z> b; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp43.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp43.C deleted file mode 100755 index a020655..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp43.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: - -template < class T, template <class> class E1, template <class> class E2 > -struct Add { - Add(const E1<T>& e1, const E2<T>& e2) {} -}; - - -template < class T, template <class> class E1, template <class> class E2 > -struct Mul { - Mul(const E1<T>& e1, const E2<T>& e2) {} -}; - - -template < class T > -struct Lit { - Lit(const T& t) {} -}; - - -template < class T > -struct Id { - Add < T, Id, Lit > operator+(const T& t) const { - return Add < T, Id, Lit >(*this, Lit<T>(t)); - } - - Mul < T, Id, Lit > operator*(const T& t) const { - return Mul < T, Id, Lit >(*this, Lit<T>(t)); - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp44.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp44.C deleted file mode 100755 index 7f797e6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp44.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -template < class T, template < class > class E1, template < class > class E2 > -class Add { -public: - Add(const E1<T>& e1, const E2<T>& e2) {} -}; - -template < class T > -struct Id { - template < template < class > class E > - Add < T, Id, E > operator+(const E<T>& e) const { - return Add < T, Id, E >(*this, e); - } -}; - -template struct Id<double>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp45.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp45.C deleted file mode 100755 index 05fcd9d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp45.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -template<class M, class T> struct temp2; -template<template<class> class M, class T> struct temp2<M<T>, T> {}; - -template<class M> struct temp1; -template<template<class> class M, class T> struct temp1<M<T> > {}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp46.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp46.C deleted file mode 100755 index 23a32a8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp46.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: - -template <template<class> class TT> void f() {} -template <template<class,class> class TT> void f() {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp47.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp47.C deleted file mode 100755 index 731ce40..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp47.C +++ /dev/null @@ -1,16 +0,0 @@ -template <template<class,class> class TT, class T> void f(T) -{ -} - -template <template<class> class TT, class T> void f(T) -{ -} - -template <class T> class C {}; -template <class T,class U> class D {}; - -int main() -{ - f<C>(1); - f<D>(1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp48.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp48.C deleted file mode 100755 index 33d0d47..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp48.C +++ /dev/null @@ -1,16 +0,0 @@ -template <template<int> class TT, class T> void f(T) -{ -} - -template <template<class> class TT, class T> void f(T) -{ -} - -template <class T> class C {}; -template <int> class D {}; - -int main() -{ - f<C>(1); - f<D>(1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp49.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp49.C deleted file mode 100755 index b0a02d2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp49.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -template <int i> class C {}; -template <template <long> class TT> class D {}; - -int main() -{ - D<C> d; // ERROR - args not match -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp5.C deleted file mode 100755 index 4b835e8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp5.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template<int> class D -{ -}; - -template<template<int> class D,class E> class C -{ - D<int> d; // ERROR - arg not match -}; - -int main() -{ - C<D,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp50.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp50.C deleted file mode 100755 index 4892e0c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp50.C +++ /dev/null @@ -1,7 +0,0 @@ -template <class T, template <T> class TT> class C {}; -template <int> class D {}; - -int main() -{ - C<int,D> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp51.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp51.C deleted file mode 100755 index 9a497b7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp51.C +++ /dev/null @@ -1,13 +0,0 @@ -template<class E, int i, class F, class G=int, int j=i, class H=E> class D -{ -}; - -template<template<class,int,class,class> class D,class E> class C -{ - D<E,2,char,bool> d; -}; - -int main() -{ - C<D,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp52.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp52.C deleted file mode 100755 index fb841b9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp52.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -template<class A,class B> class mymap {}; - -template<class Key, - class Value, - template<class, class > class MapT> -class base -{ - -}; - -// specialization -template<class Key, class Value> -class base<Key, Value, mymap<int, int > > -{ // ERROR - type/value mismatch - -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp53.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp53.C deleted file mode 100755 index e5e87b4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp53.C +++ /dev/null @@ -1,35 +0,0 @@ -// Build don't link: - -// Submitted by Erez Louidor Lior <s3824888@techst02.technion.ac.il> - -template <typename> class H; -template <typename Target, typename Source> -H<Target> foo(const H<Source>&); - -template <typename Type> -class H{ - -#ifdef OK -public: -#endif - template<template<class, class> class Caster, typename Source> - static H<Type> cast(const H<Source>& s); - -#ifndef OK - template <typename Target, typename Source> - friend H<Target> foo(const H<Source>&); -#endif - -}; - -template <class, class> class caster; - -template <typename Target, typename Source> -H<Target> foo(const H<Source>& s){ - return H<Target>::template cast<caster, Source>(s); -} - -int main(){ - H<int> i; - foo<const int>(i); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp54.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp54.C deleted file mode 100755 index bae649a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp54.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -// Reported by Bruce Eckel <Bruce@EckelObjects.com> - -// [temp.deduct.type] -// Make sure we treat <T> in the construct TT<T> as any type containing T. - -template <class T> class C -{ -}; - -template <class T, template <class> class TT> void f (TT<T *> &t) -{ -} - -int main () -{ - C<char *> c; - f(c); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp6.C deleted file mode 100755 index cdea182..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp6.C +++ /dev/null @@ -1,13 +0,0 @@ -template<int> class F -{ -}; - -template<template<int> class D,class E> class C -{ - D<1> d; -}; - -int main() -{ - C<F,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp7.C deleted file mode 100755 index 0b98217..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp7.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -template<class E> class D -{ -}; - -template<template<class> class D,class E> class C // ERROR - ref below -{ - D<int,int> d; // ERROR - arg not match -}; - -int main() -{ - C<D,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp8.C deleted file mode 100755 index fd2a67c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp8.C +++ /dev/null @@ -1,17 +0,0 @@ -template<class E> class DD -{ -}; - -template<int> class D -{ -}; - -template<template<class> class D,class E> class C -{ - D<E> d; -}; - -int main() -{ - C<DD,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp9.C deleted file mode 100755 index 3892b6e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/ttp9.C +++ /dev/null @@ -1,13 +0,0 @@ -template<class E,class F=int> class D -{ -}; - -template<template<class> class D,class E> class C -{ - D<E> d; -}; - -int main() -{ - C<D,int> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef1.C deleted file mode 100755 index 8d674c9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef1.C +++ /dev/null @@ -1,18 +0,0 @@ -// Testcase for handling of typedef wierdness. -// Build don't link: - -template <class T> -struct A -{ - typedef enum - { - foo - } B; - - A (B b); -}; - -template <class T> -A<T>::A (B b) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef2.C deleted file mode 100755 index 18802fc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -typedef const int cint; - -template<class T> -class A -{ -public: - T f(cint i); -}; - -template <class T> -T A<T>::f(cint i) -{ -} - -int main() -{ - A<int> a; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef3.C deleted file mode 100755 index 110e481..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typedef3.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -template <class T> -void f(T, T) -{ -} - -struct A { - typedef enum { - VAL1 - } result_t; -}; - -struct B { - typedef enum { - VAL2 - } result_t; -}; - - -void g() -{ - f(A::VAL1, A::VAL1); - f(B::VAL2, B::VAL2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename1.C deleted file mode 100755 index c34eff1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename1.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -template<class T> -struct A { - typedef T T1; -}; - -template<class T> -struct B { - typedef T T2; -}; - -template<class T> -struct C { -}; - -template<class E> -C<typename E::T2::T1> -foo (E) -{ - return C<typename E::T2::T1>(); -} - -void test() -{ - foo(B<A<int> >()); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename10.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename10.C deleted file mode 100755 index 1b122b2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename10.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct S { - typedef int I; -}; - -void f(typename S::I); // ERROR - using typename outside of template diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename11.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename11.C deleted file mode 100755 index 1b4a1d5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename11.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T, int I> -struct S { - struct X {}; -}; - -template <class T, class U, int I> -S<T,I>::X f(T, U) -{ - S<T, I>::X(); -} - -template S<int, 3>::X f<int, double, 3>(int, double); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename12.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename12.C deleted file mode 100755 index cef6700..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename12.C +++ /dev/null @@ -1,31 +0,0 @@ -// Special g++ Options: -// execution test - XFAIL *-*-* -// excess errors test - XFAIL *-*-* - -int i = 0; - -template <class T> -struct S { - struct X {}; -}; - -template <class T> -void f(T) -{ - S<T>::X(); -} - -template <> -struct S<int> { - static void X() { i = 1; } -}; - -int main() -{ - f(3); - if (i != 1) - return 1; - else - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename13.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename13.C deleted file mode 100755 index 48d12e6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename13.C +++ /dev/null @@ -1,37 +0,0 @@ -// Build don't link: -// Special g++ Options: -// excess errors test - XFAIL *-*-* - -template <class T> -struct B -{ - typedef int I; -}; - - -template <class T> -struct D : public B<T> -{ - void f(); -}; - - -template <class T> -void D<T>::f() -{ - I(); -} - - -template <> -struct B<int> -{ - void I(); -}; - - -int main() -{ - D<int> di; - di.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename14.C deleted file mode 100755 index 7365b66..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename14.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T> -struct B { - typedef T X; -}; - -template <class T> -struct S : public B<T> -{ - struct I { - void f(X x); - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename2.C deleted file mode 100755 index f2f2265..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename2.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -class Base { -public: - class Bar { public: virtual ~Bar() {}; }; -}; - -class Derived : public Base { -public: - class Bar : public Base::Bar {}; -}; - -template <class T> -struct XYZ : public T::Bar { - XYZ(): T::Bar() { } -}; - -void test() { - XYZ<Base> b; - XYZ<Derived> d; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename3.C deleted file mode 100755 index 0b19d54..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename3.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T> -struct A -{ - typedef T A_Type; -}; - - -template <class U> -struct B : public A<U> -{ - A_Type Func(); -}; - - -template <class U> -A<U>::A_Type B<U>::Func() -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename4.C deleted file mode 100755 index 6f9362f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename4.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T> -struct A -{ - typedef T A_Type; -}; - - -template <class U> -struct B : public A<U> -{ -}; - - -template <class U> -struct C : public B<U> -{ - A_Type Func(); -}; - - -template <class U> -C<U>::A_Type C<U>::Func() -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename5.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename5.C deleted file mode 100755 index e967d14..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename5.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T> -struct A -{ - typedef T A_Type; -}; - - -template <class U> -struct B : public A<U> -{ -}; - - -template <class U> -struct C : public B<U> -{ - void Func(A_Type); -}; - - -template <class U> -void C<U>::Func(A_Type) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename6.C deleted file mode 100755 index 0b19d54..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename6.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// Special g++ Options: - -template <class T> -struct A -{ - typedef T A_Type; -}; - - -template <class U> -struct B : public A<U> -{ - A_Type Func(); -}; - - -template <class U> -A<U>::A_Type B<U>::Func() -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename7.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename7.C deleted file mode 100755 index 5c89603..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename7.C +++ /dev/null @@ -1,20 +0,0 @@ -// Test for implicit typename -// Build don't link: -// Special g++ Options: - -template <class T> -struct A { -protected: - typedef struct B { } B; -}; - -template <class T> -struct C { }; - -template <class T> -struct D : public A <C <T> > { - void f () - { - B* new_entries = (B *) 0; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename8.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename8.C deleted file mode 100755 index d2eb4ce..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename8.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -template < class T > class A -{ -public: - typedef typename T::myT anotherT; // ERROR - undefined type - - anotherT t; // ERROR - undefined type - - A(anotherT _t) { // ERROR - undefined type - t=_t; - } - - anotherT getT() { - return t; - } -}; - -class B : public A< B > -{ -public: - typedef int myT; -}; - -int main() { - B b; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename9.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/typename9.C deleted file mode 100755 index 027d0a0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/typename9.C +++ /dev/null @@ -1,16 +0,0 @@ -// Test to make sure that implicit typename doesn't break name binding rules. -// Special g++ Options: -w - -typedef double A; -template<class T> class B { - typedef char A; -}; -template<class T> struct X : B<T> { - A a; -}; - -int main() -{ - X<char*> x; - return sizeof (x.a) != sizeof (double); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/unify1.C deleted file mode 100755 index 283e2f5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Tests non-unification of parms that don't use template parms. -// Build don't link: - -enum kind {a, b}; - -class C { public: C () {} }; - -template<class P> -void f (P c, kind k) {} - -template<class P> -void f (P c, P d, kind k) {} - -template void f (C c, C c, kind k); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify2.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/unify2.C deleted file mode 100755 index 89b043d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify2.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: - -template <class T> -struct S -{ - typedef T S_Type; -}; - - -template <class T> -void foo(typename S<T>::S_Type) -{ -} - - -template <class T> -void foo(T) -{ -} - - -struct S2 {}; - -void bar() -{ - foo(S2()); // We can't unify with the first foo, so we get the second. -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify3.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/unify3.C deleted file mode 100755 index 847dc0e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify3.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -template <class T1, class T2> -struct ComputeBinaryType -{ -}; - -template<class T1> -struct ComputeBinaryType<T1, double> { - void g(); -}; - -template<class T1> -struct ComputeBinaryType<T1&, double> { - void h(); -}; - -void f() -{ - ComputeBinaryType<double, double> cb; - cb.g(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify4.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/unify4.C deleted file mode 100755 index 259920d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/unify4.C +++ /dev/null @@ -1,11 +0,0 @@ -template <class T> void f (T); - -void g (); -void g (int); - -int -main () -{ - f (g); // ERROR - ambiguous unification - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/union1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/union1.C deleted file mode 100755 index a1da446..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/union1.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -union Un {int i;}; - -template<class T1, class T2> struct St1 {}; -template<class T> struct St1<Un,T> {}; - -template<class T> struct St2 {}; -template<> struct St2<Un> {}; - -template<class T1, class T2> struct St3 {}; -template<> struct St3<Un,int> {}; - -void f() { - St1<int,int> s1; - St2<int> s2; - St3<int,int> s3; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/vaarg.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/vaarg.C deleted file mode 100755 index 56ae0d4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/vaarg.C +++ /dev/null @@ -1,28 +0,0 @@ -#include <stdarg.h> - -extern "C" void abort(); - -template <class T> -T* f(T t, ...) -{ - va_list ap; - - va_start(ap, t); - T* r = va_arg(ap, T*); - va_end(ap); - - return r; -} - - -struct S -{ -}; - -int main() -{ - S s; - - if (f(s, &s) != &s) - abort(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/vbase1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/vbase1.C deleted file mode 100755 index 58d26fc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/vbase1.C +++ /dev/null @@ -1,31 +0,0 @@ -// Check that template classes handle inherited virtual bases -// properly, initializing them before direct non-virtual bases. - -int aflag; - -struct A -{ - A() { aflag = 1; } -}; - -struct B : virtual public A -{ - B() { } -}; - -struct C -{ - C() { if (!aflag) exit (1); } -}; - -template<class Parent> -struct D : public C, public Parent -{ - D() { } -}; - -int -main () -{ - D<B> c; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/virtual1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/virtual1.C deleted file mode 100755 index efa97b7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/virtual1.C +++ /dev/null @@ -1,6 +0,0 @@ - struct V { virtual ~V() {} }; - template <class T> struct A : virtual V { }; - template <class T> struct B { - virtual void f() { T foo; } - }; - int main() { B< A<int> > bar; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/warn1.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/warn1.C deleted file mode 100755 index 96ed148..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.pt/warn1.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wunused - -template <class T> -struct S -{ - struct R - { - R(); - ~R(); - }; - - void foo() - { - R r; // no warning - int i; // WARNING - unused - } - - S(); - ~S(); -}; - -void f() -{ - S<int> si; - si.foo(); -} |