diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason')
416 files changed, 0 insertions, 7953 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/2371.C b/gcc/testsuite/g++.old-deja/g++.jason/2371.C deleted file mode 100644 index b11db5e0b33..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/2371.C +++ /dev/null @@ -1,571 +0,0 @@ -// GROUPS passed templates nested-classes -// Special g++ Options: -// -// The SetLS template test -// -// Wendell Baker, Berkeley CAD Group, 1993 (wbaker@ic.Berkeley.EDU) -// - - -#pragma implementation "ListS.h" -#pragma implementation "SetLS.h" - -#include <stdlib.h> -#include <iostream.h> -# 1 "../../templates/SetLS.h" 1 -// -*- C++ -*- - - - -// -// A Set Template - implemented with an ListS -// -// Wendell Baker, Berkeley CAD Group, 1993 (wbaker@ic.Berkeley.EDU) -// - - - - - -#pragma interface - - - - - -#define XTRUE true -#define XFALSE false - -# 37 "../../templates/SetLS.h" - - -# 1 "../../templates/ListS.h" 1 -// -*- C++ -*- - - - -// -// A List Template - providing a singly linked capability -// -// Wendell Baker, Berkeley CAD Group, 1993 (wbaker@ic.Berkeley.EDU) -// - - - - - -#pragma interface - - - - - - -# 1 "/projects/gnu-cygnus/gnu-cygnus-14/mips/lib/gcc-lib/decstation/cygnus-reno-1/g++-include/bool.h" 1 3 -// Defining XTRUE and XFALSE is usually a Bad Idea, -// because you will probably be inconsistent with anyone -// else who had the same clever idea. -// Therefore: DON'T USE THIS FILE. - - - - - - - - - -# 26 "../../templates/ListS.h" 2 - -# 37 "../../templates/ListS.h" - - - -// g++ reno-1 is not yet capable of creating templates with nested -// classes which instantiate the template arguments. -template<class T> -struct ListS_link { - T item; - ListS_link<T> *next; - - ListS_link(const T& i, ListS_link<T> *n = 0): item(i), next(n) - { } -}; - - -// -// For now, errors are raised by ::abort() because exceptions -// are not well implemented in cxx or at all in CC 3.0.1 -// -template<class T> -class ListS { -public: - ListS(); - ListS(const ListS<T>&); - ~ListS(); - - void operator=(const ListS<T>&); - - unsigned length() const - { return count; } - - void prepend(const T& item); - void append(const T& item); - void clear(); - - const T& head() const - { ensure_1(); - return head_link->item; } - T& head() - { ensure_1(); - return head_link->item; } - void head(T& fill) const - { ensure_1(); - fill = head_link->item; } - void remove_head() - { remove_head_filling(0); } - void remove_head(T& fill) - { remove_head_filling(&fill); } - - const T& tail() const - { ensure_1(); - return tail_link->item; } - T& tail() - { ensure_1(); - return tail_link->item; } - void tail(T& fill) const - { ensure_1(); - fill = tail_link->item; } - - class Vix { - public: - Vix(): owner(0), index(0) - { } - - // These are friend functions so that v == x is the same as x == v - friend int operator==(void *v, const Vix& x) - { return v == x.index; } - friend int operator==(const Vix& x, void *v) - { return v == x.index; } - friend int operator!=(void *v, const Vix& x) - { return v != x.index; } - friend int operator!=(const Vix& x, void *v) - { return v != x.index; } - friend int operator==(const Vix& x1, const Vix& x2) - { return x1.owner == x2.owner && x1.index == x2.index; } - friend int operator!=(const Vix& x1, const Vix& x2) - { return x1.owner != x2.owner || x1.index != x2.index; } - private: - friend class ListS<T>; - - - Vix(const ListS<T> *o, ListS_link<T> *i): owner(o), index(i) - { } - - - - - - const ListS<T> *owner; - - ListS_link<T> *index; - - - - }; - - Vix first() const - { return Vix(this, head_link); } - void next(Vix& x) const - { check(x); - if (x.index != 0) - x.index = x.index->next; } - T& operator()(const Vix& x) - { check(x); - return x.index->item; } - const T& operator()(const Vix& x) const - { check(x); - return x.index->item; } -protected: -# 154 "../../templates/ListS.h" - - - unsigned count; - - ListS_link<T> *head_link; // 0 for a zero-length list - ListS_link<T> *tail_link; // 0 for a zero-length list - - - - - -private: - // fill may be 0 (then don't fill) - void remove_head_filling(T *fill); - - void ensure_1() const - { if (0 == head_link) - ::abort(); } - void check(const Vix& x) const - { if (this != x.owner) - ::abort(); - if (0 == x.index) - ::abort(); } -}; - -template<class T> -ListS<T>::ListS(): -count(0), -head_link(0), -tail_link(0) -{ } - -template<class T> -ListS<T>::ListS(const ListS<T>& other): -count(0), -head_link(0), -tail_link(0) -{ - for (Vix x=other.first(); 0 != x; other.next(x)) - append(other(x)); -} - -template<class T> -ListS<T>::~ListS() -{ - clear(); -} - -template<class T> -void -ListS<T>::operator=(const ListS<T>& other) -{ - clear(); - for (Vix x=other.first(); 0 != x; other.next(x)) - append(other(x)); -} - -template<class T> -void -ListS<T>::prepend(const T& item) -{ - - head_link = new ListS_link<T>(item, head_link); - - - - if (0 == tail_link) - tail_link = head_link; - count++; -} - -template<class T> -void -ListS<T>::append(const T& item) -{ - - ListS_link<T> *new_link = new ListS_link<T>(item); - - - - if (0 == tail_link) { - head_link = new_link; - tail_link = new_link; - } else { - tail_link->next = new_link; - tail_link = tail_link->next; - } - count++; -} - -template<class T> -void -ListS<T>::clear() -{ - - ListS_link<T> *next, *l; - - - - for (l=head_link; 0 != l; l=next) { - next = l->next; - delete l; - } - - count = 0; - head_link = 0; - tail_link = 0; -} - -template<class T> -void -ListS<T>::remove_head_filling(T* fill) -// fill may be 0 in which case don't assign into it -{ - ensure_1(); - - ListS_link<T> *ohead = head_link; - - - - if (0 != fill) - *fill = ohead->item; - head_link = ohead->next; - if (0 == head_link) - tail_link = 0; - count--; - delete ohead; -} - - -# 39 "../../templates/SetLS.h" 2 - - -# 62 "../../templates/SetLS.h" - -template<class T> -class SetLS { -public: - SetLS(); - - void add(const T& item); - // There is no remove(const T& item) for this set - bool contains(const T& item) const; - - unsigned length() const - { return list.length(); } - - void clear() - { list.clear(); } - - class Vix { - public: - Vix(): owner(0), vix() - { } - - // These are friend functions so that v == x is the same as x == v - friend int operator==(void *v, const Vix& x) - { return v == x.vix; } - friend int operator==(const Vix& x, void *v) - { return v == x.vix; } - friend int operator!=(void *v, const Vix& x) - { return v != x.vix; } - friend int operator!=(const Vix& x, void *v) - { return v != x.vix; } - friend int operator==(const Vix& x1, const Vix& x2) - { return x1.owner == x2.owner && x1.vix == x2.vix; } - friend int operator!=(const Vix& x1, const Vix& x2) - { return x1.owner != x2.owner || x1.vix != x2.vix; } - private: - friend class SetLS<T>; - - Vix(const SetLS<T> *o, const ListS<T>::Vix& x): owner(o), vix(x) - { } - - const SetLS<T> *owner; - ListS<T>::Vix vix; - }; - friend class Vix; - - Vix first() const - { return Vix(this, list.first()); } - void next(Vix& x) const - { check(x); - list.next(x.vix); } - const T& operator()(const Vix& x) const - { check(x); - return list(x.vix); } - // There is item no remove(const Vix&) for this set -protected: - ListS<T> list; - -private: - void check(const Vix& x) const - { if (this != x.owner) - ::abort(); } -}; - - -template<class T> -SetLS<T>::SetLS(): - - - -list() - -{ } - -template<class T> -void -SetLS<T>::add(const T& item) -{ - if ( ! contains(item) ) { - - - - list.append(item); - - } -} - -template<class T> -bool -SetLS<T>::contains(const T& item) const -{ - for (Vix x=first(); 0 != x; next(x)) { - if (operator()(x) == item) - return XTRUE; - } - return XFALSE; -} - - -# 14 "SetLS.cc" 2 - - - -# 1 "/projects/gnu-cygnus/gnu-cygnus-14/mips/lib/gcc-lib/decstation/cygnus-reno-1/g++-include/iostream.h" 1 3 -// This is part of the iostream library, providing -*- C++ -*- input/output. -// Copyright (C) 1991 Per Bothner. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free -// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# 211 "/projects/gnu-cygnus/gnu-cygnus-14/mips/lib/gcc-lib/decstation/cygnus-reno-1/g++-include/iostream.h" 3 - -# 21 "SetLS.cc" 2 - - -// In (most versions of) g++ 2.X, this use of typedefs has the effect -// of causing the instantiation of the templates, thereby testing the -// templates - -class test { -public: - test(): value(0) - { } - test(int v): value(v) - { } - - void print(ostream& out) const - { out << value; } - - friend int operator==(const test& a, const test& b); -private: - int value; -}; - -int -operator==(const test& a, const test& b) -{ - return a.value == b.value; -} - -ostream& -operator<<(ostream& o, const test& t) -{ - t.print(o); - return o; -} - -typedef SetLS<test> SLS; - -static ostream& -operator<<(ostream& o, const SLS& s) -{ - o << "set of " << s.length() << " = {"; - - bool first; - SetLS<test>::Vix x; - for (first=XTRUE, x=s.first(); 0 != x; s.next(x), first=XFALSE) { - if ( ! first ) - o << ','; - o << ' '; - s(x).print(o); - } - o << '}'; - - return o; -} - -SLS gsls; -const SLS gcsls; - -int foo() -{ - const unsigned SIZE = 20; - - // - // SetLS() - // SetLS(const SetLS<T>&) - // - SLS sls; - { - // Fill sls with some interesting values - for (unsigned i=0; i<SIZE; i++) { - test t = i; - sls.add(t); - } - } - - const SLS csls(sls); - - // - // void operator=(const SetLS<T>&); - // - sls = csls; - - // - // bool contains(const T& item) const - // - for (unsigned i=0; i<SIZE; i++) { - test t = i; - - int contains = sls.contains(t); - } - - // - // void clear() - // - sls.clear(); - if (sls.length() != 0) - ::abort(); - - sls = csls; - - // - // Vix first() const - // void next(Vix& x) const - // T& operator()(const Vix& x) - // const T& operator()(const Vix& x) const - // - SetLS<test>::Vix cx; - for (cx=csls.first(); 0 != cx; sls.next(cx)) { - if ( ! sls.contains(csls(cx)) ) - ::abort(); - } - - cout << "gsls:\t" << gsls << '\n'; - cout << "gcsls:\t" << gcsls << '\n'; - cout << "sls:\t" << sls << '\n'; - cout << "csls:\t" << csls << '\n'; -} - -// Dummy function so it'll run -int main() -{ - cout << "PASS" << endl; -} - -template class ListS<test>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/3523.C b/gcc/testsuite/g++.old-deja/g++.jason/3523.C deleted file mode 100644 index f47bd7b5bf3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/3523.C +++ /dev/null @@ -1,40 +0,0 @@ -// Build don't link: -// GROUPS passed assignment -class ccUnwind -{ -public: - virtual ~ccUnwind (); // comment out virtual, and void diag changes -}; - -template<class T> -class ccHandle : public ccUnwind // similarly comment out inheritance -{ -public: - ccHandle& operator = (const ccHandle& h); -}; - -class cc_Image; - -class ccImage : public ccHandle<cc_Image> -{ -public: -// reversing the order of the next two lines changes the diagnostic -// printed about the def of ccDisplay::image - ccImage (const ccImage &); - ccImage (const cc_Image &); -}; - -class ccDisplay -{ -public: - ccImage img; -//ccImage image ( ccImage i) {img = i; return img;} -// above line compiles - ccImage image ( ccImage i) { return img = i;} /* this gets void* error */ -}; - - - -// vd.C: In method `class ccImage ccDisplay::image (class ccImage)': -// vd.C:31: bad argument 1 for function `ccImage::ccImage (const class cc_Image&)' (type was void *) -// vd.C:31: in base initialization for class `ccImage' diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access1.C b/gcc/testsuite/g++.old-deja/g++.jason/access1.C deleted file mode 100644 index fff77f25749..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Bug: access declarations are broken. -// Build don't link: - -class A { -public: - void foo (); -}; - -class B: private A { -public: - A::foo; -}; - -void foo() { - B b; - b.foo (); // gets bogus error - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access10.C b/gcc/testsuite/g++.old-deja/g++.jason/access10.C deleted file mode 100644 index 6db610c5010..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access10.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 4839 -// Bug: The initializer of a static member of a class has the same acess -// rights as a member function. g++ doesn't realize that. -// Build don't link: - -class X -{ - X (int); - static X foo; -public: - void dummy(); -}; - -X X::foo = 9; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access11.C b/gcc/testsuite/g++.old-deja/g++.jason/access11.C deleted file mode 100644 index 31a89b2ede8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access11.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 4900 -// Bug: g++ doesn't apply access control uniformly to type conversion operators -// Build don't link: - -struct A { -protected: - operator int * () const; -}; - -struct B : public A { - int * foo () { return A::operator int *(); } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access12.C b/gcc/testsuite/g++.old-deja/g++.jason/access12.C deleted file mode 100644 index 71e336180e6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access12.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 4694 -// Bug: g++ doesn't realize that A::i refers to a member of `this' in B(). -// Build don't link: - -class A { -protected: - int i; -}; - -struct B : public A { - B () { A::i = 0; } -}; - -struct C : public B { - C () { B::i = 0; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access13.C b/gcc/testsuite/g++.old-deja/g++.jason/access13.C deleted file mode 100644 index c12dd81dc87..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access13.C +++ /dev/null @@ -1,15 +0,0 @@ -// PRMS Id: 4955 -// Build don't link: - -struct A { - protected: - int i; - void f (); -}; - -struct B: public A { - void g () { - this->A::i = 1; // gets bogus error - access control failure - this->A::f(); // gets bogus error - access control failure - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access14.C b/gcc/testsuite/g++.old-deja/g++.jason/access14.C deleted file mode 100644 index f181906ec97..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access14.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -template <class T> struct A { T t; }; - -template <class T> class B: private T { - public: - T::t; // gets bogus error - doesn't recognize access decl -}; - -template class B<A<int> >; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access15.C b/gcc/testsuite/g++.old-deja/g++.jason/access15.C deleted file mode 100644 index 4380998521f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access15.C +++ /dev/null @@ -1,18 +0,0 @@ -// Bug: g++ complains about Z being a private base when trying to -// initialize B::foo. -// Build don't link: - -struct Z { - Z(); - Z(int); -}; - -struct A : private Z { }; -struct B : public A -{ - Z foo; - B(); - B(const B&); -}; - -B::B() : foo(1) { } // gets bogus error diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access16.C b/gcc/testsuite/g++.old-deja/g++.jason/access16.C deleted file mode 100644 index b8d43f3c4c9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access16.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: g++ uses the same binfo for the a subobject of c and the a subobject -// of b, so basetype_paths get bashed improperly. -// Build don't link: - -class a { -protected: - virtual void foo() { } // gets bogus error -}; - -class b : public virtual a {}; - -class c : public b { -public: - void bar() { b::foo(); } // gets bogus error -}; - -int main() { - c test; - test.bar(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access17.C b/gcc/testsuite/g++.old-deja/g++.jason/access17.C deleted file mode 100644 index 676eac1bcc1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access17.C +++ /dev/null @@ -1,24 +0,0 @@ -// Make sure definitions of static members have the right access. -// Build don't link: - -struct A { -protected: - int i; // ERROR - private - int f (); // ERROR - -}; - -struct B: public A { - static int A::*p; - static int (A::*fp)(); -}; - -int A::* B::p = &A::i; -int (A::* B::fp)() = &A::f; - -struct C { - static int A::*p; - static int (A::*fp)(); -}; - -int A::* C::p = &A::i; // ERROR - -int (A::* C::fp)() = &A::f; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access18.C b/gcc/testsuite/g++.old-deja/g++.jason/access18.C deleted file mode 100644 index 11b7e10ed47..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access18.C +++ /dev/null @@ -1,23 +0,0 @@ -// PRMS Id: 5073 -// Bug: g++ doesn't catch access violations in base initializers. -// Special g++ Options: -w - -int r = 0; -class A { - private: - A() { r = 1; } // ERROR - - ~A() {} // ERROR - -}; - -class B : public A { - public: - B(): A() {} // ERROR - - B(const B&) {} // ERROR - - ~B() { } // ERROR - private dtor -}; - -main() -{ - B b; - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access2.C b/gcc/testsuite/g++.old-deja/g++.jason/access2.C deleted file mode 100644 index cacfbe1c6a3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access2.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ doesn't deal with friends also being derived classes. -// Build don't link: - -class A { - int i; - friend class B; -}; - -class B : public A { - void f () { i = 1; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access20.C b/gcc/testsuite/g++.old-deja/g++.jason/access20.C deleted file mode 100644 index 96093dc0190..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access20.C +++ /dev/null @@ -1,39 +0,0 @@ -// PRMS Id: 6662 -// Bug: we crash trying to check the access on anglesSinesCosines. -// Build don't link: - -#define Double double - -class GCTransform -{ - protected: - struct angle - { - Double phi1 ; - Double phi2 ; - } ; - - struct sineAndCosine - { - Double cosine1 ; - Double cosine2 ; - Double sine1 ; - Double sine2 ; - } ; - - union anglesSinesCosines - { - struct angle a ; - struct sineAndCosine siCo ; - } ; -}; - -class GCTransTransmit : public GCTransform -{ - protected: - - struct GCTransTransmitDataTemp - { - union anglesSinesCosines t ; // causes abort - } ; -} ; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access21.C b/gcc/testsuite/g++.old-deja/g++.jason/access21.C deleted file mode 100644 index 340ed61fe97..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access21.C +++ /dev/null @@ -1,22 +0,0 @@ -// PRMS Id: 6877 -// Build don't link: - -typedef __SIZE_TYPE__ size_t; -class aa { -public: - aa(); - ~aa(); -private: - int iaa; - void operator delete(void*, size_t); -}; - -class bb { -public: - aa caa; -}; // gets bogus error - calling private delete - -void -f(){ - bb abb; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access22.C b/gcc/testsuite/g++.old-deja/g++.jason/access22.C deleted file mode 100644 index 225ef6cad5c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access22.C +++ /dev/null @@ -1,21 +0,0 @@ -// PRMS Id: 8518 -// Bug: Call to foo is not checked for accessibility - -class A -{ - private: - static void foo() {} // ERROR - - public: - void goo() {} -}; - -struct B : public A -{ - void func() { foo(); } // ERROR - -}; - -int main() -{ - B b; - b.func(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access23.C b/gcc/testsuite/g++.old-deja/g++.jason/access23.C deleted file mode 100644 index 99e0b4565ce..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access23.C +++ /dev/null @@ -1,79 +0,0 @@ -// PRMS Id: 9127 -// Bug: members of anonymous unions are not access-controlled. - -#include <stdio.h> - -struct Foo { -public: - union { - long A; - void *pX; - }; - union X { - long A; - void *pX; - } PUB ; - int PUB_A; -protected: - union { - long B; // ERROR - protected - void *pY; // ERROR - protected - } ; - union Y { - long B; - void *pY; - } PRT; // ERROR - protected - int PRT_A; // ERROR - protected -private: - union { - long C; // ERROR - private - void *pZ; // ERROR - private - }; - union Z { - long C; - void *pZ; - } PRV; // ERROR - private - int PRV_A; // ERROR - private -}; - -struct Bar : public Foo { -public: - void DoSomething() { - PUB_A = 0; - Foo::A = 0; - printf("%x\n",pX); - Foo::PUB.A = 0; - printf("%x\n",PUB.pX); - B = 0; - printf("%x\n",Foo::pY); - PRT_A = 0; - PRT.B = 0; - printf("%x\n",Foo::PRT.pY); - PRV_A = 0; // ERROR - - Foo::C = 0; // ERROR - - printf("%x\n",pZ); // ERROR - - Foo::PRV.C = 0; // ERROR - - printf("%x\n",PRV.pZ); // ERROR - - } -}; - -int main() -{ - Foo a; - - a.PUB_A = 0; - a.A = 0; - printf("%x\n",a.pX); - a.PRT_A = 0; // ERROR - - a.B = 0; // ERROR - - printf("%x\n",a.pY); // ERROR - - a.PRV_A = 0; // ERROR - - a.C = 0; // ERROR - - printf("%x\n",a.pZ); // ERROR - - a.PUB.A = 0; - printf("%x\n",a.PUB.pX); - a.PRT.B = 0; // ERROR - - printf("%x\n",a.PRT.pY); // ERROR - - a.PRV.C = 0; // ERROR - - printf("%x\n",a.PRV.pZ); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access24.C b/gcc/testsuite/g++.old-deja/g++.jason/access24.C deleted file mode 100644 index 7c423598723..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access24.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: forward reference to friend doesn't work in template. -// Build don't link: - -template <class T> class A { - static int i; - friend struct B; -}; - -struct B { - void f () { A<int>::i = 0; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access3.C b/gcc/testsuite/g++.old-deja/g++.jason/access3.C deleted file mode 100644 index fae6c9323e1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Simple testcase for access control. -// Build don't link: - -class A { - protected: - void f (); -}; - -class B : public A { - public: - void f () { A::f(); } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access4.C b/gcc/testsuite/g++.old-deja/g++.jason/access4.C deleted file mode 100644 index 51f5fb10f8e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access4.C +++ /dev/null @@ -1,14 +0,0 @@ -// Simple testcase for access control. -// Build don't link: - -class A { -protected: - static int i; -}; - -class B: public A { }; - -class C: public B { -public: - void g () { B b; b.i; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access5.C b/gcc/testsuite/g++.old-deja/g++.jason/access5.C deleted file mode 100644 index 5eec43d936e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access5.C +++ /dev/null @@ -1,12 +0,0 @@ -// Simple testcase for access control. -// Build don't link: - -class A { - protected: - void f (); -}; - -class B : public A { }; -class C : public B { - void f () { B::f(); } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access6.C b/gcc/testsuite/g++.old-deja/g++.jason/access6.C deleted file mode 100644 index 24676d4050b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access6.C +++ /dev/null @@ -1,12 +0,0 @@ -// Simple testcase for access control. -// Build don't link: - -class A { - public: - void f (); -}; - -class B: protected A { }; -class C: protected B { - void g() { f (); } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access7.C b/gcc/testsuite/g++.old-deja/g++.jason/access7.C deleted file mode 100644 index a1e908f8ece..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access7.C +++ /dev/null @@ -1,13 +0,0 @@ -// Simple testcase for access control. -// Build don't link: - -class A { - protected: - static void f (); -}; - -class B: public A {}; -class C: public A {}; -class D: public C, public B { - void g () { A::f(); } // gets bogus error - wrongly ambiguous static member call -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access8.C b/gcc/testsuite/g++.old-deja/g++.jason/access8.C deleted file mode 100644 index c8addcd73a1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access8.C +++ /dev/null @@ -1,29 +0,0 @@ -// From: smidt@dd.chalmers.se (Peter Smidt) -// Date: 25 Jan 1994 23:41:33 -0500 -// Bug: g++ forgets access decls after the definition. -// Build don't link: - -class inh { - int a; -protected: - void myf(int); -}; - -class mel : private inh { -protected: - int t; - inh::myf; -}; - -class top_t : protected mel { -public: - void myf(int); -}; - -void inh::myf(int i) { - a = i; -} - -void top_t::myf(int i) { - inh::myf(i); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access9.C b/gcc/testsuite/g++.old-deja/g++.jason/access9.C deleted file mode 100644 index f9c2797d72b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/access9.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: g++ doesn't allow const objects to be constructed. -// Build don't link: - -struct B { B(); }; - -const B foo() -{ - return B(); // gets bogus error - constructing const -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/aggregate.C b/gcc/testsuite/g++.old-deja/g++.jason/aggregate.C deleted file mode 100644 index 8128d8de620..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/aggregate.C +++ /dev/null @@ -1,13 +0,0 @@ -struct A { int i; }; - -int main() -{ - A a1 = { 42 }; - A a2 (a1); - A a3 = { 137 }; - a1 = a3; - - if (a1.i == 137 && a2.i == 42 && a3.i == 137) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ambig1.C b/gcc/testsuite/g++.old-deja/g++.jason/ambig1.C deleted file mode 100644 index 4551dc7d6e4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ambig1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Testcase for ambiguity between functional cast and abstract declarator. -// This ambiguity accounts for 6 of the r/r conflicts. -// Special g++ Options: -pedantic-errors - -int i = sizeof (int ()); // ERROR - sizeof applied to fn type -int j = sizeof (int () + 1); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ambig2.C b/gcc/testsuite/g++.old-deja/g++.jason/ambig2.C deleted file mode 100644 index c6da7528bd3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ambig2.C +++ /dev/null @@ -1,11 +0,0 @@ -// Testcase for ambiguity between cast and parmlist. -// This ambiguity accounts for 1 of the r/r conflicts. -// Do not compile with -pedantic so that the compiler will accept taking -// the sizeof a function type. -// Special g++ Options: -Wno-pointer-arith -// Build don't link: - -void f(){ - (void)sizeof(int((int)1.2)); - (void)sizeof(int((int))); // gets bogus error - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ambig3.C b/gcc/testsuite/g++.old-deja/g++.jason/ambig3.C deleted file mode 100644 index 3f01660bf98..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ambig3.C +++ /dev/null @@ -1,16 +0,0 @@ -// Testcase for ambiguity between function and variable declaration (8.2). -// Build don't link: - -struct A { - A (int, int); - int k; -}; - -void f () -{ - int i[2], j; - A a (int (i[1]), j); // gets bogus error - late parsing XFAIL *-*-* - A b (int (i[1]), int j); // function - a.k = 0; // gets bogus error - late parsing XFAIL *-*-* - b (i, j); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/anon.C b/gcc/testsuite/g++.old-deja/g++.jason/anon.C deleted file mode 100644 index 63d17a8cb2d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/anon.C +++ /dev/null @@ -1,18 +0,0 @@ -// Bug: g++ has trouble copying anonymous structs. - -typedef struct { int i; } foo; -struct A : public foo { - struct { int i; } x; -}; - -int main () -{ - A a; - a.i = 5; - a.x.i = 42; - A b (a); - a = b; - if (a.i != 5 || a.x.i != 42) - return 1; - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/anon2.C b/gcc/testsuite/g++.old-deja/g++.jason/anon2.C deleted file mode 100644 index 55d68988e5c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/anon2.C +++ /dev/null @@ -1,7 +0,0 @@ -// g++ should not complain about anonymous bitfields. -// Build don't link: - -struct A -{ - int : 2; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/anon3.C b/gcc/testsuite/g++.old-deja/g++.jason/anon3.C deleted file mode 100644 index b3f05f8ad14..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/anon3.C +++ /dev/null @@ -1,25 +0,0 @@ -// Bug: g++ dies. -// Build don't link: - -class cl { -public: - cl(); - void set(void *, char *, int); -private: - union { - float vf; - struct ff { - void *ptr; - char *name; - int sz; - } *vff; - }; -}; - -void cl::set(void *p, char *n, int sz) -{ - vff = new ff; // This procude an internal compiler error. - vff->ptr = p; - vff->name = n; - vff->sz = sz; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/anon4.C b/gcc/testsuite/g++.old-deja/g++.jason/anon4.C deleted file mode 100644 index de0b40e2aec..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/anon4.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 5371 -// Bug: g++ screws up the alignment of buff and dies. -// Build don't link: -// Special g++ Options: -O - -main() -{ - union { - double a; - char buff[sizeof(double)]; - }; - - void *p = buff; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/binding.C b/gcc/testsuite/g++.old-deja/g++.jason/binding.C deleted file mode 100644 index cc6f25c6ed9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/binding.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ only looks in the current temporary binding level for a name. - -struct T { ~T(); }; - -int main() -{ - foo: - T t; // ERROR - redeclared - bar: - T t; // ERROR - redeclaration -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/binding2.C b/gcc/testsuite/g++.old-deja/g++.jason/binding2.C deleted file mode 100644 index e56a0544b47..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/binding2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ screws up binding levels in a switch statement with cleanups. -// Build don't link: - -struct A { - ~A() { } -}; - -int f (int i) -{ - switch (i) { - default: - A a; - } - return 1; -} // causes compiler segfault diff --git a/gcc/testsuite/g++.old-deja/g++.jason/binding3.C b/gcc/testsuite/g++.old-deja/g++.jason/binding3.C deleted file mode 100644 index 3cd358fb7af..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/binding3.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: g++ fails to clear out the IDENTIFIER_CLASS_VALUEs of various names -// after a class definition. -// Build don't link: - -struct A { - typedef double T; - virtual T f () = 0; -}; - -class B { - B (const B&); - void operator=(const B&); -public: - B (); - typedef void * T; -}; - -struct C : public A { - T f (); // gets bogus error -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool.C b/gcc/testsuite/g++.old-deja/g++.jason/bool.C deleted file mode 100644 index e446f12fab6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool.C +++ /dev/null @@ -1,46 +0,0 @@ -// Testcase for uses of bool. -// Build don't link: - -int i,j,k; - -/* Check that types of certain expressions are bool. */ -void f () -{ - i ? j == k : true; - i ? j < k : true; - i ? j && k : true; -} - -/* Check that g++ can find a conversion to bool when one exists. */ -struct A { operator char * (); } a; -struct B { operator int (); } b; -struct C { operator float (); } c; -struct D { operator bool (); } d; -struct E { operator int E::* (); } e; - -void g () -{ - a || true; - b || true; - c || true; // gets bogus error - d || true; - e || true; -} - -/* Check for support in templates. */ -template <class T> struct F { }; -template class F<bool>; - -template <class T> void f (T, bool) { }; -template void f (bool, bool); - -/* Special cases. */ -void h () -{ - /* Used to cause infinite recursion. */ - i&1 || true; - /* Should find conversion path to int. */ - d == true; -} - -bool boo = -1; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool2.C b/gcc/testsuite/g++.old-deja/g++.jason/bool2.C deleted file mode 100644 index 559b7d07615..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Make sure that bool bitfields promote to int properly. - -struct F { - bool b1 : 1; - bool b2 : 7; -}; - -int main() -{ - F f = { true, true }; - - if (int (f.b1) != 1) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool3.C b/gcc/testsuite/g++.old-deja/g++.jason/bool3.C deleted file mode 100644 index d8e95147b75..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool3.C +++ /dev/null @@ -1,13 +0,0 @@ -// From: panisset@cae.ca (Jean-Francois Panisset) -// Subject: Problem with constant expressions for bitfields -// Date: Mon, 6 Jun 94 14:00:01 EDT - -// Bug: g++ doesn't treat boolean true and false as constant values. -// Build don't link: - -enum E { e1,e2,e3,e4,e5 }; - -struct X -{ - unsigned int bits : ((e5 > 4) ? 8 : 4); // gets bogus error - constant expression -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool4.C b/gcc/testsuite/g++.old-deja/g++.jason/bool4.C deleted file mode 100644 index 8c4695dec72..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Test for allowing conversion to bool. - -struct A { }; - -int main () -{ - bool b = (void*)0; - b = (int A::*)0; - b = (int (A::*)())0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C b/gcc/testsuite/g++.old-deja/g++.jason/bool5.C deleted file mode 100644 index 8f8e37d4eb3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C +++ /dev/null @@ -1,10 +0,0 @@ -int main () -{ - bool b = false; - int i = b++; - if (i != false || b != true) - return 1; - i = b++; - if (i != true || b != true) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool6.C b/gcc/testsuite/g++.old-deja/g++.jason/bool6.C deleted file mode 100644 index 493e25f73f3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool6.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: The conversion from bool to int gets stripped. -// Build don't link: - -bool b; - -int main () -{ - return ((!b) != 0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool7.C b/gcc/testsuite/g++.old-deja/g++.jason/bool7.C deleted file mode 100644 index 1ecb68d4e04..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool7.C +++ /dev/null @@ -1,29 +0,0 @@ -// Build don't link: - -struct A -{ - operator bool () const; - operator const void * () const; -}; - -struct B -{ - A a; - int foo1 (); - int foo2 (); -}; - -int -B::foo1 () -{ - return a ? 0 : 1; // ambiguous default type conversion for `operator !=' -} - -int -B::foo2 () -{ - if (a) - return 0; - else - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/builtin.C b/gcc/testsuite/g++.old-deja/g++.jason/builtin.C deleted file mode 100644 index 0e0cc48c691..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/builtin.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ overloads strlen instead of bashing the builtin version. -// Special g++ Options: -w -// Build don't link: - -extern "C" void strlen (const char *); - -void f () -{ - strlen("Hi"); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/builtin2.C b/gcc/testsuite/g++.old-deja/g++.jason/builtin2.C deleted file mode 100644 index 698d0a12112..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/builtin2.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -inline void strlen (const char *) { } - -void f () -{ - strlen("Hi"); // gets bogus error - wrongful overload -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/byval.C b/gcc/testsuite/g++.old-deja/g++.jason/byval.C deleted file mode 100644 index bd17797a181..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/byval.C +++ /dev/null @@ -1,19 +0,0 @@ -// Bug: a is destroyed in both foo() and main() - -int count; - -struct A { - double a,b; - A(int) { count++; } - A(const A&) { count++; } - ~A() { count--; } -}; - -void foo (A a) -{ } - -int main() -{ - foo (1); - return count; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/byval2.C b/gcc/testsuite/g++.old-deja/g++.jason/byval2.C deleted file mode 100644 index 490e625805d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/byval2.C +++ /dev/null @@ -1,23 +0,0 @@ -// From: panisset@cae.ca (Jean-Francois Panisset) -// Subject: 2.6.0 pre-rel, internal error, regression, mips-sgi-irix4 -// Date: Thu, 14 Jul 94 23:34:21 EDT -// Build don't link: - -class Char -{ -protected: - char rep; -public: - Char (const char ) {}; - operator char() const; - void operator -= (const Char ); -}; - -inline Char operator - (const Char a, const Char b) {} -inline char operator == (const Char a, const char b) {} - -char mystrcmp(Char s[31], Char t[31]) -{ - for (; *s == *t; ++s, ++t) if (*s == '\0') return 0; - return char(*s - *t); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/byval3.C b/gcc/testsuite/g++.old-deja/g++.jason/byval3.C deleted file mode 100644 index 7c2a798ed47..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/byval3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Test to make sure that value return of classes with cleanups works; it -// has been broken at various times on PCC_STATIC_STRUCT_RETURN targets. -// Build don't link: - -struct A {}; - -struct R : virtual A { virtual ~R(); }; - -R g(); - -void encode() -{ - g(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/c-inline.C b/gcc/testsuite/g++.old-deja/g++.jason/c-inline.C deleted file mode 100644 index 7e90c4ea027..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/c-inline.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: the compiler gets hopelessly confused. -// Build don't link: - -#line 1 "c-inline.h" -#pragma interface -inline double abs (double) { return 0.0; } -inline short abs (short) { return 0; } -#line 2 "c-inline.C" -extern "C" { - inline int abs (int) { return 0; } // causes segfault - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/c2.C b/gcc/testsuite/g++.old-deja/g++.jason/c2.C deleted file mode 100644 index ba7f0ed0d55..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/c2.C +++ /dev/null @@ -1,18 +0,0 @@ -// PRMS Id: 3134 -// g++ understands C redeclaration semantics. Sun CC 2.0.1 doesn't. -// Special g++ Options: -// Build don't link: - -extern "C" { - int foo(); - int foo(int); - - int bar(int); - int bar(); -} - -main() -{ - foo (1); - bar (1); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cast1.C b/gcc/testsuite/g++.old-deja/g++.jason/cast1.C deleted file mode 100644 index 4e987eafece..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cast1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: g++ fails to grok functional casts in all situations. -// Build don't link: - -class A { -public: - typedef int B; - static B foo() { return B(1); } // gets bogus error - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cast2.C b/gcc/testsuite/g++.old-deja/g++.jason/cast2.C deleted file mode 100644 index 02495b346d1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cast2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// The compiler tried to build up a double with a NOP_EXPR from -// integer_zero_node, which fails. - -template <class T> -class vector { -public: - vector (int n, const T& value = T()) {} -}; - -void -foo (void) -{ - vector<double> v (10); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cast3.C b/gcc/testsuite/g++.old-deja/g++.jason/cast3.C deleted file mode 100644 index 5d599805aa3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cast3.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 7088 -// Build don't link: - -struct string -{ - int length () const; - string (string &); - string (char * = 0); - int operator [] (int); - ~string (); -}; - -string _cook(const string raw, bool for_postscript) -{ - unsigned char c = (unsigned) ((string &)raw)[1]; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cleanup.C b/gcc/testsuite/g++.old-deja/g++.jason/cleanup.C deleted file mode 100644 index d9adddec2e8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cleanup.C +++ /dev/null @@ -1,23 +0,0 @@ -// Bug: continue over object decl calls destructor but not constructor. - -int c = 0; -int d = 0; -extern "C" int printf(const char *,...); - -class Foo { -public: - Foo(){ c++; } - ~Foo(){ d++; } -}; - -int main() -{ - for(int i=0;i<2;i++){ - continue; - Foo bar; - } - printf ("%d %d\n", c, d); - if (c == d && d == 0) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C b/gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C deleted file mode 100644 index fdae1b72d59..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C +++ /dev/null @@ -1,15 +0,0 @@ -// PRMS Id: 6303 -// Bug: compiler crashes processing the cleanup for arrayOfClass. -// Build don't link: - -class Class { -public: - ~Class(); // This dtor MUST be declared to generate the error... -}; - -Class varOfClass; - -int main() { - // This MUST be 'const' to generate the error... - const Class arrayOfClass[1] = { varOfClass }; // causes abort -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/complete1.C b/gcc/testsuite/g++.old-deja/g++.jason/complete1.C deleted file mode 100644 index 0f140e16114..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/complete1.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 4695 -// Bug: g++ wrongly requires A to be complete here. -// Build don't link: - -struct A; - -void foo(const A &); - -void bar(A *p) -{ - foo(*p); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cond.C b/gcc/testsuite/g++.old-deja/g++.jason/cond.C deleted file mode 100644 index b613838797d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cond.C +++ /dev/null @@ -1,39 +0,0 @@ -// Build don't link: -// GROUPS passed rtti -// Negative testcase for decls in conditions. - -int main() -{ - float i; - - if (int i = 1) // ERROR - , XFAIL *-*-* - { - char i; // ERROR - , XFAIL *-*-* - char j; - } - else - { - short i; // ERROR - , XFAIL *-*-* - char j; - } - - if (struct A { operator int () { return 1; } } *foo = new A) // ERROR - - ; - - A bar; // ERROR - - - if (enum A { one, two, three } foo = one) // ERROR - - ; - - struct B { operator int () { return 2; } }; - - if (struct B * foo = new B) - ; - - if (int f () = 1) // ERROR - - ; - - if (int a[2] = {1, 2}) // ERROR - - ; - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cond2.C b/gcc/testsuite/g++.old-deja/g++.jason/cond2.C deleted file mode 100644 index 9a8e04546ee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/cond2.C +++ /dev/null @@ -1,65 +0,0 @@ -// Positive testcase for decls in conditions. - -extern "C" int printf(const char *, ...); - -int up = 0; -int down = 0; - -struct T -{ - int i; - T(int j) { i = j; printf("UP\n"); up++; } - T(const T& t) { i = t.i; printf("unwanted copy\n"); } - ~T() { printf ("DOWN\n"); down++; } - operator int () { return i; } -}; - -int main () -{ - int t; - - if (T t = 1) - ; - - printf ("\n"); - - int j = 3; - while (T t = j--) - ; - - printf ("\n"); - - j = 3; - while (1) - { - T t = j--; - if (t) continue; - break; - } - - printf ("\n"); - - j = 3; - for (;T t = j--;) - ; - - printf ("\n"); - - for (int k = 3; T t = k--;) - ; - - printf ("\n"); - - switch (T t = 34) - { - case 34: - ; - } - - printf ("\n"); - - if (up == down && up == 18) - return 0; - else - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/condexp.C b/gcc/testsuite/g++.old-deja/g++.jason/condexp.C deleted file mode 100644 index edfd12ef1a9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/condexp.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS id: 5629 -// Build don't link: - -struct String { const char *x; }; -class Pathname: public String { }; - -String -f(int i) -{ - Pathname p; - String s; - - return i ? p: s; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const.C b/gcc/testsuite/g++.old-deja/g++.jason/const.C deleted file mode 100644 index 2faf8e5811e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/const.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: a ends up in the text segment, so trying to initialize it causes -// a seg fault. - -struct A { - int i; - A(): i(0) {} - A(int j): i(j) {} -}; - -const A a; -const A b(1); - -int main () -{ - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const2.C b/gcc/testsuite/g++.old-deja/g++.jason/const2.C deleted file mode 100644 index 7dd956bc284..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/const2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Example of static member constants - -extern "C" int printf (const char *, ...); - -struct T { - static const char letter = 'a'; // this is the new stuff! - char x[letter]; - void f(); -}; - -void T::f() { printf ("%p", &letter); } -const char T::letter; // still need def after class - -int main() { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const3.C b/gcc/testsuite/g++.old-deja/g++.jason/const3.C deleted file mode 100644 index 3ff8f0c89a6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/const3.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: bar isn't emitted, which causes havoc. - -extern int i; -const int bar = i; -int i = 5; - -int main() -{ - return bar != 5; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const4.C b/gcc/testsuite/g++.old-deja/g++.jason/const4.C deleted file mode 100644 index b8b8efa0ae6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/const4.C +++ /dev/null @@ -1,24 +0,0 @@ -// PRMS Id: 8927 -// Bug: complex inheritance interferes with const checking - -class GrandParent { -public: - virtual void DoIt(); -protected: - int A; -}; - -class Parent : virtual public GrandParent { -public: - virtual void DoX() const; -}; - -class Child : public Parent { -public: - void DoX() const; -}; - -void Child::DoX() const -{ - A = 10; // ERROR - assignment to const -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/context.C b/gcc/testsuite/g++.old-deja/g++.jason/context.C deleted file mode 100644 index a9a83631992..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/context.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 3988 -// Bug: DECL_CONTEXT of A::B gets clobbered in pushdecl when defining A::foo(). -// Build don't link: - -#pragma implementation "context.h" -#line 1 "context.h" -#pragma interface - -template <class T> -struct A { - inline void foo () { } - class B { }; -}; - -struct C : public A<int> { - void bar (C::B&); -}; -#line 2 "context.C" - -void C::bar (C::B& b) { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion.C deleted file mode 100644 index 80436f355a2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: g++ doesn't find the conversion path from DPtr& to B*. -// Build don't link: - -class B {}; -class D : public B {}; -class DPtr -{ -public: - operator D*() const; -}; - -void foo (B* bp); -void bar (DPtr& dp) -{ - foo (dp); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion10.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion10.C deleted file mode 100644 index 97bb70744cb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion10.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS Id: 9019 -// Bug: g++ doesn't find conversion to const char *. -// Build don't link: - -struct String { - String (); - explicit String (const char *); - operator const char * (); -}; - -int main(int argc, char **argv) -{ - String deflt("no args"); - String useme; - - const char *p = (argv[1]) ? argv[1] : deflt; - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C deleted file mode 100644 index c0c6ca4159c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C +++ /dev/null @@ -1,26 +0,0 @@ -// PRMS Id: 8805 -// Bug: The two-level conversion is not found when calling a global fn. - -class Int { -public: - Int(int A); -}; - -class Ding { -public: - Ding(Int A); -}; - -class Something { -public: - void DoSomething(Ding A); // ERROR - referred to -}; - -void DoSomething(Ding A); - -void foo(Something* pX) -{ - DoSomething(1); // ERROR - - pX->DoSomething(1); // ERROR - - (*pX).DoSomething(1); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C deleted file mode 100644 index db773d698e4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C +++ /dev/null @@ -1,6 +0,0 @@ -// PRMS Id: 3069 - -void f(int&); // ERROR - referenced by error below -void g(const int& i) { - f(i); // ERROR - discarding const -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion3.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion3.C deleted file mode 100644 index 0d66c1ecee1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion3.C +++ /dev/null @@ -1,7 +0,0 @@ -void qsort (void *, int, int, int (*)(const void *, const void *)); -int f (char *, char *); -void g () -{ - typedef int (*pf)(void *, void *); - qsort(0, 0, 0, pf(f)); // ERROR - adding const to function parms -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion4.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion4.C deleted file mode 100644 index 7caca196d0a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion4.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -struct A { - A (int); -}; -struct B { - operator int () { return 1; } -}; -void f (const A&); -void g() -{ - B b; - f ((A) b); - f (A (b)); // gets bogus error - functional cast treated differently from C style -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C deleted file mode 100644 index 303860b4725..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -struct A { }; -struct B: public A { - A a; - operator A () { return a; } // WARNING - never used implicitly -}; -void f (const A&); -void g() -{ - B b; - (A) b; // gets bogus error - trying both constructor and type conversion operator -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion6.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion6.C deleted file mode 100644 index a8477e36864..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion6.C +++ /dev/null @@ -1,40 +0,0 @@ -// PRMS Id: g++/6034 - -extern "C" int printf (const char *, ...); - -class Base -{ - char x; -}; - -template <class T> -// remove the public Base inheritance and the problem goes away... -class Container : public Base -{ -public: - - Container(const T& aValue): myValue(aValue) { } - - operator const T&(void) const - { - printf("Container::const T& called\n"); - return myValue; - } - -protected: - - T myValue; -}; - -typedef unsigned short Type; - -typedef Container<Type> TypeContainer; - -int main(void) -{ - TypeContainer myTypeContainer(2); - Type t = myTypeContainer; - - printf ("myType = %d\n", t); - return t != 2; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion7.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion7.C deleted file mode 100644 index 01812f5b8ee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion7.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: g++ tries to look inside (B*)0 for a virtual base pointer. - -struct A -{ -}; - -struct B : virtual A -{ -}; - -A* a; - -int main() -{ - a = (B*)0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion8.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion8.C deleted file mode 100644 index 0c3d378b47a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion8.C +++ /dev/null @@ -1,10 +0,0 @@ -// PRMS id: 8279 - -int main () -{ - char *const *p = 0; - char **q = 0; - - (void)(p - q); - (void)(q - p); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion9.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion9.C deleted file mode 100644 index e0d3715dae2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion9.C +++ /dev/null @@ -1,13 +0,0 @@ -// PRMS Id: 8475 - -class SomeClass { -public: - operator int & () { - static int x; - return x; - } -} a; - -int main (int, char**) { - return a + 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash1.C b/gcc/testsuite/g++.old-deja/g++.jason/crash1.C deleted file mode 100644 index 298273490fc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash1.C +++ /dev/null @@ -1,29 +0,0 @@ -// Bug: g++ dies on this input. -// Build don't link: - -class Sample - { - public: - int operator <<(const char *c); - }; - -extern Sample sample; - -struct Simple - { - int a; - }; - -extern "C" void get_it(); - -class Test - { - private: - void test(); - friend void get_it(); - }; - -void Test::test() - { - sample << "hello"; - } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash10.C b/gcc/testsuite/g++.old-deja/g++.jason/crash10.C deleted file mode 100644 index b9669449589..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash10.C +++ /dev/null @@ -1,7 +0,0 @@ -// PRMS Id: 5155 - -struct A { - enum foo { bar }; -}; - -typedef A::foo A::foo; // ERROR - causes compiler segfault diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash11.C b/gcc/testsuite/g++.old-deja/g++.jason/crash11.C deleted file mode 100644 index 51d1629630e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash11.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: g++ crashes on this input. -// Build don't link: - -struct A { - const char *p; -}; -const char foo[] = "bar"; -const A a = { foo }; -extern const A* ap = &a; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash12.C b/gcc/testsuite/g++.old-deja/g++.jason/crash12.C deleted file mode 100644 index 46d63225bab..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash12.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ dies instead of flagging this invalid. -// Build don't link: - -inline float max(float x, float y) { return (x>y)?x:y; } - -float b(float x, float y, float z) -{ - float f = (y<x)?x:(max<y)?z:y; // ERROR - - return f; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C deleted file mode 100644 index c3709c55536..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C +++ /dev/null @@ -1,13 +0,0 @@ -// Bug: g++ tries to generate initialization semantics for a Node from an int, -// and fails. -// Build don't link: - -struct Node -{ - Node* child[2]; -}; // ERROR - - -void bug(int i) -{ - Node* q = new Node(i); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C b/gcc/testsuite/g++.old-deja/g++.jason/crash4.C deleted file mode 100644 index bf6a15c370a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C +++ /dev/null @@ -1,38 +0,0 @@ -// PRMS Id: 4346 -// Bug: g++ dies on redefinition of cc_Array::repInvariant. -// Build don't link: - -class ccObjectInfo -{ -public: - virtual const ccObjectInfo& repInvariant (int =0) const; -}; - -template <class T> -class cc_Array : public ccObjectInfo -{ -public: - virtual const ccObjectInfo& repInvariant (int =0) const ; -}; - -template <class T> -const ccObjectInfo& cc_Array<T>::repInvariant(int) const -{ return *this /* *this is required here */; } // ERROR - redefined - -template <class T> -class ccArray :public ccObjectInfo -{ - ccArray (cc_Array<T>*); -}; - -template <class T> -class ccObjArray : public ccArray<T> -{ - ccObjArray(); -}; - -template <class T> -const ccObjectInfo& cc_Array<T>::repInvariant(int) const -{ return 0; } // ERROR - causes compiler segfault - -typedef ccObjArray< double> ccROIRuns; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash5.C b/gcc/testsuite/g++.old-deja/g++.jason/crash5.C deleted file mode 100644 index b67376fe261..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash5.C +++ /dev/null @@ -1,4 +0,0 @@ -// Bug: g++ doesn't deal well with abstract declarators used inappropriately. -// Build don't link: - -void (*)(); // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash6.C b/gcc/testsuite/g++.old-deja/g++.jason/crash6.C deleted file mode 100644 index 8e0a9c861f2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash6.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: g++ dies on the below. -// Build don't link: - -class A { }; -void f () -{ - A a; - a.~a(); // ERROR - causes segfault -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash7.C b/gcc/testsuite/g++.old-deja/g++.jason/crash7.C deleted file mode 100644 index e7dd8f75aad..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash7.C +++ /dev/null @@ -1,5 +0,0 @@ -// Bug: g++ can't deal. - -typedef unsigned size_t; // ERROR - previous declaration -typedef unsigned long size_t; // ERROR - redefining size_t -void f (size_t); // causes compiler segfault - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash8.C b/gcc/testsuite/g++.old-deja/g++.jason/crash8.C deleted file mode 100644 index cadda2f4764..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash8.C +++ /dev/null @@ -1,9 +0,0 @@ -struct A { - A(); - A(A); // ERROR - copy ctor must take reference -}; -int main() -{ - A a; - A b(a); // causes compiler segfault -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash9.C b/gcc/testsuite/g++.old-deja/g++.jason/crash9.C deleted file mode 100644 index 6cacb11a541..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash9.C +++ /dev/null @@ -1,29 +0,0 @@ -// PRMS Id: 5085 -// Bug: TYPE_POINTER_TO wasn't set. -// Build don't link: - -class A { - A(const A &); - void operator=(const A &); -public: - inline A(); -}; - -class B { - A a; -public: - B(); - virtual void f() const; -}; - -class C : public B { }; - -class D : C { -public: - void f() const; -}; - -void D::f() const -{ - C::f(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ctor1.C b/gcc/testsuite/g++.old-deja/g++.jason/ctor1.C deleted file mode 100644 index 123295dc409..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ctor1.C +++ /dev/null @@ -1,26 +0,0 @@ -// PRMS Id: 5584 - -extern "C" -{ - struct xx { - void (*xx)(void); // ERROR - field with name of class - int x,y; - }; -} - -int r = 1; - -void f(void) -{ - r = 0; -} - -int main() -{ - struct xx p; - - p.xx = f; - p.xx(); - - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ctor2.C b/gcc/testsuite/g++.old-deja/g++.jason/ctor2.C deleted file mode 100644 index bf37c114be1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ctor2.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: the reference to c in the initializer list doesn't get fixed up. -// Build don't link: - -struct AP { - AP(unsigned char); -}; - -struct AI : AP { - AI(unsigned char); -}; - -AI::AI(unsigned char c) -: AP(c) -{ - &c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dcast1.C b/gcc/testsuite/g++.old-deja/g++.jason/dcast1.C deleted file mode 100644 index f4d93c3c068..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dcast1.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 7162 -// Build don't link: - -struct B { - int i; - B() : i(1) {} -}; - -struct D : B { - int i; - D() : i(2) {} -}; - -void ch() -{ - D od2; - D &rd2 = od2; - - B &rd1 = dynamic_cast<B&>(rd2); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dcast2.C b/gcc/testsuite/g++.old-deja/g++.jason/dcast2.C deleted file mode 100644 index e42c71da2f5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dcast2.C +++ /dev/null @@ -1,18 +0,0 @@ -struct A { virtual void f() { } }; -struct B { virtual void g() { } }; -struct C : public A, public B { }; - -int main () -{ - C* cp = 0; - B* bp = 0; - - if (dynamic_cast <B*> (cp) != 0) - return 1; - - if (dynamic_cast <void *> (bp) != 0) - return 1; - - if (dynamic_cast <C*> (bp) != 0) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dcast3.C b/gcc/testsuite/g++.old-deja/g++.jason/dcast3.C deleted file mode 100644 index 6d333f098bc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dcast3.C +++ /dev/null @@ -1,32 +0,0 @@ -// Testcase for tricky dynamic cast situations. - -struct A { - virtual void f () { } -}; - -struct B : public A { }; -struct C : public B { }; -struct D : public B { }; -struct E : public C, public D { }; - -struct B2 : public virtual A { }; -struct C2 : public B2 { }; -struct D2 : public B2 { }; -struct E2 : public C2, public D2 { }; - -int main () -{ - E e; - E2 e2; - - A* ap = (C*)&e; - - // ap points to base subobject of unique B; succeeds - if (dynamic_cast <B*> (ap) == 0) - return 1; - - ap = (C2*)&e2; - // ap points to base subobject shared by two Bs; fails - if (dynamic_cast <B2*> (ap) != 0) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/default1.C b/gcc/testsuite/g++.old-deja/g++.jason/default1.C deleted file mode 100644 index 0372d91b7da..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/default1.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 5204 -// Bug: g++ bashes the type of add_sym with the type of add, so calling it -// with one parameter generates an error. -// Build don't link: - -int add(int const &symbol, - const unsigned char flags=(void*)0); // ERROR - invalid default arg - -int add_sym(int const &symbol, - const unsigned char flags=0); - -int main() -{ - int fname; - add_sym(fname); // Guarantee a symbol exists -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/default2.C b/gcc/testsuite/g++.old-deja/g++.jason/default2.C deleted file mode 100644 index f50ee2f151b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/default2.C +++ /dev/null @@ -1,31 +0,0 @@ -// PRMS Id: 5921 -// Build don't link: -// Bug: default arguments containing constructor calls persist incorrectly. - -class foo -{ - public: - foo(); - foo(int x); - public: - int iamamember; -}; - -class bar -{ - public: - bar(); - int memberfunction(int i, char *j, double k, foo foo1 = foo(0)); -}; - -int -pain(bar *bar1) -{ - return bar1->memberfunction(1, "x", 0.0); -} - -int -pain2(bar *bar1) -{ - return bar1->memberfunction(1, "x", 0.0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/default3.C b/gcc/testsuite/g++.old-deja/g++.jason/default3.C deleted file mode 100644 index 05af3b68b27..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/default3.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: type_list_equal aborts when it sees lang-specific tree nodes. -// Build don't link: - -struct A { }; -void f (A a = A()); -void g (A a = A()); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/defctor.C b/gcc/testsuite/g++.old-deja/g++.jason/defctor.C deleted file mode 100644 index 68cf25c3ab6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/defctor.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ doesn't generate default constructor. - -class A { -public: - int i; -}; - -extern "C" int printf(const char *, ...); - -int main () { - A a; - a.i = 1; - A b (a); - printf("%d\n",b.i); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/delete1.C b/gcc/testsuite/g++.old-deja/g++.jason/delete1.C deleted file mode 100644 index a176652df71..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/delete1.C +++ /dev/null @@ -1,5 +0,0 @@ -#include <stddef.h> -struct A { - virtual void operator delete (void *); // ERROR - virtual delete - virtual void * operator new (size_t); // ERROR - virtual new -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/delete2.C b/gcc/testsuite/g++.old-deja/g++.jason/delete2.C deleted file mode 100644 index 7748e2b9cb5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/delete2.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 5003 -// Bug: g++ complains about calling the destructor for a const object. -// Build don't link: - -struct A { -public: - ~A(); -}; - -const A foo (); - -void bar() -{ - A n; - n = foo(); // gets bogus error - deleting const -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/delete3.C b/gcc/testsuite/g++.old-deja/g++.jason/delete3.C deleted file mode 100644 index 8bffb9aca86..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/delete3.C +++ /dev/null @@ -1,18 +0,0 @@ -// PRMS Id: 6093 - -class A { -public: - A(); - ~A(); -protected: - void operator delete(void *); // ERROR - protected -}; - -A::~A() -{ -} - -void foo(A *p) -{ - delete p; // ERROR - in this context -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/destruct.C b/gcc/testsuite/g++.old-deja/g++.jason/destruct.C deleted file mode 100644 index c5b3be61004..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/destruct.C +++ /dev/null @@ -1,33 +0,0 @@ -// Exhaustive test for destructors of simple types. -// PRMS Id: 2744, 3308 -// Build don't link: - -template <class T> class A { - T q; -public: - ~A() { - q.T::~T(); - q.~T(); - (&q)->T::~T(); - (&q)->~T(); - } -}; - -typedef char * cp; - -int main () -{ - A<int> a; - A<cp> b; - int i; - cp c; - - i.~int(); - i.int::~int(); - (&i)->~int(); - (&i)->int::~int(); - c.~cp(); - c.cp::~cp(); - (&c)->~cp(); - (&c)->cp::~cp(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/destruct2.C b/gcc/testsuite/g++.old-deja/g++.jason/destruct2.C deleted file mode 100644 index 09b6bdd7991..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/destruct2.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 4342 -// Bug: g++ does not massage things enough to allow calling ~X(). -// Build don't link: - -struct X -{ - virtual ~X (); -}; - -struct Y : public X -{}; - -struct Z : public Y, public X -{}; // WARNING - - -void foo () -{ - Z* f = new Z; - delete f; // gets bogus error - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/destruct3.C b/gcc/testsuite/g++.old-deja/g++.jason/destruct3.C deleted file mode 100644 index d4bbf9ad790..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/destruct3.C +++ /dev/null @@ -1,45 +0,0 @@ -// Special g++ Options: -w -// PRMS Id: 4342 (second testcase) -// Bug: g++ still can't deal with ambiguous inheritance in destructor calls. -// Build don't link: - -struct ccUnwind -{ - ccUnwind (); - virtual ~ccUnwind (); -}; - -struct ccPersistent -{ - virtual void bar(); -}; - -struct ccImpExp : public ccPersistent, public ccUnwind -{}; - -struct ccTool : public ccImpExp -{}; - -struct ccScreenTool : public ccTool -{}; - -struct ccVTool : public ccScreenTool -{}; - -struct ccScreenObjRep : public ccUnwind -{}; - -struct ccScreenObj : public ccScreenObjRep -{}; - -struct ccVSTool : public ccImpExp, public ccUnwind -{}; - -struct ccSCCP : public ccVSTool -{}; - -void foo () -{ - ccSCCP* foo = new ccSCCP; - delete foo; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/destruct4.C b/gcc/testsuite/g++.old-deja/g++.jason/destruct4.C deleted file mode 100644 index 3ce7d765505..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/destruct4.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 4342 -// Bug: g++ fails to massage ambiguity in calling virtual destructor. -// Build don't link: - -class A { public: virtual ~A();}; -class B: public A { }; -class C: public A { }; -class D: public B, public C { }; - -void foo () -{ - D* p = new D; - delete p; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dot.C b/gcc/testsuite/g++.old-deja/g++.jason/dot.C deleted file mode 100644 index 3870eead449..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dot.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 4143 -// Bug: Pointer is silently dereferenced in method call. -// Build don't link: - -extern "C" int printf (const char *, ...); - -class Test -{ - char ch; - public: - Test(char c) : ch(c) {} - void Print() { printf("%c", ch); } -}; - -int main() -{ - Test *p = new Test('x'); - - p.Print(); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dtor.C b/gcc/testsuite/g++.old-deja/g++.jason/dtor.C deleted file mode 100644 index db76e171349..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dtor.C +++ /dev/null @@ -1,13 +0,0 @@ -struct A { - ~A(); -}; - -struct B { - ~B(); -}; - -int main() -{ - A a; - a.~B(); // ERROR - wrong name -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dtor2.C b/gcc/testsuite/g++.old-deja/g++.jason/dtor2.C deleted file mode 100644 index c088e3f3d2e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dtor2.C +++ /dev/null @@ -1,10 +0,0 @@ -// PRMS Id: 5163 -// Bug: g++ doesn't accept the explicit destructor call syntax for templates. - -template <class T> struct A { }; -A<int> a; - -int main() -{ - a.~A(); // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dtor3.C b/gcc/testsuite/g++.old-deja/g++.jason/dtor3.C deleted file mode 100644 index 0c5e68abb47..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dtor3.C +++ /dev/null @@ -1,18 +0,0 @@ -// PRMS Id: 5341 -// Bug: g++ complains about the explicit destructor notation. -// Build don't link: - -#include <stddef.h> - -void *operator new(size_t Size, void* pThing) { return pThing; }; - -template <class T> class Stack { -public: - Stack() { new (Data) T(); } - ~Stack() { ((T*)Data)->~T(); } -private: - char Data[sizeof(T)]; -}; - -Stack<int> a; -Stack<Stack<int> > c; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dtor4.C b/gcc/testsuite/g++.old-deja/g++.jason/dtor4.C deleted file mode 100644 index dfdc3aafd6c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dtor4.C +++ /dev/null @@ -1,23 +0,0 @@ -// PRMS Id: 5420 -// Bug: g++ gets mixed up calling destructors for references. -// Build don't link: - -template<class X> -class Z { -public: - char space[100]; - void kill() - { X& x = (X&) space[0]; - x.~X(); } -}; - -class C { int i; }; - -void -f() -{ - Z<int> r; - r.kill(); - Z<C> s; - s.kill(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/dtor5.C b/gcc/testsuite/g++.old-deja/g++.jason/dtor5.C deleted file mode 100644 index 4761bedf2cc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/dtor5.C +++ /dev/null @@ -1,24 +0,0 @@ -// PRMS Id: 5286 -// Bug: g++ forgets side-effects of object in call to nonexistent destructor. - -#include <new> - -int r; - -template <class T> struct A { - T *p; - int i; - A() { i = 0; p = (T*) new char[sizeof (T)]; new (p + i++) T; } - ~A() { p[--i].~T(); r = i; } -}; - -int main() -{ - { A<int> a; } - - int* p = (int*) new char[sizeof (int)]; - new (p + r++) int; - p[--r].~int(); - - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum.C b/gcc/testsuite/g++.old-deja/g++.jason/enum.C deleted file mode 100644 index 6dd24e61811..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS Id: 4337 -// Bug: Enums are not looked up to arbitrary depth. -// Build don't link: - -struct W { - enum A { B }; -}; - -struct X : public W -{}; - -struct Y : public X -{}; - -struct S -{ - X::A a1; - Y::A a2; // gets bogus error - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum2.C b/gcc/testsuite/g++.old-deja/g++.jason/enum2.C deleted file mode 100644 index 8fb75386878..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum2.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -enum tristate { no = -1, maybe, yes }; - -void foobar () -{ - tristate var = no; // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum3.C b/gcc/testsuite/g++.old-deja/g++.jason/enum3.C deleted file mode 100644 index 9e25570ab42..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum3.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wall - -enum tristate { no = -1, maybe, yes }; - -tristate -tristate_satisfies (register tristate const t1, register tristate const t2) -{ - switch (t1) - { - case no: - return (tristate) -t2; - case maybe: - return yes; - case yes: - return t2; - } - return maybe; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum4.C b/gcc/testsuite/g++.old-deja/g++.jason/enum4.C deleted file mode 100644 index ab8b69f4aa7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wall - -enum tristate { no = -1, maybe, yes }; - -tristate -definite_tristate (int truth) -{ - return (truth) ? yes : no; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum5.C b/gcc/testsuite/g++.old-deja/g++.jason/enum5.C deleted file mode 100644 index bbaa6747461..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum5.C +++ /dev/null @@ -1,8 +0,0 @@ -enum { a = 1 }; - -int main(void) -{ - int l = -1; - - return ! (l < a); // testcase fails if a is unsigned -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C b/gcc/testsuite/g++.old-deja/g++.jason/enum6.C deleted file mode 100644 index 4097e2db1eb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Special g++ Options: -fshort-enums - -#include <limits.h> - -enum A { a1 = 0x7fffffff }; -enum B { b1 = 0x80000000 }; -enum C { c1 = -1, c2 = 0x80000000 }; -enum D { d1 = CHAR_MIN, d2 = CHAR_MAX }; -enum E { e1 = CHAR_MIN, e2 = CHAR_MIN }; - -main() -{ - return (sizeof (A) != 4 || sizeof (B) != 4 || sizeof (C) != 8 - || sizeof (D) != 1 || sizeof (E) != 1); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum7.C b/gcc/testsuite/g++.old-deja/g++.jason/enum7.C deleted file mode 100644 index 0f683047aec..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum7.C +++ /dev/null @@ -1,15 +0,0 @@ -// Yet Another testcase for signed/unsigned enums. -// Build don't link: - -enum A { AA = 0, AB = 1}; -enum B { BA = -1, BB = 1}; - -void set(int a); -void set(long a); - -void -foo() -{ - set(AA); // gets bogus error - why is this ambiguous - set(BA); // when this is not amibguous -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum8.C b/gcc/testsuite/g++.old-deja/g++.jason/enum8.C deleted file mode 100644 index 0a3220f7faa..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum8.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: the switch fails on the Alpha because folding ef - 1 fails. - -enum foo { one=1, thirty=30 }; - -int f (enum foo ef) -{ - switch (ef) - { - case one: - case thirty: - return 0; - default: - return 1; - } -} - -int main () -{ - return f (one); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/explicit.C b/gcc/testsuite/g++.old-deja/g++.jason/explicit.C deleted file mode 100644 index 9fcecfd81ae..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/explicit.C +++ /dev/null @@ -1,15 +0,0 @@ -// Testcase for explicit instantiation of templates. -// Build don't link: - -template <class T> -class A { - T t; -public: - void f () { } -}; - -template class A<int>; - -template <class T> T min (T a, T b) { return (a < b ? a : b); } - -template int min (int, int); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/expr1.C b/gcc/testsuite/g++.old-deja/g++.jason/expr1.C deleted file mode 100644 index 89d719fddd9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/expr1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: g++ doesn't figure out what to do. -// Build don't link: - -struct A { - operator char *(); -}; - -char foo(A a) -{ - char c = a[0]; // gets bogus error - return c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/friend.C b/gcc/testsuite/g++.old-deja/g++.jason/friend.C deleted file mode 100644 index 4c517cbeee4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/friend.C +++ /dev/null @@ -1,18 +0,0 @@ -// Bug: g++ doesn't keep track of the lexical context of friends properly. - -extern "C" void exit(int); - -struct B; -struct A { - static void f () { exit (1); } -}; - -struct B { - static void f () { exit (0); } - friend void g () { f (); } -}; - -int main () -{ - g (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/friend2.C b/gcc/testsuite/g++.old-deja/g++.jason/friend2.C deleted file mode 100644 index 02ccb5c59dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/friend2.C +++ /dev/null @@ -1,21 +0,0 @@ -// PRMS Id: 5189 -// Bug: g++ fails to collapse the several declarations of freefoo, so it isn't -// recognized as a friend. -// Build don't link: - -extern "C" -void freefoo(void); - -class foo { - friend void freefoo(void); - protected: - static void foomem(); - public: - foo(); - ~foo(); -}; - -void freefoo(void) -{ - foo::foomem(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/groff1.C b/gcc/testsuite/g++.old-deja/g++.jason/groff1.C deleted file mode 100644 index 7ce697b0d77..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/groff1.C +++ /dev/null @@ -1,40 +0,0 @@ -// PRMS Id: 3744 -// Bug: unswitching a COND_EXPR initializer fails to set SIDE_EFFECTS on the -// result, so expand_expr ignores it. - -extern "C" { - int printf(const char *,...); - void exit(int); -} - -struct A { - int x; - int y; - - A() : x(0), y(0) { } -}; - -struct S { - S() : flags(0) { } - unsigned flags; - A from; - void foo(const A &pos); -}; - -void S::foo(const A &pos) -{ - A a = flags ? from : pos; - printf("%d %d\n", a.x, a.y); - if (a.x != 17 || a.y != 12) - exit (1); -} - -int main() -{ - A pos; - pos.x = 17; - pos.y = 12; - S s; - s.foo(pos); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C b/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C deleted file mode 100644 index fec94879950..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed templates default-arguments -template <class I> -class Class { -public: - void func1(int n=1); - void func2(int d) {} -}; -template <class I> -void Class<I>::func1(int n) {} - -//if this is replaced by: -//void Class<I>::func1(int n=1) {} -//the code compiles. - -int main() { - Class<int> C; - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/incomplete1.C b/gcc/testsuite/g++.old-deja/g++.jason/incomplete1.C deleted file mode 100644 index 8b738d9f606..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/incomplete1.C +++ /dev/null @@ -1,15 +0,0 @@ -// The reference parameter to fred isn't dereferenced properly. -// Build don't link: - -class Gump {}; -Gump operator & (const Gump x){return x;} - -class B; - -void *sam(int &x) -{return &x;} - -const void *fred(const B& x) -{return &x;} // "&x" causes the compilation error. - -class B {}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C b/gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C deleted file mode 100644 index 66423215a92..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct A { - int foo(A a) { return a.bar(); } - int bar(); - int n; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/init.C b/gcc/testsuite/g++.old-deja/g++.jason/init.C deleted file mode 100644 index 032d172e160..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/init.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ uses an empty initializer list for its own devious purpose -// internally, and gets confused if it shows up in the input. -// Build don't link: - -struct A { int i; }; - -A a = { }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/init2.C b/gcc/testsuite/g++.old-deja/g++.jason/init2.C deleted file mode 100644 index c85adc385ce..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/init2.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS Id: 5126 - -extern int i, j; -static const int foo [] = { i, j }; -int i = 5, j = 42; -int main() -{ - return foo[1] != 42; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/init3.C b/gcc/testsuite/g++.old-deja/g++.jason/init3.C deleted file mode 100644 index ae8693195ca..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/init3.C +++ /dev/null @@ -1,42 +0,0 @@ -// PRMS Id: 5652 -// Bug: strings does not get initialized. - -extern "C" void * memcpy (void *, const void *, __SIZE_TYPE__); -extern "C" int strcmp (const char *, const char *); - -class My_string { - char *str; - int len; -public: - My_string(const char* string); - My_string(const My_string &); - ~My_string() { delete str; } - char* char_p() { return str; } -}; - -const My_string strings[4] = { - "first string", - "second string", - "third string", - "fourth string" -}; - -My_string::My_string(const char* string) -{ - len = strlen(string) + 1; - str = new char[len]; - memcpy(str, string, len); -} - -My_string::My_string(const My_string &string) -{ - len = string.len; - str = new char[len]; - memcpy(str, string.str, len); -} - -int main() -{ - My_string str1 = strings[0]; - return strcmp ("first string", str1.char_p ()) != 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/init4.C b/gcc/testsuite/g++.old-deja/g++.jason/init4.C deleted file mode 100644 index aa9417c642f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/init4.C +++ /dev/null @@ -1,3 +0,0 @@ -struct A { int i; }; - -A a = {{{1}}}; // ERROR - causes abort diff --git a/gcc/testsuite/g++.old-deja/g++.jason/inline.C b/gcc/testsuite/g++.old-deja/g++.jason/inline.C deleted file mode 100644 index d6cb9e9a924..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/inline.C +++ /dev/null @@ -1,21 +0,0 @@ -// PRMS Id: 4341 -// Bug: Instantiating a template in the middle of processing the functions -// from another template screws up lineno/input_filename. - -#pragma implementation "C.h" -#line 1 "A.h" -#pragma interface -template <class T> class A {}; -#line 1 "C.h" -#pragma interface -template <class T> class C -{ -public: - C() { A<T> *ap; } - ~C() { } -}; -#line 18 "inline.C" -int main() -{ - C<int> c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/inline2.C b/gcc/testsuite/g++.old-deja/g++.jason/inline2.C deleted file mode 100644 index 7dea476d373..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/inline2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: the lang-specific bits of the decl for g aren't being copied when -// inlining. -// Special g++ Options: -O -// Build don't link: - -inline void f () { - void g (); -} - -void h() { - f(); // causes compiler segfault - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/inline3.C b/gcc/testsuite/g++.old-deja/g++.jason/inline3.C deleted file mode 100644 index 00d57eb3ea1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/inline3.C +++ /dev/null @@ -1,42 +0,0 @@ -// Testcase for order of destruction. -// Special g++ Options: -O2 - -extern "C" int printf( char const*, ... ); -int c; -int r; - -struct B { - B(); - B( B const& ); - ~B(); -}; - -struct A { - A(); - A( A const& ); - ~A(); - operator B (); -}; - -inline A::operator B () { printf( "operator B ()\n"); return B(); } - -A f(); -void g( B const& ); - -int -main() -{ - g( f() ); - return r; -} - -B::B() { printf( "B::B()\n" ); if (++c != 2) r = 1; } -B::B( B const& ) { printf( "B::B( B const& )\n" ); r = 1; } -B::~B() { printf( "B::~B()\n" ); if (--c != 1) r = 1; } - -A::A() { printf( "A::A()\n" ); if (++c != 1) r = 1; } -A::A( A const& ) { printf( "A::A( A const& )\n" ); r = 1; } -A::~A() { printf( "A::~A()\n" ); if (--c != 0) r = 1; } - -A f() { printf( "f()\n"); return A(); } -void g( B const& ) { printf( "g()\n"); } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/jump.C b/gcc/testsuite/g++.old-deja/g++.jason/jump.C deleted file mode 100644 index e59de36fa41..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/jump.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 6036 - -extern int a; - -int main() { - switch (a) { - case 1: - int v2 = 3; // ERROR - referenced below - case 2: // ERROR - jumping past initializer - if (v2 == 7) - ; - } - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lex1.C b/gcc/testsuite/g++.old-deja/g++.jason/lex1.C deleted file mode 100644 index 174ec77b97f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lex1.C +++ /dev/null @@ -1,6 +0,0 @@ -int main() -{ - char c = '\351'; - if (c != '\351') - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno.C deleted file mode 100644 index 6878f75b61a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lineno.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug; g++ binds a function definition to the line number of a later decl. -// Build don't link: - -void foo () { } // ERROR - redeclared -void foo (); // gets bogus error - invalid binding -void foo () { } // ERROR - redeclared diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno2.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno2.C deleted file mode 100644 index 6c278036b9a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lineno2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed error-reporting -// Special g++ Options: -// Bug: # line directive gets ignored immediately after text. -template <class T> class A -{ -public: -# 200 "lineno2.C" -}; - -main() -{ - undef1(); // ERROR - , LINE 204 -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno3.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno3.C deleted file mode 100644 index f2688635437..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lineno3.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// Special g++ Options: -// GROUPS passed error-reporting -// potential bug: # line directive does not get reproduced in template -// expansion -template <class T> class A -{ -public: -# 200 "lineno3.C" - int foo () { undef1(); } // ERROR - , LINE 200 -}; - -template class A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno4.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno4.C deleted file mode 100644 index a570edf313c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lineno4.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// Special g++ Options: -// GROUPS passed error-reporting -// Bug: # line directive in template definition interferes with growing obstack -template <class T> class A -{ -public: - -# 200 "lineno4.C" - int foo () { undef1(); } // ERROR - , LINE 200 -}; - -template class A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno5.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno5.C deleted file mode 100644 index 95ff218cbb2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lineno5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed error-reporting -// Bug: incomplete instantiation messes with lineno -template <class T> class A; - -int main() -{ - A<int> *p; - undef1();// ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/local.C b/gcc/testsuite/g++.old-deja/g++.jason/local.C deleted file mode 100644 index 6159db0c613..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/local.C +++ /dev/null @@ -1,20 +0,0 @@ -// General testcase for local classes. - -int x; -void f () -{ - static int s; - int x; // ERROR - referenced below - extern int q(); - - struct local { - int g() { return x; } // ERROR - automatic variable - int h() { return s; } // gets bogus error - local class - int k() { return ::x; } // OK - int l() { return q(); } // OK - int m(); // OK - not defined - static int foo; // ERROR - static data member of local class - }; -} - -local* p = 0; // ERROR - no such type in scope diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lookup.C b/gcc/testsuite/g++.old-deja/g++.jason/lookup.C deleted file mode 100644 index c6c44c373d9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lookup.C +++ /dev/null @@ -1,30 +0,0 @@ -// PRMS Id: 4357 -// Bug: g++ forgets to clear out push/popclass cache stuff when instantiating -// templates. -// Build don't link: - -template <class T> class ccHandle { }; - -class cc_GStack -{ - static cc_GStack* freeList; -}; - -// OK if ccGStack is not derived from ccHandle<something> -class ccGStack : public ccHandle<int> { }; - -struct S { }; - -S* freeList; - -class X -{ -public: - void foo(); -}; - -void X::foo() -{ - S m; - freeList = &m; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lookup2.C b/gcc/testsuite/g++.old-deja/g++.jason/lookup2.C deleted file mode 100644 index e44b1dcb057..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lookup2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -struct A { - struct B { - B (); - }; -}; -void f (A::B); -void g () -{ - A::B b; - f (b); // gets bogus error - can't find nested constructor -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lookup3.C b/gcc/testsuite/g++.old-deja/g++.jason/lookup3.C deleted file mode 100644 index 7be731ef0f5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lookup3.C +++ /dev/null @@ -1,15 +0,0 @@ -// [class.ambig]: A single function, object, type, or enumerator may be -// reached through more than one path through the DAG of base classes. This -// is not an ambiguity. -// Build don't link: - -struct A { - typedef long T; -}; - -struct B : public A { }; -struct C : public A { }; - -struct D : public C , public B { - void f (T&); // gets bogus error - ambiguous lookup -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/loverload.C b/gcc/testsuite/g++.old-deja/g++.jason/loverload.C deleted file mode 100644 index 2d1a9b36ae6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/loverload.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ can't deal with multi-language overloading. -// Build don't link: - -extern void foo (int, int); -extern "C" void foo (int); - -void bar () -{ - foo (1); - foo (1, 2); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/loverload3.C b/gcc/testsuite/g++.old-deja/g++.jason/loverload3.C deleted file mode 100644 index c9cc3bfbe57..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/loverload3.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 2010 -// Bug: g++ doesn't deal with overloads involving C-language fns properly. -// Build don't link: - -extern "C" double pow (double, double); -inline double pow (double d, int e) { return pow (d, (double) e); } - -void foo () -{ - pow (1.0, 1); - pow (1.0, 1.0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/loverload4.C b/gcc/testsuite/g++.old-deja/g++.jason/loverload4.C deleted file mode 100644 index c689bf5169d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/loverload4.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: g++ dies on this input. -// Build don't link: - -inline char abs (char x) { return 0; } - -extern "C" { - inline int abs (int x) { return 1; } -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lvalue.C b/gcc/testsuite/g++.old-deja/g++.jason/lvalue.C deleted file mode 100644 index c85e6fe5f28..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lvalue.C +++ /dev/null @@ -1,22 +0,0 @@ -// Bug: Scoped method calls don't propagate the constness of `this'. -// PRMS Id: 4181 (second testcase) -// Build don't link: - -class D; - -class Bptr -{ -public: - Bptr& operator=(D*); - const Bptr& operator=(const D*) const; -}; - -class Dptr : public Bptr -{ -public: - const Dptr& operator=(const D* rep) const - { - Bptr::operator=(rep); - return *this; - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C b/gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C deleted file mode 100644 index 2fba73c9c87..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 4892 -// Bug: COND_EXPRs, MODIFY_EXPRs and COMPOUND_EXPRs aren't properly recognized -// as lvalues. -// Build don't link: - -extern int foo; -int& f (int& a, int& b) -{ - return (foo ? a : b); // gets bogus error - -} - -int& g (int& a) -{ - return (a = 0); // gets bogus error - -} - -int& h (int& a, int& b) -{ - return (a = 1, b); // gets bogus error - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C b/gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C deleted file mode 100644 index a3edaac6557..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: C++ semantics for assignment don't match the backend semantics for -// MODIFY_EXPR. -// Build don't link: - -void -foo (int j) -{ - (j = 1)++; // causes compiler segfault -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lvalue4.C b/gcc/testsuite/g++.old-deja/g++.jason/lvalue4.C deleted file mode 100644 index 79a02d8a5c0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/lvalue4.C +++ /dev/null @@ -1,6 +0,0 @@ -int main() { - int i = 2; - int *pi = &(++i); - - return i != 3; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mangle1.C b/gcc/testsuite/g++.old-deja/g++.jason/mangle1.C deleted file mode 100644 index 59b83b9c361..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/mangle1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Bug: numeric_outputed_need_bar is not cleared properly, adding random '_'s -// to mangled names. - -// Build don't link: - -template <int seed_length> -class rand1 -{ -public: - rand1 (); -}; - -class codes -{ -public: - rand1<32> * randgen; - codes (int ptr); - -}; - -codes::codes (int ptr) -{ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mangle2.C b/gcc/testsuite/g++.old-deja/g++.jason/mangle2.C deleted file mode 100644 index b1876b71249..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/mangle2.C +++ /dev/null @@ -1,23 +0,0 @@ -// I guess this was broken once. -// Build don't link: - -template <class C, int D> class X { }; -typedef X<int, 0> T; - -class Y -{ - public: - ~Y(); -}; - -class Z -{ - public: - void f(T**); -}; - -void Z::f(T** t) -{ } - -Y::~Y() -{ } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C b/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C deleted file mode 100644 index 5a82107bfef..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS Id: 7563 -// Bug: declaration at function scope causes mismangling. - -int main() -{ - char ArrA[10][10][20][30], - ArrB[10][10][20][30]; - - void HitMe(char [10][10][20][30], char [10][10][20][30]); - - HitMe(ArrA, ArrB); - - return 0; -} - -void HitMe(char A[10][10][20][30], char B[10][10][20][30]) -{ - return; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/member.C b/gcc/testsuite/g++.old-deja/g++.jason/member.C deleted file mode 100644 index 3518811967c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/member.C +++ /dev/null @@ -1,35 +0,0 @@ -// Build don't link: -// GROUPS passed member-pointers error-reporting -struct Y -{ - struct X - { - int A; - int Y::X::* foo () { undef1(1); return &Y::X::A; }// ERROR - foo().* - int bar () { return A; } - }; -}; - -int Y::X::* foo () -{ - undef2(1);// ERROR - foo().* - return &Y::X::A; -} - -int Y::X::* (* foo2 ())() -{ - undef3(1);// ERROR - foo().* - return foo; -} - -int (Y::X::* bar2 ()) () -{ - undef4(1);// ERROR - foo\(\).* - return Y::X::bar;// ERROR - foo\(\).* -} - -int Y::X::* (Y::X::* foo3 ())() -{ - undef5(1);// ERROR - foo().* - return Y::X::foo;// ERROR - foo().* -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/method.C b/gcc/testsuite/g++.old-deja/g++.jason/method.C deleted file mode 100644 index e9496b82861..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/method.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: pointer to pointer is treated as plain pointer. -// PRMS Id: 1767 -// Build don't link: - -class Foo { -public: - void method(); -}; - -void func(Foo ** ppFoo) { - ppFoo->method(); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mi.C b/gcc/testsuite/g++.old-deja/g++.jason/mi.C deleted file mode 100644 index de805dd4f1c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/mi.C +++ /dev/null @@ -1,16 +0,0 @@ -int status; - -struct A { virtual void foo () { status = 1; } }; -struct B { }; -struct C : public A, public B { }; -struct D { virtual void baz () { } }; -struct E : public D, public C { void foo () { status = 0; } }; - -int main () -{ - E* ep = new E; - - ep->foo(); - - return status; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mutable1.C b/gcc/testsuite/g++.old-deja/g++.jason/mutable1.C deleted file mode 100644 index 5311a871be2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/mutable1.C +++ /dev/null @@ -1,11 +0,0 @@ -struct X -{ - X () { } - mutable int x; -}; - -int main () -{ - const X x; - x.x = 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested1.C b/gcc/testsuite/g++.old-deja/g++.jason/nested1.C deleted file mode 100644 index 4405f3d0649..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: g++ can't deal with function-local classes that talk about themselves. -// Build don't link: - -void foo() { - class Wrapper { - public: - void F (void * Wrapperptr) - { - Wrapper * wrapptr = ( Wrapper *) Wrapperptr; // gets bogus error - } - }; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested2.C b/gcc/testsuite/g++.old-deja/g++.jason/nested2.C deleted file mode 100644 index 24020a2dd24..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested2.C +++ /dev/null @@ -1,26 +0,0 @@ -// PRMS Id: 3764 (c/h) -// Bug: g++ gets into an infinite loop trying to find the top-level context -// Build don't link: - -class Menu; -class MenuItem; - -class MenuAction { -public: - virtual void execute (Menu& menu, MenuItem& menuItem) = 0; -protected: - MenuAction () {} -}; - -class Test { - class MenuCBA : public MenuAction { - public: - typedef void (Test::* MenuCBA_Member) (Menu& menu, MenuItem& menuItem); - MenuCBA (Test& instance, MenuCBA_Member member) - : _instance(&instance), _member(member) { } - void execute (Menu& menu, MenuItem& menuItem); - private: - MenuCBA_Member _member; - Test* _instance; - }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested4.C b/gcc/testsuite/g++.old-deja/g++.jason/nested4.C deleted file mode 100644 index cd5a8393eb0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested4.C +++ /dev/null @@ -1,17 +0,0 @@ -// From: quipu@ulrik.uio.no -// Subject: extern "C" nested class -// Date: Fri, 13 Aug 1993 15:33:53 +0200 -// Build don't link: - -extern "C" { - struct A { - struct B { int j; } *x; - }; -} - -void -foo () { - A a; - struct A::B *b; - b = a.x; // gets bogus error - type `B' is not a base type for type `B' -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested5.C b/gcc/testsuite/g++.old-deja/g++.jason/nested5.C deleted file mode 100644 index 1b0e35c9b91..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested5.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -struct A { - struct B { }; -}; - -struct C : public A { - struct D - : public B // gets bogus error - can't find B - { }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested6.C b/gcc/testsuite/g++.old-deja/g++.jason/nested6.C deleted file mode 100644 index b98c643d3fb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested6.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -union A { - struct B { }; - A::B b; // gets bogus error -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested7.C b/gcc/testsuite/g++.old-deja/g++.jason/nested7.C deleted file mode 100644 index 43cce238546..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested7.C +++ /dev/null @@ -1,16 +0,0 @@ -// Testcase for defining nested types separately. -// Build don't link: - -class remote -{ - class remote_file; -}; - -class remote::remote_file -{ -public: - ~remote_file(); -}; - -remote::remote_file::~remote_file() -{} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/nested8.C b/gcc/testsuite/g++.old-deja/g++.jason/nested8.C deleted file mode 100644 index ff2d659a3fc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/nested8.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -struct A { }; -struct B: public A { - struct C { -friend struct B; // gets bogus error - base clause w/o members - }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/net.C b/gcc/testsuite/g++.old-deja/g++.jason/net.C deleted file mode 100644 index be8b962ad80..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/net.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ doesn't instantiate function templates in instantiate_type. -// Build don't link: - -template <class T> void fn (T t) { } -template <class T> struct A { - void (*p)(T); - A() { p = fn; } -}; - -A<int> a; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/net2.C b/gcc/testsuite/g++.old-deja/g++.jason/net2.C deleted file mode 100644 index 8738eade438..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/net2.C +++ /dev/null @@ -1,37 +0,0 @@ -// Test of various ?: problems. - -class D -{ -public: - void a(); - void b(); - D(int i):x(i) {} -private: - int x; -}; - -void D::a() {++x;} -void D::b() {--x;} - - -int aa=1, bb=0; - -int fa() {return 0;} -int fb() {return 2;} - -int main(int argc, char* argv[]) -{ - typedef int* pi; - int* p = (argc == 1)? &aa: &bb; - *p = 0; - - typedef int (*ifptr)(); - ifptr fp = (argc == 1)? fa: fb; - aa = fp(); - - D d(0); - typedef void (D::*dmem)(); - dmem mfp = (argc == 1)? &D::a: &D::b; - (d.*mfp)(); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new.C b/gcc/testsuite/g++.old-deja/g++.jason/new.C deleted file mode 100644 index ce865696078..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new.C +++ /dev/null @@ -1,25 +0,0 @@ -// Bug: new doesn't make sure that the count is an integral value. - -#include <new> -extern "C" int printf (const char *, ...); -extern "C" void *malloc (size_t); -size_t s; - -void * operator new (size_t siz) throw (std::bad_alloc) { - if (s == 0) - s = siz; - else - s = (s != siz); - return malloc (siz); -} - -int main() -{ - s = 0; - - float f = 3; - int* b1 = new int[(int)f]; - int* b2 = new int[f]; // ERROR - new requires integral size - - return s; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new2.C b/gcc/testsuite/g++.old-deja/g++.jason/new2.C deleted file mode 100644 index ed4f68d9f31..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new2.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 6267 -// Special g++ Options: -Wno-deprecated -fthis-is-variable -fno-exceptions - -struct A { - int i; - A() { i = 2; } -}; - -main() -{ - A *p = new A (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new3.C b/gcc/testsuite/g++.old-deja/g++.jason/new3.C deleted file mode 100644 index 9bf944c8c08..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new3.C +++ /dev/null @@ -1,37 +0,0 @@ -// PRMS Id: 6037 -// Special g++ Options: -fcheck-new -pedantic - -extern "C" void * malloc (__SIZE_TYPE__); - -int ena = 0; - -struct A { - int i; - A () { i = 2; } - void * operator new (__SIZE_TYPE__ s) - { - if (ena) - return 0; // WARNING - returning NULL - return malloc (s); - } -}; - -struct B { - int i; - B () { i = 2; } - void * operator new (__SIZE_TYPE__ s) throw() - { - if (ena) - return 0; - return malloc (s); - } -}; - -int main () -{ - ena = 1; - A *ap = new A; - B *bp = new B; - - return ap || bp ; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new4.C b/gcc/testsuite/g++.old-deja/g++.jason/new4.C deleted file mode 100644 index ba8af272cb5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new4.C +++ /dev/null @@ -1,22 +0,0 @@ -// Special g++ Options: -fcheck-new - -struct A { - A(): i(42) { } - A(int j): i(j) { } - int i; -}; - -A* ap = new A (1); -A* ap2 = new A[3]; - -main () -{ - if (ap->i != 1 || ap2[0].i != 42 || ap2[1].i != 42 || ap2[2].i != 42) - return 1; - - A* ap = new A (1); - A* ap2 = new A[3]; - - if (ap->i != 1 || ap2[0].i != 42 || ap2[1].i != 42 || ap2[2].i != 42) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new5.C b/gcc/testsuite/g++.old-deja/g++.jason/new5.C deleted file mode 100644 index 87279fd7009..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new5.C +++ /dev/null @@ -1,5 +0,0 @@ -int main () -{ - const int *p = new const int (0); - delete p; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset1.C b/gcc/testsuite/g++.old-deja/g++.jason/offset1.C deleted file mode 100644 index d4fd38b70dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/offset1.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 5070 (testcase 1) -// Build don't link: - -struct foo { - foo(int x = 0) {}; - int IsAlive(void) { return 1; } -}; - -struct xx { - int IsOk(int X); - foo a; -}; - -int xx::IsOk(int X) -{ - return ((xx::a).IsAlive()); // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset2.C b/gcc/testsuite/g++.old-deja/g++.jason/offset2.C deleted file mode 100644 index a598d433431..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/offset2.C +++ /dev/null @@ -1,23 +0,0 @@ -// PRMS Id: 5070 (testcase 2) - -int status = 1; - -struct foo { - foo& operator= (const foo&) { status = 0; } -}; - -struct xx { - foo a; -}; - -struct yy : public xx { - yy(foo& a) { xx::a = a; } -}; - -int main() -{ - foo f; - yy y (f); - - return status; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset3.C b/gcc/testsuite/g++.old-deja/g++.jason/offset3.C deleted file mode 100644 index d980ba1fcd0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/offset3.C +++ /dev/null @@ -1,22 +0,0 @@ -// PRMS Id: 5070 (bug 2) -// Build don't link: - -struct A { - void f (); -}; - -struct Ptr { - A* operator->(); -}; - -struct B { - Ptr p; -}; - -struct C: public B { - void g (); -}; - -void C::g() { - B::p->f(); // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset4.C b/gcc/testsuite/g++.old-deja/g++.jason/offset4.C deleted file mode 100644 index 2a5049105a4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/offset4.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ complains about the use of A::p below. -// Build don't link: - -struct A { - void *p; -}; - -struct B: public A { - int f () - { - if (A::p) - return 1; - return 0; - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq.C deleted file mode 100644 index ac099a4a667..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq.C +++ /dev/null @@ -1,39 +0,0 @@ -// PRMS Id: 4297 (related to 3525) -// Bug: Generating default op= didn't set TYPE_HAS_ASSIGNMENT, so it wasn't -// found. - -extern "C" int printf (char *, ...); - -class Y -{ -public: - Y(char*) {} - Y& operator = (const Y&) {} -}; - - -class X -{ -public: - X(int v, char* m) : _v(v), _m (m) {} - X () : _v(0), _m("Unknown") {} - // Defining our own op= here makes things work correctly. - -private: - int _v; - int _m4; - // Adding more members here increases the count on u. - Y _m; -}; - -const X sPassed (1, "Passed"), sFailed (-1, "Failed"); - -int main (int, char**) -{ - X result; - int u = 0; - result = (u++ ? sPassed : sFailed); - if (u == 1) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq2.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq2.C deleted file mode 100644 index 9e91ab3ae0f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq2.C +++ /dev/null @@ -1,26 +0,0 @@ -// Bug: default operator= is not being generated properly. -// PRMS Id: 3525 -// Build don't link: - -struct ccUnwind -{ - ccUnwind& operator = (const ccUnwind&); -}; - -struct ccEllipseUnit -{ - ccEllipseUnit () {} -}; - -struct ccEllipse : ccUnwind -{ - ccEllipse (); - ccEllipse (const ccEllipseUnit&); - -}; - -void foo () -{ - ccEllipse e; - e = ccEllipseUnit(); // gets bogus error - assignment not defined -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C deleted file mode 100644 index e290f7a21ba..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ generates code for assignment in invalid situations. -// Build don't link: - -class X { - int& a; -public: - X(int& i): a(i) { }; -}; - -void foo () -{ - int one=1, two=2; - X a(one), b(two); - a = b; // ERROR - no assignment semantics defined -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq4.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq4.C deleted file mode 100644 index d993d83ab9d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq4.C +++ /dev/null @@ -1,8 +0,0 @@ -// PRMS Id: 4329 -// Bug: default op= gives an warning about casting away volatile. -// Build don't link: - -struct foo -{ - volatile int bar[2]; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq5.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq5.C deleted file mode 100644 index 90996e96998..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq5.C +++ /dev/null @@ -1,26 +0,0 @@ -// Testcase for tricky synthesized op= in complex inheritance situation. -// This used to test whether the virtual base was copy-assigned only once. -// That feature is not required by ISO C++, so the test now only checks -// whether the vbase is assigned at all. - -int count = 0; -extern "C" int printf (const char *, ...); - -class A { - public: - A& operator = (const A&) { count++; return *this; } -}; - -class B: virtual private A { }; -class C: virtual public A { }; -class D: public B, public C { }; - -int main() -{ - D a, b; - a = b; - printf ("%d\n",count); - if (count == 0) - return 1; - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq6.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq6.C deleted file mode 100644 index 62be499c56d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opeq6.C +++ /dev/null @@ -1,24 +0,0 @@ -// Testcase for wrongful generation of operator =. -// Build don't link: - -class ivResource { -public: - ivResource (); -private: - ivResource & operator =(const ivResource &); -}; - -class ivButtonState : virtual public ivResource { -public: - void operator=(ivButtonState &); -}; - -class ivPrintBS : public ivButtonState { -}; - -void f () -{ - ivPrintBS a, b; - a = b; -} - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/operator.C b/gcc/testsuite/g++.old-deja/g++.jason/operator.C deleted file mode 100644 index bd21e378e14..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/operator.C +++ /dev/null @@ -1,31 +0,0 @@ -// General test for operator overloading permissiveness. -// Build don't link: -// Special g++ Options: - -typedef __SIZE_TYPE__ size_t; - -struct A { - int operator?:(int a, int b); // WARNING - - static int operator()(int a); // ERROR - must be nonstatic - static int operator+(A,A); // ERROR - must be nonstatic - int operator+(int a, int b = 1); // ERROR - two errors on this line - int operator++(char); // ERROR - must take 'int' - void operator delete (void *); - void operator delete (void *, unsigned long); -}; - -struct B { - void * operator new (size_t, void *); - int operator++(int = 0); - int operator+ (int); - void operator()(); - char * operator[](int); - B * operator->(); -}; - -int operator-(int a, int b); // ERROR - no class argument - -void * operator new (A a); // ERROR - invalid first argument -void operator delete (A a); // ERROR - ditto - -char * operator char * (int); // ERROR - return value, nonmember diff --git a/gcc/testsuite/g++.old-deja/g++.jason/operator2.C b/gcc/testsuite/g++.old-deja/g++.jason/operator2.C deleted file mode 100644 index 477616086a2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/operator2.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 6018 -// Build don't link: - -class string { - char *p; -public: - string(const char* s) ;// { p == s; } - operator const char*() ;// { return s; } -}; - -void f4(string& s) -{ - *s; // implies "s.operator const char*()" -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opover.C b/gcc/testsuite/g++.old-deja/g++.jason/opover.C deleted file mode 100644 index f4a3213f0d3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/opover.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ prefers a non-matching operator== over user-defined conversions -// and a default operator==. -// Build don't link: - -struct A { - operator int (); -}; - -struct B { - friend int operator== (B, int); -}; - -int foo (A& a) { - return a == 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/optimize.C b/gcc/testsuite/g++.old-deja/g++.jason/optimize.C deleted file mode 100644 index 1f554e21935..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/optimize.C +++ /dev/null @@ -1,42 +0,0 @@ -// Bug: g++ claims that control can fall off the end of these functions. -// PRMS Id: 4943 -// Special g++ Options: -O -pedantic-errors -// Build don't link: - -struct A { - A(); - A(const A&); - A& operator= (const A&); - ~A(); -}; - -int f () -{ - A a[2]; - return 1; -} // gets bogus error - jump_optimize - -int g () -{ - A a; - return 1; -} // gets bogus error - jump_optimize - -struct B { - B(); - B(const B&); - B& operator= (const B&); - ~B(); -}; - -inline B::~B() -{ - int i = 2; - while (i--) ; -} - -int h () -{ - B b; - return 1; -} // gets bogus error - jump_optimize diff --git a/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C b/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C deleted file mode 100644 index 0d4e17752c7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Used to crash on the alpha with optimization. -// Special g++ Options: -w - -struct Fix { - unsigned short l; -}; - -static inline void f (int len) -{ - if (len > 65535) - abort (); -} - -struct Fix a = { 33 }; - -main() -{ - f (a.l); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload.C b/gcc/testsuite/g++.old-deja/g++.jason/overload.C deleted file mode 100644 index bc41672c3e5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -enum bar {}; - -void operator+ (int, int);// ERROR - .* -void operator+ (bar&, int); - -template <class T> void operator+ (int b, T& t) { return b; } -void operator+ (int, bar&); - -template <class T> class foo -{ -public: - friend void operator+ <> (int, T&); -}; - -class baz; - -class foo<int>; -class foo<baz>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload1.C b/gcc/testsuite/g++.old-deja/g++.jason/overload1.C deleted file mode 100644 index e29a7c16b91..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: g++ thinks there is a conversion from void * to B *. -// Build don't link: - -struct A { - operator void* (); -}; - -struct B: public A { }; - -void bar (A& a) { - B* bp = (B*)a; // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload10.C b/gcc/testsuite/g++.old-deja/g++.jason/overload10.C deleted file mode 100644 index cd18382b79f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload10.C +++ /dev/null @@ -1,22 +0,0 @@ -// PRMS Id: 4257 (second bug) -// Bug: g++ fails to recognize multiple previous instantiations of a function -// template. -// Build don't link: -// Special g++ Options: -fguiding-decls - -template <class T> -class A { - int i; - - friend int foo (A<T>&); -}; - -template <class T> int foo (A<T>& a) { return a.i; } - -A<int> a; -A<char> dummy; - -void bar () -{ - foo (a); // gets bogus error - two foo(A<int>&)'s -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload11.C b/gcc/testsuite/g++.old-deja/g++.jason/overload11.C deleted file mode 100644 index f5ed01ef1b4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload11.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 4697 -// Bug: g++ calls the non-const method for a const object. - -class A { -public: - void foo(int &i) const { i = 0; } - void foo(int &i) { i = 1; } -}; - -int main() -{ - A a; - const A& b = a; - int i = 2; - b.foo (i); - return i; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload12.C b/gcc/testsuite/g++.old-deja/g++.jason/overload12.C deleted file mode 100644 index 61d3740ed41..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload12.C +++ /dev/null @@ -1,15 +0,0 @@ -// PRMS Id: 4066 -// Bug: g++ doesn't notice the const on reference returns. - -struct B { - int foo() { return 1; } - int foo() const { return 0; } -}; - -B b_; -const B &b () { return b_; } - -int main() -{ - return b().foo(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload13.C b/gcc/testsuite/g++.old-deja/g++.jason/overload13.C deleted file mode 100644 index 6b5ca0fa93d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload13.C +++ /dev/null @@ -1,27 +0,0 @@ -// Bug: g++ screws up derived->base conversions when calling a global function -// in the presence of matching members in the base. Whew. - -struct xios { - virtual ~xios() { } -}; - -struct xistream: virtual public xios { - int j; - void operator>>(char&); -}; - -struct xfstreambase: virtual public xios { }; - -struct xifstream: public xfstreambase, public xistream { }; - -void operator>>(xistream& i, int j) -{ - i.j = 0; -} - -int main() { - int i; - xifstream ifs; - - ifs >> i; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload14.C b/gcc/testsuite/g++.old-deja/g++.jason/overload14.C deleted file mode 100644 index 6a5d3dc2d5a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload14.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ fails to recognize that the template matches the target type. -// Build don't link: - -template <class T> void foo (T *, int); - -struct A; -void bar () -{ - void (*p)(A *, int) = &foo; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload15.C b/gcc/testsuite/g++.old-deja/g++.jason/overload15.C deleted file mode 100644 index 779de722c41..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload15.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ thinks that int->long is a promotion. -// Build don't link: - -long f (long, long); -double f (double, double); - -void g (double d) -{ - f (d, 0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C b/gcc/testsuite/g++.old-deja/g++.jason/overload16.C deleted file mode 100644 index 34237bc4c67..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C +++ /dev/null @@ -1,6 +0,0 @@ -void f (int); // ERROR - -void f (long); // ERROR - -int main() -{ - f (1 & 0xffffff00UL); // ERROR - ambiguous -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload17.C b/gcc/testsuite/g++.old-deja/g++.jason/overload17.C deleted file mode 100644 index 65738482844..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload17.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: g++ fails to prefer UDC's alone to UDC's plus standard conversions. -// Build don't link: - -struct B { }; -struct D: public B { }; -struct DP { - operator D * () const; - operator double () const; -}; - -void f (B *); -void f (D *); -void g (double); -void g (float); - -void h (DP p) -{ - f (p); - g (p); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload18.C b/gcc/testsuite/g++.old-deja/g++.jason/overload18.C deleted file mode 100644 index d4d9ec14b7e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload18.C +++ /dev/null @@ -1,6 +0,0 @@ -// pushdecl gets confused by this. -// Build don't link: - -void f (); -void f (int, int); -template <class T> T f (T) { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload19.C b/gcc/testsuite/g++.old-deja/g++.jason/overload19.C deleted file mode 100644 index ad5817565fb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload19.C +++ /dev/null @@ -1,11 +0,0 @@ -// PRMS Id: 4689 -// Bug: g++ doesn't notice operators overloaded on enumeral types. - -enum E { A=5, B=32, C=100 }; - -E operator|(E a, E b) { return C; }; - -int main() -{ - return (A|B) != C; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload2.C b/gcc/testsuite/g++.old-deja/g++.jason/overload2.C deleted file mode 100644 index 56419425383..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: foo and bar are considered to be overloaded (i.e. their -// IDENTIFIER_GLOBAL_VALUES are TREE_LISTs) even though they aren't, -// so ?: thinks it can't resolve the names. -// Build don't link: - -void foo (); -void bar (); - -void baz () -{ - void (*p)() = 1 ? foo : bar; // gets bogus error - wrongful overloading -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C b/gcc/testsuite/g++.old-deja/g++.jason/overload20.C deleted file mode 100644 index 998f6a7466c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: this code causes an internal compiler error 4. - -void f (char *); -void f (int); -struct A { - void f (); // ERROR - candidate - void f (int); // ERROR - candidate - void g () { - void (*p)(char *) = f; // ERROR - no matching function in scope - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C deleted file mode 100644 index dc2f69ee908..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C +++ /dev/null @@ -1,12 +0,0 @@ -struct X { - void f (int = 4, char = 'r'); // ERROR - - void g (int = 4, char = 'r'); // ERROR - -}; - -void -X::f (int i = 4, char x = 'r') -{ } // ERROR - duplicate default args - -void -X::g (int i = 9, char x = 's') -{ } // ERROR - duplicate default args diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload22.C b/gcc/testsuite/g++.old-deja/g++.jason/overload22.C deleted file mode 100644 index fd7276a473b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload22.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 4574 -// Bug: g++ prefers int to double for float& argument -// Build don't link: - -inline double abs (double x) { return x;} -inline int abs (int i) { return i; } - -float& fn(float& f) -{ - return f; -} - -void foo() -{ - float f = 23.45; - abs(fn(f)); // gets bogus warning -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload23.C b/gcc/testsuite/g++.old-deja/g++.jason/overload23.C deleted file mode 100644 index 21cda3a14dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload23.C +++ /dev/null @@ -1,27 +0,0 @@ -// From: panisset@cae.ca (Jean-Francois Panisset) -// Date: Mon, 6 Jun 94 13:39:25 EDT -// Subject: Problem with operator overloading - -// Build don't link: - -class ostream { -public: - ostream& operator<<(double n); - ostream& operator<<(float n); -}; - -class X -{ -public: - operator long() const; - operator double() const; -}; -ostream& operator<< (ostream& os, const X& x); - - -int main() -{ - X x; - ostream os; - os << x; // gets bogus error - converting to float -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload24.C b/gcc/testsuite/g++.old-deja/g++.jason/overload24.C deleted file mode 100644 index 0a12b001f78..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload24.C +++ /dev/null @@ -1,23 +0,0 @@ -// PRMS Id: 5124 -// Bug: g++ promotes bar to int* too soon and the call to f fails. -// Build don't link: - -typedef int arr[1]; - -struct A { - void f(void); - void f(arr &); - - void g(void); - void g(int *); - - void h(void); -}; - - -void A::h(void) -{ - arr bar; - f(bar); - g(bar); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload26.C b/gcc/testsuite/g++.old-deja/g++.jason/overload26.C deleted file mode 100644 index 0c15668af6b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload26.C +++ /dev/null @@ -1,22 +0,0 @@ -// Bug: g++ tries to build up a mangled name for its ideal match, which -// fails for one call below. -// Build don't link: - -extern const char foo[]; -extern const char baz[10]; -extern const char *fred; - -struct A { - void f(const char *); -} *a; - -void bing(const char *); -int main () -{ - a->f(foo); // gets bogus error because foo's size unknown. - a->f(baz); - a->f(fred); - bing(fred); - bing(foo); - bing(baz); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload27.C b/gcc/testsuite/g++.old-deja/g++.jason/overload27.C deleted file mode 100644 index 123018dd1b5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload27.C +++ /dev/null @@ -1,7 +0,0 @@ -void f(const int &) { } -void f(const float &); - -int main() -{ - f(false); // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C b/gcc/testsuite/g++.old-deja/g++.jason/overload28.C deleted file mode 100644 index 265c523f816..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C +++ /dev/null @@ -1,11 +0,0 @@ -// PRMS Id: 6056 - -struct Foo { - Foo() { } // ERROR - candidate - Foo(int i = 25) { } // ERROR - candidate -}; - -int main() -{ - Foo* f1 = new Foo(); // ERROR - ambiguous -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload29.C b/gcc/testsuite/g++.old-deja/g++.jason/overload29.C deleted file mode 100644 index ecd43592b08..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload29.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: we get an error trying to build up our ideal candidate. -// Build don't link: - -class C { - public: - C( const char * ); -}; - - extern const char c1[]; - -void f2( const char * ); - -void f1() { - C *fntp = new C(c1); // Line 10 - f2( c1 ); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload3.C b/gcc/testsuite/g++.old-deja/g++.jason/overload3.C deleted file mode 100644 index 63b175e70df..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: bar is considered to be overloaded (i.e. its -// IDENTIFIER_GLOBAL_VALUES are TREE_LISTs) even though it isn't, -// so default_conversion thinks it can't resolve the name. -// Build don't link: - -void foo (); -void bar (); - -void baz () -{ - void (*p)() = 1 ? (void (*)()) &foo : bar; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload30.C b/gcc/testsuite/g++.old-deja/g++.jason/overload30.C deleted file mode 100644 index 24485c5851d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload30.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 6412 -// Build don't link: - -class Foo; - -template <class F> -class Temp -{ - F func_; -public: - Temp (F f) : func_(f) {} -}; - -template <class T> -T* func1 (T* t) { return t; } - -Temp<Foo*(*)(Foo*)> temp2(func1); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload31.C b/gcc/testsuite/g++.old-deja/g++.jason/overload31.C deleted file mode 100644 index e45d802033f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload31.C +++ /dev/null @@ -1,24 +0,0 @@ -// PRMS Id: 6568 -// Bug: g++ complains about the ambiguous conversion to bool even though -// we wouldn't end up using it anyway. -// Build don't link: - -class AString -{ -public: - AString (unsigned len); - operator char *() const; - operator char const *() const; -}; - -void -foo(unsigned t, AString const & handle) -{ -} - -void -foo(AString const & handle, bool includeSpecials) -{ - unsigned t; - foo(t, handle); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload32.C b/gcc/testsuite/g++.old-deja/g++.jason/overload32.C deleted file mode 100644 index 95f251d6664..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload32.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS Id: 7128 -// Build don't link: - -class B {}; - -class D : public B {}; - -class X { - public: - operator const B & () const; - operator const D & () const; -}; - -void f( const D & ); - -void g( const X & x ) -{ - f( x ); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload33.C b/gcc/testsuite/g++.old-deja/g++.jason/overload33.C deleted file mode 100644 index 8b5bb4a34ae..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload33.C +++ /dev/null @@ -1,78 +0,0 @@ -// PRMS ID: 7507 -// Build don't link: - -/* ------------------------------------------------------------ */ - -class Base0 -{ -public: - Base0() {} - virtual ~Base0() {} -}; - -class Base1 -{ -public: - Base1() {} - virtual ~Base1() {} -}; - -class Derived : public Base0, public Base1 -{ -public: - Derived() {} - virtual ~Derived() {} -}; - -/* ------------------------------------------------------------ */ - -class Dummy -{ - public: - Dummy(Base0 * theBase) {} - ~Dummy() {} -}; - -/* ------------------------------------------------------------ */ - -template<class T> -class ConstSmartPtr -{ - T* myItem; // private - - public: - ConstSmartPtr(T const* theItem); - - operator T const*() const - { return myItem; } - protected: - T* _item() const - { return myItem; } -}; - -template<class T> -class SmartPtr : public ConstSmartPtr<T> -{ - public: - SmartPtr(T* theItem) - : ConstSmartPtr<T>(theItem) {} - - T* item() const - { return _item(); } - - operator T*() const - { return _item(); } -}; - -/* ------------------------------------------------------------ */ - -void -function() -{ - SmartPtr<Derived> myObj = new Derived(); - - Dummy th1(myObj); // Doesn't work under Cygnus - Dummy th2((Base0 *) myObj); // Doesn't work either -} - -/* ------------------------------------------------------------ */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload34.C b/gcc/testsuite/g++.old-deja/g++.jason/overload34.C deleted file mode 100644 index 871c35aea93..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload34.C +++ /dev/null @@ -1,8 +0,0 @@ -// PRMS ID: 8010 -// Build don't link: - -class X { - int & flag; -public: - void f(){ flag++ ; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload35.C b/gcc/testsuite/g++.old-deja/g++.jason/overload35.C deleted file mode 100644 index bb6e436f2dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload35.C +++ /dev/null @@ -1,25 +0,0 @@ -// PRMS Id: 9647 -// Build don't link: - -class castBug -{ -public: - operator int *(); - operator const int *() const; -}; - -class castBug2 -{ -public: - operator const int *() const; -}; - -void voidfn(void *); - -void test() -{ - castBug b; - castBug2 b2; - voidfn(b); // gets bogus error - voidfn(b2); // ERROR - discarding const -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload36.C b/gcc/testsuite/g++.old-deja/g++.jason/overload36.C deleted file mode 100644 index f5e6fb61dc3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload36.C +++ /dev/null @@ -1,15 +0,0 @@ -// Test for subsequence checking in overload resolution. - -class foo { -public: - void operator <<(char *) { } - void operator <<(const char * const &); -}; - -int -main() -{ - char s[20]; - foo f; - f << s; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload4.C b/gcc/testsuite/g++.old-deja/g++.jason/overload4.C deleted file mode 100644 index 1da0ff0a454..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload4.C +++ /dev/null @@ -1,11 +0,0 @@ -// Testcase for simple overloading resolution. -// Build don't link: - -void foo (int); -void foo (int, int); - -void bar () -{ - foo (1); - foo (1, 2); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C b/gcc/testsuite/g++.old-deja/g++.jason/overload5.C deleted file mode 100644 index 8702bbb26ea..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C +++ /dev/null @@ -1,4 +0,0 @@ -// Testcase for simple overloading resolution. - -int foo (); // ERROR - -void foo (); // ERROR - disallowed overload diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload6.C b/gcc/testsuite/g++.old-deja/g++.jason/overload6.C deleted file mode 100644 index 3ae96428389..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ thinks there is a default conversion from void* to B*. -// There isn't. -// Build don't link: - -struct A { - operator void* (); -}; - -struct B { }; - -void foo (B* bp); - -void bar (A& a) { - foo (a); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload7.C b/gcc/testsuite/g++.old-deja/g++.jason/overload7.C deleted file mode 100644 index 361150569c9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload7.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ thinks there is a default conversion from A& to B*. -// There isn't. -// Build don't link: - -struct A { - operator A* (); -}; - -struct B: public A { }; - -void foo (B* bp); - -void bar (A& a) { - foo (a); // ERROR - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload8.C b/gcc/testsuite/g++.old-deja/g++.jason/overload8.C deleted file mode 100644 index 9b605f8bce7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload8.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ fails to catch the ambiguity below. -// Build don't link: - -struct A { - operator int () { return 1; }; - operator int &() { return 1; }; // ERROR - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload9.C b/gcc/testsuite/g++.old-deja/g++.jason/overload9.C deleted file mode 100644 index 5b832fbc5f1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload9.C +++ /dev/null @@ -1,39 +0,0 @@ -// PRMS Id: 4257 -// Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug) -// Build don't link: - -class ostream -{ -public: -#ifdef EITHER_ONE_A - ostream& operator<<(unsigned long n); - ostream& operator<<(long n); -#else - ostream& operator<<(short n); - ostream& operator<<(unsigned short n); -#endif -}; - -class ccObjectInfo {}; - -ostream& operator << (ostream& out, const ccObjectInfo& obj); - -class ccString : public ccObjectInfo -{ -#ifdef EITHER_ONE_B - operator int () const; -#else - operator long () const; -#endif -}; - -// Should pick this one!! -ostream& operator << (ostream& o, const ccString & s); - -extern ostream cout; - -void f () -{ - ccString foo; - cout << foo; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse1.C b/gcc/testsuite/g++.old-deja/g++.jason/parse1.C deleted file mode 100644 index a5ba83c78eb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: g++ parses the declaration of r as a function declaration. -// Build don't link: - -void foo (int i) -{ - int &r (i); - r = 1; // gets bogus error - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse10.C b/gcc/testsuite/g++.old-deja/g++.jason/parse10.C deleted file mode 100644 index b67633695c3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse10.C +++ /dev/null @@ -1,15 +0,0 @@ -// Testcase for precedence of ?: wrt = - -extern "C" int printf (const char *, ...); - -int main() -{ - int j = 0, k = 0; - 1 ? j : k = 5; // should be parsed 1 ? j : (k = 5) - (void) (1 ? k = 5 : 0); - k = 5 ? 1 : 0; // should be parsed k = (5 ? 1 : 0) - - printf ("%d %d\n", j, k); - - return j == 5 || k == 5; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse11.C b/gcc/testsuite/g++.old-deja/g++.jason/parse11.C deleted file mode 100644 index e9f285cee8d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse11.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS Id: 6825 -// Build don't link: - -class aClass -{ - ; -private: - ; // This line causes problems -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse12.C b/gcc/testsuite/g++.old-deja/g++.jason/parse12.C deleted file mode 100644 index eb71775bcf0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse12.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 6821 - -struct A { - int operator()(int i) { return i; } -}; - -struct B { - A* p; - int f () { return (*p)(42); } // gets bogus error -}; - -int main () -{ - B b = { new A }; - - return b.f () != 42; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse13.C b/gcc/testsuite/g++.old-deja/g++.jason/parse13.C deleted file mode 100644 index 0ffef983e70..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse13.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -struct A { - struct B {}; - struct C; -}; - -struct A :: C : A :: B {}; // gets bogus error - parse error before `:' diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse14.C b/gcc/testsuite/g++.old-deja/g++.jason/parse14.C deleted file mode 100644 index 20fcc47dbf8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse14.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: g++ decides that A::foo is introducing a constructor declarator. -// Build don't link: - -struct A { - typedef bool foo; -}; - -A::foo (*bar) (); - -struct B { - A::foo (*bar) (); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse2.C b/gcc/testsuite/g++.old-deja/g++.jason/parse2.C deleted file mode 100644 index 71be1f4aa22..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse2.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: g++ doesn't understand constructor syntax for pointers. -// Build don't link: - -void f () { - char * p (0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse3.C b/gcc/testsuite/g++.old-deja/g++.jason/parse3.C deleted file mode 100644 index 16f99aaa2de..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse3.C +++ /dev/null @@ -1,6 +0,0 @@ -// PRMS Id: 4484 (bug 2) -// Bug: g++ does not grok abstract declarator syntax for method pointers. -// Build don't link: - -template <class T> class A { }; -void (A<int>::*p)() = (void (A<int>::*)())0; // gets bogus error - abstract declarator failure diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse4.C b/gcc/testsuite/g++.old-deja/g++.jason/parse4.C deleted file mode 100644 index 95e0f441c73..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse4.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ doesn't handle superfluous parentheses when redeclaring a TYPENAME. -// Build don't link: - -typedef int foo; -class A { - typedef int ((foo)); // gets bogus error - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse5.C b/gcc/testsuite/g++.old-deja/g++.jason/parse5.C deleted file mode 100644 index 519deb2867a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse5.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: foo (bar) should be a declaration of a static data member, not a -// function; it's getting caught by the rules for constructors. -// Build don't link: - -typedef int foo; -typedef int bar; -struct A { - static foo (bar); // gets bogus error -}; - -int i = A::bar; // gets bogus error -int (*fp)(bar) = A::foo; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse6.C b/gcc/testsuite/g++.old-deja/g++.jason/parse6.C deleted file mode 100644 index 677dbe2cb3f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse6.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS id: 4653 -// Bug: g++ tries to resolve declarator/expression ambiguities too soon. -// Build don't link: - -template<class T> struct A { }; - -void f () { - void (A<int>::*pmf) (); // gets bogus error - late binding -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse7.C b/gcc/testsuite/g++.old-deja/g++.jason/parse7.C deleted file mode 100644 index bd9744c8315..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse7.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ tries to parse this as a constructor. -// Build don't link: - -typedef int foo; -struct A { - foo (*bar)(); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse8.C b/gcc/testsuite/g++.old-deja/g++.jason/parse8.C deleted file mode 100644 index 1ed9de76040..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse8.C +++ /dev/null @@ -1,2 +0,0 @@ -// Build don't link: -void foo(const int* const); // gets bogus error diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse9.C b/gcc/testsuite/g++.old-deja/g++.jason/parse9.C deleted file mode 100644 index da66fea7887..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/parse9.C +++ /dev/null @@ -1,18 +0,0 @@ -// PRMS Id: 5720 -// Bug: the extra set of parens confuses the expr/declarator disambiguation. - -class Fu -{ - int val; -public: - Fu(int i) : val(i) { }; - void print() { } -}; - -int main(int argc, char * argv[]) -{ - int * i = &argc; - - Fu((*i)).print(); // gets bogus error - Fu((*j)); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmem.C b/gcc/testsuite/g++.old-deja/g++.jason/pmem.C deleted file mode 100644 index 76e873255ed..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmem.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ parses the declaration of 'char A::* foo' below as a -// declaration of 'char A'. -// Build don't link: - -class A { }; -typedef int foo; -void f () -{ - char A::* foo; - foo = 0; // gets bogus error - parsing blunder -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmem2.C b/gcc/testsuite/g++.old-deja/g++.jason/pmem2.C deleted file mode 100644 index 99adf1c143f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmem2.C +++ /dev/null @@ -1,43 +0,0 @@ -template <class Called> -class aCallback -{ -public: - aCallback(Called& obj, int (Called::*met)()); - - int callback(); - -protected: - -private: - Called& object; - - int (Called::*method)(); - -}; - -template <class Called> -aCallback<Called>::aCallback(Called& obj, - int (Called::*met)()) : -object(obj), -method(met) -{}; - -template <class Called> -int aCallback<Called>::callback() -{ - return (object.*method)(); -} - -struct myStruct -{ - int action() {return 0;}; -}; - -int main() -{ - myStruct toto; - - aCallback<myStruct> cb(toto, &myStruct::action); - - return cb.callback(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmem3.C b/gcc/testsuite/g++.old-deja/g++.jason/pmem3.C deleted file mode 100644 index a780c2371d8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmem3.C +++ /dev/null @@ -1,11 +0,0 @@ -// Test that comparison of pointers to members does not complain about -// contravariance violation. - -struct A { int i; }; -struct B : public A { int j; int f (); }; -int main () -{ - int A::*apm = &A::i; - int B::*bpm = apm; - return apm != bpm; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmem4.C b/gcc/testsuite/g++.old-deja/g++.jason/pmem4.C deleted file mode 100644 index 3ce2bb9fc0b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmem4.C +++ /dev/null @@ -1,10 +0,0 @@ -struct X {}; -X& X::*PTM_1; // ERROR - pointer to reference member -void X::*PTM_2; // ERROR - pointer to void member - -struct A { - static int& ir; -}; - -int i; -int& A::ir = i; // not an error diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf.C deleted file mode 100644 index 677363995b7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf.C +++ /dev/null @@ -1,7 +0,0 @@ -// PRMS Id: 4333 -// Bug: g++ can't deal with casts to pointer to member function. -// Build don't link: - -class A { }; -typedef void (A::* pmf)(); -void foo () { (pmf) 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf2.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf2.C deleted file mode 100644 index 7ebb23b095f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf2.C +++ /dev/null @@ -1,13 +0,0 @@ -// PRMS Id: 4484 (bug 3) -// Bug: g++ does implicitly take the address of methods passed to fns. -// Build don't link: - -struct A { - void f (); -}; - -void g (void (A::*)()); - -void h () { - g (A::f); // ERROR - failed conversion to method pointer -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C deleted file mode 100644 index 4d4d6ef237f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C +++ /dev/null @@ -1,19 +0,0 @@ -// From: enewton@uunet.uu.NET -// Subject: g++ 2.5.8: cannot cast member function pointers -// Date: 27 Jan 1994 01:22:56 -0500 -// Build don't link: - -struct A { - void f(char); - void g(int); -}; - -typedef void (A::*Ptr)(char); - -void q() { - Ptr p; - - p = (Ptr) &A::f; - p = (Ptr) &A::g; - p = &A::f; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf4.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf4.C deleted file mode 100644 index a0af9f41289..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf4.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS Id: 4484 (bug 5) -// Bug: g++ can't convert between pmf types. -// Build don't link: - -class A; -typedef void (A::*pmf)(); -typedef void (A::*pmfc)() const; - -pmfc p = (pmfc)(pmf)0; // gets bogus error - pmf conversion diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf5.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf5.C deleted file mode 100644 index c27bec10f9e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf5.C +++ /dev/null @@ -1,18 +0,0 @@ -// PRMS Id: 4985 -// Build don't link: -// Special g++ Options: - -struct Thing { - int OverloadFn() const; - void FunctionA(char* restOfLine); - void OverloadFn(char* restOfLine); -}; - -struct ThingEntry { - void (Thing::*_handler)(char* restOfLine); -}; - -static ThingEntry KeyWordTable[] = { - &Thing::FunctionA, - Thing::OverloadFn, -}; // WARNING - implicit & diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf6.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf6.C deleted file mode 100644 index 08e425b7931..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf6.C +++ /dev/null @@ -1,11 +0,0 @@ -// PRMS Id: 5656 -// Bug: g++ tries (which is a bug) and fails (which is a bug) to initialize -// var at runtime. -// Build don't link: - -struct A -{ - int func(int); - int func() const; -}; -int (A::* var) () const = & A::func; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf7.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf7.C deleted file mode 100644 index 8ef92fbb679..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf7.C +++ /dev/null @@ -1,27 +0,0 @@ -// PRMS Id: 6486 -// Make sure that no confused handling of COND_EXPRs and SAVE_EXPRs messes -// with the number of calls to foo. - -int c; - -struct A { - void f () {} - virtual void g () {} -}; - -A& foo () -{ - static A a; - ++c; - return a; -} - -int main () -{ - void (A::*p)() = &A::f; - (foo ().*p)(); - p = &A::g; - (foo ().*p)(); - - return 2 - c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf8.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf8.C deleted file mode 100644 index 7fccb31cb43..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf8.C +++ /dev/null @@ -1,29 +0,0 @@ -// PRMS Id: 6905 - -class Parent { -public: - void DoSomething() { return; }; - int i; -}; - -class Child : public Parent { -public: -}; - -class User { -public: - void DoAnyThing(void (Parent::*)(void)) { return; } - void DoAThing(void (Child::*)(void)) { return; } - void DoAThing(int Child::*) { return; } -}; - - -int main() -{ - User a; - - a.DoAnyThing(&Child::DoSomething); - a.DoAThing(&Child::DoSomething); - a.DoAThing(&Parent::DoSomething); - a.DoAThing(&Parent::i); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmf9.C b/gcc/testsuite/g++.old-deja/g++.jason/pmf9.C deleted file mode 100644 index 335cfccb8c0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmf9.C +++ /dev/null @@ -1,57 +0,0 @@ -// PRMS id: g++/13340 -// Build don't link: - -class rectangle { - -public: - rectangle(); - int overlaps() const; - -}; - -class region -{ - friend class region_impl; - -public: - region(); - typedef int (region::* region_func)() const; - -}; - -class region_impl { - friend class region; - -private: - rectangle content, mbb; - region_impl *link_p; - region_impl(const rectangle &content); - -public: - int iterate(region *region_p, region::region_func what, - const rectangle &clip_rect) const; - int iterate(region *region_p, region::region_func what, - const region_impl &clip_rgn) const; -}; - - -int -region_impl::iterate (region *region_p, region::region_func what, - const rectangle &clip_rect) const -{ - for (const region_impl *p = this; p != 0 && p->mbb.overlaps(); - p = p->link_p) - if (p->content.overlaps()) - if (!(region_p->*what)()) return 0; - return 1; -} - -int -region_impl::iterate (region *region_p, region::region_func what, - const region_impl &clip_rgn) const -{ - for (const region_impl *p = this; p != 0 && p->mbb.overlaps(); - p = p->link_p) - if (!clip_rgn.iterate(region_p, what, p->content)) return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C b/gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C deleted file mode 100644 index 87d2ed11464..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 4484 (bug 1) -// Bug: g++ does not support templates involving method pointers. -// Build don't link: - -struct A { - void f (); -}; - -template <class T> void -f (void (T::*p)()) // gets bogus error - use of template parm as aggregate -{ } - -void g () -{ - f (&A::f); // gets bogus error - templates and method pointers -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/precedence.C b/gcc/testsuite/g++.old-deja/g++.jason/precedence.C deleted file mode 100644 index af2dcde85a5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/precedence.C +++ /dev/null @@ -1,14 +0,0 @@ -// Bug: g++ groups ->* before casts. -// PRMS Id: 4484 (bug 4) -// Build don't link: - -struct A { }; -struct B : public A { void f (); }; - -void g () -{ - A* ap = new B; - void (B::*p)() = &B::f; - - ((B*)ap->*p)(); // gets bogus error - incorrect precedence -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C deleted file mode 100644 index fecace37af4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C +++ /dev/null @@ -1,12 +0,0 @@ -class A -{ -public: - A (const A& ccref); - friend A const re (const A& v1); // ERROR - -}; - -A // const -re (const A& ref) -{ // ERROR - mismatched decls - return A (ref); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref1.C b/gcc/testsuite/g++.old-deja/g++.jason/ref1.C deleted file mode 100644 index 590ddf507c9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: g++ tries to call a constructor for a reference. Doh! -// Build don't link: - -class B; -struct A { - B & b; - A (B & x) : b (x) { } // gets bogus error - -}; // gets bogus error - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref10.C b/gcc/testsuite/g++.old-deja/g++.jason/ref10.C deleted file mode 100644 index 876ca45dd1e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref10.C +++ /dev/null @@ -1,31 +0,0 @@ -// Test that conversion from D* to B*& works properly. - -extern "C" int printf (const char *, ...); - -struct V { - int a; -}; - -struct B: virtual V { - int b; -}; - -struct D: B { - int c; -}; - -V* gp = 0; - -void foo(V * const &r) { - gp = r; -} - -int bar(V *r) { - return (r != gp); -} - -int main() { - D *p = new D; - foo(p); - return bar(p); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref11.C b/gcc/testsuite/g++.old-deja/g++.jason/ref11.C deleted file mode 100644 index b8c6f317a10..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref11.C +++ /dev/null @@ -1,17 +0,0 @@ -int main(int argc, char ** argv) { - - int (&var_field_ref)[] = * (int (*)[]) new int [42]; - int (&fix_field_ref)[1] = * (int (*)[1]) new int [42]; - - int static_field[42]; - - int *const &var_field_ptr_ref = var_field_ref; // gets bogus error - int *const &fix_field_ptr_ref = fix_field_ref; - int *const &static_field_ptr_ref = static_field; - - int * var_field_ptr = var_field_ref; // gets bogus error - int * fix_field_ptr = fix_field_ref; - int * static_field_ptr = static_field; - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref12.C b/gcc/testsuite/g++.old-deja/g++.jason/ref12.C deleted file mode 100644 index 30e963398cb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref12.C +++ /dev/null @@ -1,5 +0,0 @@ -void f (char *const &) { } -int main () -{ - f ("hi"); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref2.C b/gcc/testsuite/g++.old-deja/g++.jason/ref2.C deleted file mode 100644 index fe97990cd92..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref2.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: g++ can't deal with references to arrays. -// Build don't link: - -typedef float Matrix[4][4]; -Matrix m; -Matrix& f () { return m; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref3.C b/gcc/testsuite/g++.old-deja/g++.jason/ref3.C deleted file mode 100644 index 2bdd023383f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref3.C +++ /dev/null @@ -1,7 +0,0 @@ -// PRMS Id: ???? -// Build don't link: - -void f (const int& i) -{ - &(int&)i; // gets bogus error - references ARE lvalues -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref4.C b/gcc/testsuite/g++.old-deja/g++.jason/ref4.C deleted file mode 100644 index 5c62d6a10d2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref4.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: - -void f (); -void (&fr)() = f; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref5.C b/gcc/testsuite/g++.old-deja/g++.jason/ref5.C deleted file mode 100644 index 07895223350..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -int i; -int &const j = i; // ERROR - invalid const -int &const f(); // ERROR - invalid const -void g () -{ - j = 1; - f() = 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref6.C b/gcc/testsuite/g++.old-deja/g++.jason/ref6.C deleted file mode 100644 index afebb6bab98..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref6.C +++ /dev/null @@ -1,2 +0,0 @@ -const int &f(); -int &a = f(); // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref7.C b/gcc/testsuite/g++.old-deja/g++.jason/ref7.C deleted file mode 100644 index af64d6a7521..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref7.C +++ /dev/null @@ -1,21 +0,0 @@ -// Testcase for the lifetime of a temporary object which is used to -// initialize a reference. - -int destroyed = 0; - -struct A { - A() { } - A(int) { } - ~A() { destroyed++; } -}; - -A a; -A foo () { return a; } - -int main() -{ - const A& ar = foo(); - const A& ar2 = A(); - const A& ar3 = (A)1; - return destroyed; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref8.C b/gcc/testsuite/g++.old-deja/g++.jason/ref8.C deleted file mode 100644 index 10e335e9976..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref8.C +++ /dev/null @@ -1,17 +0,0 @@ -// PRMS Id: 5184 -// Bug: cast to C& below does not adjust address - -struct A {}; -struct B { - virtual void foo () {}; -}; -struct C : public B, public A {}; - -int main() { - C c; - - A& ar = c; - C& cr = (C&)ar; - - cr.foo(); // this line causes core dump -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref9.C b/gcc/testsuite/g++.old-deja/g++.jason/ref9.C deleted file mode 100644 index 099d3421cf8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/ref9.C +++ /dev/null @@ -1,25 +0,0 @@ -// Bug: g++ re-evaluates the initializer for r before calling f(); since i has -// changed to an invalid index, this breaks. - -class C -{ -public: - void f () { } -}; - -void foo (C * objs[]) -{ - int i = 0; - C & r = * objs[i]; /* make reference to element */ - - i = 666; - r.f (); /* core dumps here */ -} - -int -main () -{ - C * objs[1] = { new C }; - - foo (objs); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/report.C b/gcc/testsuite/g++.old-deja/g++.jason/report.C deleted file mode 100644 index d3d3392e451..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/report.C +++ /dev/null @@ -1,68 +0,0 @@ -// Build don't link: -// GROUPS passed error-reporting -template <char C> -class badoo -{ -}; - -template <int (*F) (int)> -class doowop -{ -}; - -struct A -{ - int a; - ~A () { a = 0; } - operator int () { return a; } -}; - -extern "C" int atoi (char *); - -int (*fee)(char *) = atoi; -int (**bar)(char *) = &fee; - -char *s = "4"; -char **sp = &s; -char ***spp = &sp; - -int foo (int a = (**bar) (s)) -{ - return doowop<foo>::bar; // ERROR - not a member -} // ERROR - non-void - -int foo2 (int (*a)(int) = &foo) -{ - undef4 (1); // ERROR - implicit declaration - return 1; -} - -class X{ - class Y{}; -}; - -typedef int const * bart (); -typedef bart const * const * bar2; - -bar2 baz (X::Y y) -{ - X::Y f; - bar2 wa [5]; - wa[0] = baz(f); - undef2 (1); // ERROR - implicit declaration -} // ERROR - non-void - -int ninny () -{ - struct A - { - static int ninny2 () { return badoo<'\001'>::foo; } // ERROR - not a member - }; - - return A::ninny2(); -} - -int darg (char X::*p) -{ - undef3 (1); // ERROR - implicit declaration -} // ERROR - non-void diff --git a/gcc/testsuite/g++.old-deja/g++.jason/return.C b/gcc/testsuite/g++.old-deja/g++.jason/return.C deleted file mode 100644 index c737a3ea8bd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/return.C +++ /dev/null @@ -1,21 +0,0 @@ -// PRMS Id: 5331 -// Bug: the return value of foo is constructed in a temporary and then -// copied into the return slot. This is not necessary. - -int c = 0; - -struct X { - X(int i) { } - X(X const &XX) { c = 1; } - ~X() { } -}; - -const X foo() { - return X(3); -}; - -int main() -{ - foo(); - return c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/return2.C b/gcc/testsuite/g++.old-deja/g++.jason/return2.C deleted file mode 100644 index 272390903e8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/return2.C +++ /dev/null @@ -1,23 +0,0 @@ -// PRMS Id: 5368 -// Bug: the X temporary in foo() is not destroyed. - -int c = 0; - -struct X { - X (int) { c++; } - ~X() { c--; } -}; - -struct Y { - Y(const X &) { } -}; - -Y foo() { - return X(3); -}; - -int main() -{ - foo(); - return c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/return3.C b/gcc/testsuite/g++.old-deja/g++.jason/return3.C deleted file mode 100644 index ac52bc3e463..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/return3.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS id: 10912 - -struct A { - A() { i=10; }; - int i; -}; -struct B : public A {}; -B b; - -A f() -{ - return b; -} - -int main () -{ - A a = f (); - return a.i != 10; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg1.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg1.C deleted file mode 100644 index a9b581f2751..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Bug: g++ parses the declaration of i as a functional cast. -// Build don't link: - -void take_int (int arg) { } - -void -test () -{ - int (i); - - i = 0; - take_int (i); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C deleted file mode 100644 index 8e7d2d1349d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C +++ /dev/null @@ -1,9 +0,0 @@ -// Bug: g++ doesn't notice the overflow in the enum values. - -#include <limits.h> - -enum COLOR -{ - red, - green = ULONG_MAX, blue -}; // ERROR - enum overflow diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg11.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg11.C deleted file mode 100644 index 2b3e4cc02d0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg11.C +++ /dev/null @@ -1 +0,0 @@ -typedef int int; /* ERROR - trying to redefine int */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg12.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg12.C deleted file mode 100644 index e33404dfc1b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg12.C +++ /dev/null @@ -1 +0,0 @@ -int array[3] = { 1, 2, 3, 4 }; /* ERROR - excess initializer elements */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg13.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg13.C deleted file mode 100644 index 77560b33865..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg13.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ does overloading on a function-by-function basis. - -void -f () -{ - void (*fp)(void); - { - extern void g (); - } - fp = g; /* ERROR - no 'g' in scope */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C deleted file mode 100644 index 8475ecd6c81..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C +++ /dev/null @@ -1,15 +0,0 @@ -void *vp; -int (*ap)[]; -struct S *sp; -union U *up; -int (*fp)(); - -void -test () -{ - vp++; /* ERROR - incrementing void * */ - ap++; /* ERROR - incrementing ptr to incomplete type */ - sp++; /* ERROR - incrementing ptr to incomplete type */ - up++; /* ERROR - incrementing ptr to incomplete type */ - fp++; /* ERROR - incrementing ptr to function */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg16.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg16.C deleted file mode 100644 index 75d87a5f0f2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg16.C +++ /dev/null @@ -1,5 +0,0 @@ -// Bug: g++ doesn't push parameter decls as they are parsed. -// Build don't link: - -void (*ptr) (int foo, int array[sizeof(foo)]); // gets bogus error XFAIL *-*-* -void test2 (int bar, int array[sizeof(bar)]) { } // gets bogus error XFAIL *-*-* diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg17.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg17.C deleted file mode 100644 index 8291650b7d6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg17.C +++ /dev/null @@ -1,15 +0,0 @@ -// The default assignment operator for B uses array assignment, so we can't -// just disallow it... - -struct A { A& operator=(const A&); }; -struct B { A f[20]; }; - -int a1[20], a2[20]; -B b1, b2; - -void -test () -{ - b1 = b2; /* OK */ - a1 = a2; /* ERROR - array assignment */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg18.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg18.C deleted file mode 100644 index 53c3dd1628f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg18.C +++ /dev/null @@ -1,11 +0,0 @@ -// Any expression may be explicitly converted to type void. -// Build don't link: - -struct S { int m[10]; } object; -struct S f () { return object; } - -void -test () -{ - (void) f().m; /* OK - cast to void; see constraints in 3.8.1 */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg2.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg2.C deleted file mode 100644 index 9c30c3640a8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg2.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: g++ complains about a class definition containing a const member -// but no constructor; it shouldn't complain at that point, since this is -// valid use. -// Build don't link: - -struct S { const int member; } object = { 0 }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg20.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg20.C deleted file mode 100644 index 33b4858b758..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg20.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -typedef void func_type (); -func_type *fp; -void *vp; - -void example () -{ - vp != fp; // gets bogus error - nuttin' wrong wit dat -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg21.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg21.C deleted file mode 100644 index d6389bebfa7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg21.C +++ /dev/null @@ -1 +0,0 @@ -char array0[4] = "abcde"; /* ERROR - initializer too long */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg22.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg22.C deleted file mode 100644 index 7be8ba03fc0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg22.C +++ /dev/null @@ -1,6 +0,0 @@ -static void f (); // ERROR - used but not defined - -void g () -{ - f (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg23.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg23.C deleted file mode 100644 index 73bcfc0f0e6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg23.C +++ /dev/null @@ -1,2 +0,0 @@ - signed char *ptr2 = "hello"; /* ERROR - changing sign */ -unsigned char *ptr3 = "hello"; /* ERROR - changing sign */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg24.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg24.C deleted file mode 100644 index e5987a149c1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg24.C +++ /dev/null @@ -1,8 +0,0 @@ -typedef int Int; - -Int Int_object_1; - -void test () -{ - ((Int) Int_object_1) = Int_object_1; /* ERROR - not an lvalue*/ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg25.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg25.C deleted file mode 100644 index deb319d7057..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg25.C +++ /dev/null @@ -1 +0,0 @@ -struct { int :0; }; /* ERROR - anon struct not used to declare objects */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg26.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg26.C deleted file mode 100644 index 1ad204e8ad4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg26.C +++ /dev/null @@ -1,9 +0,0 @@ -typedef void (FTYPE) (); - -FTYPE f; /* ok */ - -void -test_0 () -{ - (FTYPE) f; /* ERROR - casting to function type */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C deleted file mode 100644 index 8fb85e80f52..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg27.C +++ /dev/null @@ -1,4 +0,0 @@ -short volatile short var_0_2; /* ERROR - duplicate short */ -long volatile long var_0_3; /* ERROR - duplicate long */ -signed volatile signed var_0_7; /* ERROR - duplicate signed */ -unsigned volatile unsigned var_0_8; /* ERROR - duplicate unsigned */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg28.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg28.C deleted file mode 100644 index 246c7e69b31..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg28.C +++ /dev/null @@ -1,9 +0,0 @@ -/* From 01/25/94 working paper (7.1.3): - - If, in a decl-specifier-seq containing the decl-specifier typedef, - there is no type-specifier, or the only type-specifiers are cv- - qualifiers, the typedef declaration is ill-formed. -*/ - -typedef foo; // ERROR - invalid typedef -typedef const bar; // ERROR - invalid typedef diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg3.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg3.C deleted file mode 100644 index fc254511cfe..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg3.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ remembers the members of OUTER and complains about the second -// definition. -// Build don't link: - -void -test () -{ - { - struct OUTER { struct INNER { int mbr; } member; }; - } - - { - struct OUTER { struct INNER { int mbr; } member; }; - } -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C deleted file mode 100644 index 978b3634aab..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: f1 and f2 are treated as overloaded when they aren't. -// Build don't link: - -int i; -void f1(double) { } -void f2(double) { } - -void -test () -{ - i ? f1 : f2; // gets bogus error - improper overloading -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg5.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg5.C deleted file mode 100644 index 700fae36294..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: func is treated as an overloaded function when it isn't. -// Build don't link: - -int *func () { return 0; } - -void -test () -{ - *func; // gets bogus error - improper overloading -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg6.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg6.C deleted file mode 100644 index 0f3c9c3823c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg6.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: - -wchar_t *single = L"xyz" ; -wchar_t *(array[]) = { L"xyz" }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg7.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg7.C deleted file mode 100644 index 8f3835fffcc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg7.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: fixincludes and/or cpp mangle the definition of wchar_t so that this -// doesn't work. -// Build don't link: - -#include <stdlib.h> -wchar_t array[] = L"xxx"; // gets bogus error - wchar_t diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg8.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg8.C deleted file mode 100644 index 401d05de590..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg8.C +++ /dev/null @@ -1,4 +0,0 @@ -// Bug: g++ is wrongfully pedantic about union initializers. -// Build don't link: - -union U { int mbr; } array[1] = { 0 }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg9.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg9.C deleted file mode 100644 index abf6335fa97..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rfg9.C +++ /dev/null @@ -1,9 +0,0 @@ -int cond; -int i; -int *ip; - -void -test () -{ - cond ? i : ip; /* ERROR - pointer/integer mismatch */ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rvalue1.C b/gcc/testsuite/g++.old-deja/g++.jason/rvalue1.C deleted file mode 100644 index 01cd497b1c0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rvalue1.C +++ /dev/null @@ -1,51 +0,0 @@ -// PRMS Id: 6000 -// Bug: g++ gets confused trying to build up a reference to a cast. - -class String { -protected: - char *cp; -public: - String(char *incp); - String(const String &constStringRef); - virtual void virtualFn1(void) const {;} -}; - -String::String(char *incp) -{ - cp = incp; -} - -String::String(const String &constStringRef) -{ -// Right here, do an 'info args', and look at the virtual function table -// pointer: typically junk! Calling the function through that table could -// do anything, since we're really leaping off into the void. This example -// goes down with 'SIGBUS', but I've seen 'SIGSEGV' too, and 'SIGILL' is -// possible. - - cp = constStringRef.cp; - constStringRef.virtualFn1(); -} - -void foofun(String string) -{ - ; -} - -class Class1 { -public: - Class1(const String & constStringRef); -}; - -Class1 :: Class1 (const String & constStringRef) -{ -// If instead of calling the function 'foofun()' here, we just assign -// 'constStringRef' to a local variable, then the vptr is typically == 0! - - foofun(String(constStringRef)); -} - -int main(void) -{ - Class1 *class1 = new Class1("Hi!"); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C b/gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C deleted file mode 100644 index 71f59bc68b3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C +++ /dev/null @@ -1,17 +0,0 @@ -// Test for undesired aliasing. - -struct A { - const A * get_this () const { return this; } -}; - -int main () -{ - A a; - int r = 0; - const A& ar1 = (A)a; - if (&ar1 == &a) - r |= 1; - if (A(a).get_this () == &a) - r |= 2; - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rvalue3.C b/gcc/testsuite/g++.old-deja/g++.jason/rvalue3.C deleted file mode 100644 index 4e18cfbadaf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/rvalue3.C +++ /dev/null @@ -1,5 +0,0 @@ -int main () -{ - int i; - int &ir = (int&)(int)i; // ERROR - casting rvalue to reference type -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping.C deleted file mode 100644 index 49715be0a9a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 3977 -// Bug: A member function is not hidden properly by a later use of its name. -// Build don't link: - -struct A { - void index (); -}; - -struct B: A { - int index; - B(): index(4) {} -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C deleted file mode 100644 index 9119951978c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C +++ /dev/null @@ -1,14 +0,0 @@ -// Test for scope-based hiding of functions. - -void f (char *); -struct A { - void f (); // ERROR - referred to -}; -struct B : public A { - void g (char *); - void h () { - extern void g (); // ERROR - - f("foo"); // ERROR - hidden - g("foo"); // ERROR - hidden - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping11.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping11.C deleted file mode 100644 index 870b9d5b566..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping11.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -void f (); -void g () -{ - int f; - { - void f (); - f (); // gets bogus error - trying to call integer - } -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C deleted file mode 100644 index 96e4ab73033..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -void f () -{ - struct A { - friend void g (); - }; -} -void h () { - g (); // ERROR - no g in scope -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping13.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping13.C deleted file mode 100644 index 2fd1707627b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping13.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -struct A { typedef int foo; }; -struct B: public A { - typedef int bar; - struct C { - void g (B::bar); // gets bogus error - nested type failure - void f (B::foo); - }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping14.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping14.C deleted file mode 100644 index d8c19388151..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping14.C +++ /dev/null @@ -1,8 +0,0 @@ -// [class.scope0]: The scope of a name declared in a class consists -// ... also of all ... default arguments ... in that class .... -// Build don't link: - -struct A { - void f (int A::* = &A::i); - int i; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C deleted file mode 100644 index bfebf240984..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: g++ ignores the :: qualification and dies trying to treat an integer -// variable as a list of functions. -// Build don't link: - -class DComplex { -public: - friend double imag(const DComplex& a); -}; - -class FComplex { -public: - friend float imag(const FComplex& a); -}; - -void -scnrm2(FComplex cx[]) -{ - int imag; - ::imag( cx[0] ); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping16.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping16.C deleted file mode 100644 index d88501e67a4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping16.C +++ /dev/null @@ -1,4 +0,0 @@ -struct A { - int a(); // ERROR - - int a; // ERROR - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping17.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping17.C deleted file mode 100644 index 26fb45656da..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping17.C +++ /dev/null @@ -1,8 +0,0 @@ -// Test that the integer hides the struct in block scope. - -int main () -{ - int A; - struct A { }; - A = 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping2.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping2.C deleted file mode 100644 index 68c8c754a80..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: A function is not hidden properly by a use of its name in an -// inner scope. -// Build don't link: - -struct A -{ - struct B - { - int f; - B() : f(0) {}; - void g() { f = 0; }; - }; - void f(); - void f(int); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping3.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping3.C deleted file mode 100644 index 578de7a7e8e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping3.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: g++ does not grok nested types very well. -// Build don't link: - -class A { - class B; - friend class B; - class B { }; // gets bogus error - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping4.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping4.C deleted file mode 100644 index 94a49bfc77a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping4.C +++ /dev/null @@ -1,30 +0,0 @@ -// PRMS Id: 4375 -// Bug: g++ fails to keep track of nested typedefs properly. -// Build don't link: - -class A { -public: - typedef char * Ptr; - Ptr s; - Ptr get_string(); - A(Ptr string); // { s = string; }; -}; - -class B { -public: - typedef A * Ptr; - Ptr a; - Ptr get_A(); - B(Ptr a_ptr); -}; - -A::A(Ptr string) { // gets bogus error - - s = string; // gets bogus error - -} - -int main() { - A a("testing"); - A *a_ptr; - B b(&a); - a_ptr = b.get_A(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping5.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping5.C deleted file mode 100644 index 4572da7652a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping5.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: g++ thinks that A defines operator delete, and tries to call it. -// Build don't link: - -struct A { - ~A () { ::operator delete (0); } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping6.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping6.C deleted file mode 100644 index 161cc4762f7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping6.C +++ /dev/null @@ -1,27 +0,0 @@ -// Testcase for all uses of explicit global scope. -// Build don't link: - -int a, B; - -struct A { }; -int operator+(A&, int); - -struct B { - struct C { - static int a; - static int f () { A a; return ::operator+ (a, ::a); } // gets bogus error - }; -}; - -int B::C::a = 0; - -struct D : public ::B::C { }; // gets bogus error - -void f () -{ - int B; - ::B::C b; - - B = ::B::C::a; // gets bogus error - B = ::B::C::f(); // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C deleted file mode 100644 index 6ffa907f62a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C +++ /dev/null @@ -1,6 +0,0 @@ -// Bug: g++ doesn't flag name collisions between types and non-types as -// errors. It shouldn't for class names, but it should for typedefs. -// Build don't link: - -int bar; // ERROR - -typedef int bar; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping8.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping8.C deleted file mode 100644 index de023d1c3e1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping8.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ allows two different meanings of a name in the same scope. - -typedef int foo; // ERROR - -struct A { - A (foo); - int foo (); // ERROR - foo already used in scope -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping9.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping9.C deleted file mode 100644 index 3d8a1555ff2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping9.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: g++ silently mangles the second 'B' to 'A::B', so the definition is -// lost. -// Build don't link: - -struct A { - enum B { }; -}; - -struct C: public A { - enum B { }; - void foo (C::B); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/shadow1.C b/gcc/testsuite/g++.old-deja/g++.jason/shadow1.C deleted file mode 100644 index 59ffcbd15c3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/shadow1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Special g++ Options: -Wshadow -// Build don't link: - -class x { -public: - void fun(); -private: - int foo; -}; - -void x::fun() { }; - -main () -{ - float foo; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/soverload.C b/gcc/testsuite/g++.old-deja/g++.jason/soverload.C deleted file mode 100644 index 793e37f33c1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/soverload.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: dfs_pushdecls doesn't create an overload list for member functions, -// like it claims to. -// Build don't link: - -struct A -{ - static int foo (int); - static int foo (int, int); - void bar () { foo (1, 2); } // gets bogus error - broken overloading -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/special.C b/gcc/testsuite/g++.old-deja/g++.jason/special.C deleted file mode 100644 index 9f6202ecf44..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/special.C +++ /dev/null @@ -1,6 +0,0 @@ -// Make sure that forward declarations of specializations work... - -template <class T> class A { }; -class A<int>; -A<int> a; // ERROR - incomplete type -class A<int> { }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/static1.C b/gcc/testsuite/g++.old-deja/g++.jason/static1.C deleted file mode 100644 index 8c5bdff359b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/static1.C +++ /dev/null @@ -1,31 +0,0 @@ -// PRMS id: 6863 - -extern "C" int printf(const char *, ...); -extern "C" void abort(); - -enum ENUM {E1=0, E2 }; -int d; - -class AAA{ -public: - AAA() {a = new char[10];printf("constructor AAA() called\n");} - AAA(int) {printf("constructor AAA(int) called\n");} - ~AAA(){ printf("destructor ~AAA() called\n"); d = 1; } - operator int () { return 1;} - char *a; - int i; -}; - -struct sentinel { - ~sentinel () { if (d == 0) abort (); } -} s; - -/* forward decl here causes gcc not to execute ct and dt for arr1 */ -extern AAA arr1[]; - -AAA arr1[] = {(int)E1 }; - -int main() -{ - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth.C b/gcc/testsuite/g++.old-deja/g++.jason/synth.C deleted file mode 100644 index 733243cf363..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth.C +++ /dev/null @@ -1,13 +0,0 @@ -// Bug: the synthesized copy constructor for A is not found. -// Build don't link: - -struct A { - // A (const A& a): i(a.i) {} - int i; -}; - -struct B { - A a; - B (const B& b): a(b.a), j(b.j) { } // gets bogus error - - int j; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth10.C b/gcc/testsuite/g++.old-deja/g++.jason/synth10.C deleted file mode 100644 index d94e6bdebe9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth10.C +++ /dev/null @@ -1,52 +0,0 @@ -// Special g++ Options: -O -// Build don't link: -// Bug: Synthesizing methods for the nested class screwed up current_class_decl -// for the outer class. - -class A; -class AH -{ - public: - inline AH ( A * p = 0 ); - AH ( const AH & from ) - : pointer( from.pointer ) { inc(); } - ~ AH () { dec(); } - private: - A * pointer; - inline void inc() const; - inline void dec() const; -}; - -class A -{ - protected: - struct AttrTable - { - struct Row - { - }; - }; - - public: - - class Attributes - { - public: - class iterator - { - public: - iterator() : mo(0), attr(0) {} - iterator& operator++() { ++attr; return *this; } - iterator operator++(int) - { iterator tmp = *this; ++*this; return tmp; } - - private: - AH mo; - const AttrTable::Row* attr; - }; - - Attributes(AH mo) - : mo(mo) {} - AH mo; - }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth2.C b/gcc/testsuite/g++.old-deja/g++.jason/synth2.C deleted file mode 100644 index 3094b8e55cb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth2.C +++ /dev/null @@ -1,8 +0,0 @@ -// PRMS Id: 4623 -// Bug: g++ tries and fails to synthesize a copy constructor for D. -// Build don't link: - -class A { }; -class B: public virtual A { }; -class C: public A { }; -class D: public B, public C { }; // gets bogus error - bad synthesis diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth3.C b/gcc/testsuite/g++.old-deja/g++.jason/synth3.C deleted file mode 100644 index 26af8aed3b9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth3.C +++ /dev/null @@ -1,6 +0,0 @@ -// Testcase for wrongful generation of copy constructor. -// Build don't link: - -class A { }; -class B: virtual private A { }; -class D: public B { }; // gets bogus error diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth4.C b/gcc/testsuite/g++.old-deja/g++.jason/synth4.C deleted file mode 100644 index 89ecf2dc074..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth4.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -struct X { - X(); -}; -typedef void (X::*mfp)(); -struct Y { - Y(); - mfp memfp; -}; -void f() -{ - Y *y1, *y2 ; - *y1 = *y2; // gets bogus error - failed to synthesize op= -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth5.C b/gcc/testsuite/g++.old-deja/g++.jason/synth5.C deleted file mode 100644 index 2905da72639..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth5.C +++ /dev/null @@ -1,14 +0,0 @@ -// Bug: generated B::operator= tries to call A::operator= - -#pragma implementation -#line 1 "synth5.h" -#pragma interface - -struct A { - virtual A& operator= (const A&) = 0; -}; - -struct B: public A { -}; -#line 5 "synth5.C" -int main() { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth6.C b/gcc/testsuite/g++.old-deja/g++.jason/synth6.C deleted file mode 100644 index f3a95db44f7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: g++ tries to generate an op= for DbmItem and fails. -// Build don't link: - -class RefCount{ -public: - RefCount(); - -private: - RefCount& operator=(const RefCount); -}; - -class DbmItem: public RefCount{ -public: - DbmItem(): RefCount() {}; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth7.C b/gcc/testsuite/g++.old-deja/g++.jason/synth7.C deleted file mode 100644 index 05953779880..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth7.C +++ /dev/null @@ -1,11 +0,0 @@ -// Testcase to make sure that synthesized methods are found when needed. - -struct B { ~B() { } }; -struct A { B b; }; - -int main() -{ - A a, b (a), c = A(); - A& (A::*afp)(const A&) = &A::operator=; - (a.*afp) (b); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth8.C b/gcc/testsuite/g++.old-deja/g++.jason/synth8.C deleted file mode 100644 index f7e82a9e8a7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth8.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: the synthesized constructor for A tries to use the mem-initializer -// list for the B constructor. -// Build don't link: - -struct A -{ - virtual ~A(); -}; - -struct B -{ - B(); - char* x; - A* a; -}; - -B::B() -: x(0), a(new A()) -{ -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/synth9.C b/gcc/testsuite/g++.old-deja/g++.jason/synth9.C deleted file mode 100644 index 6886feb6e21..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/synth9.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 6837 -// Bug: anonymous union confuses g++. -// Build don't link: - -struct my_key { - my_key(const my_key&); - my_key(const char* n); -}; - -struct my_node { - my_node(my_key&); - union { - long cnt; - my_node* next; - }; - my_key a; -}; - -extern my_node n; -my_node a(n); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempargs.C b/gcc/testsuite/g++.old-deja/g++.jason/tempargs.C deleted file mode 100644 index 749e02cbd19..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempargs.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed templates overloading -template<class T> class Vector { }; -template<class T> struct Sort { static void sort (Vector<typename T::foo> &); }; -template<class T> void Sort<T>::sort (Vector<typename T::foo> &) { } -struct whee { typedef int foo; }; - -void f (Vector<int> &vi) { Sort<whee>::sort (vi); } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C b/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C deleted file mode 100644 index 77cc732090e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: member initializers are allowed where they shouldn't be. -// Build don't link: - -template <class T> -struct A { - int i; - Blarg () : i(0) { } // ERROR - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempdest.C b/gcc/testsuite/g++.old-deja/g++.jason/tempdest.C deleted file mode 100644 index 04fae56a740..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempdest.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed templates destructors -// Example of PR 3308 workaround - -template <class T> -class A -{ - T q; -public: - ~A() { (&q)->T::~T(); } -}; - -typedef unsigned int ui; - -int main() -{ - A<ui> *ap = new A<ui>; - - delete ap; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C b/gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C deleted file mode 100644 index 0a8a6cc378c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Bug: g++ fails to instantiate operator<<. -// Build don't run: -// Special g++ Options: -g - -struct ostream { - ostream& operator<< (const char *) { return *this; }; -}; - -template <class T> class foo; - -template <class T> ostream& operator<< (ostream& ios, foo<T>&obj) { }; - -template <class T> class foo { - friend ostream& operator<<<>(ostream&, foo<T>&); -}; - -int main() -{ - ostream cout; - foo<int> foo_obj; - cout << foo_obj; // causes linker error - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template1.C b/gcc/testsuite/g++.old-deja/g++.jason/template1.C deleted file mode 100644 index f3aa571483e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template1.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 4688 -// Bug: g++ can't deal with templates instantiated within extern "C". -// Build don't link: - -class Gnaf { -public: - virtual int invariant (); -}; - -template <class T> class Array : public Gnaf { -public: - virtual int invariant(); -}; - -extern "C" -int foo() -{ - Array<int> toConv; - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template10.C b/gcc/testsuite/g++.old-deja/g++.jason/template10.C deleted file mode 100644 index 18a574a28eb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template10.C +++ /dev/null @@ -1,26 +0,0 @@ -// Bug: member operator shadows global template in tsubst. -// Build don't link: - -class ostream; - -template <class TP> class smanip { -public: - friend ostream& operator<< <>(ostream &o, const smanip<TP>&m); -}; - -template<class TP> -ostream& operator<<(ostream& o, const smanip<TP>& m) -{ return o;} - -class X -{ -public: - X operator<<(int); // commenting out this line makes it work! - void print(ostream& os); -}; - -void X::print(ostream& os) -{ - smanip<double> smd; - os << smd; // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template11.C b/gcc/testsuite/g++.old-deja/g++.jason/template11.C deleted file mode 100644 index d58bdfe9e03..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template11.C +++ /dev/null @@ -1,14 +0,0 @@ -// Bug: initializers for static data members of templates don't get run. - -template <class T> struct A { - static T t; -}; - -int foo () { return 1; } - -int A<int>::t = foo (); - -int main () -{ - return (A<int>::t != 1); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template12.C b/gcc/testsuite/g++.old-deja/g++.jason/template12.C deleted file mode 100644 index 93c19b63571..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template12.C +++ /dev/null @@ -1,14 +0,0 @@ -// Testcase for 'this is a type' syntax. -// Build don't link: - -struct B { - typedef int A; -}; - -template <class T> struct Y { - void f() { - typename T::A *d; - } -}; - -template class Y<B>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template13.C b/gcc/testsuite/g++.old-deja/g++.jason/template13.C deleted file mode 100644 index fbd16a9995e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template13.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: g++ fails to actually instantiate templates to the specifications of -// guiding decls. -// Special g++ Options: -g -ansi -pedantic-errors -fguiding-decls - -template <class T> inline T min (T a, T b) { return a<b?a:b; } -double min (double, double); - -int main () { - return (int) min (0, 1.0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template14.C b/gcc/testsuite/g++.old-deja/g++.jason/template14.C deleted file mode 100644 index ecd99bc5eaa..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template14.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 4745 -// Bug: g++ gets the constructor and destructor confused because the default -// parm prevents the two constructor types from satisfying ==. - -template <class T> struct A { - A(int = 1); - ~A(); -}; - -template <class T> A<T>::A(int) { } // causes compiler abort -template <class T> A<T>::~A() { } - -int main() -{ - A<int> a; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template15.C b/gcc/testsuite/g++.old-deja/g++.jason/template15.C deleted file mode 100644 index 9779ca024b1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template15.C +++ /dev/null @@ -1,27 +0,0 @@ -// PRMS Id: 2139 -// Bug: g++ tries to instantiate the template with types on the function -// obstack and fails. - -template<class T> -class X { -public: - X(int) { } - - T x; -}; - -class A { }; - -int main() -{ - int i; - X<int> xi(i); - X<double> xd(i); - - X<int (*)(int, void *)> fp0(i); - X<int (*)(int, char, double)> fp1(i); - X<int (*)(int, double**, void *)> fp2(i); - - X<int (A::*)()> mp0 (i); - X<int A::*> mp1 (i); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template16.C b/gcc/testsuite/g++.old-deja/g++.jason/template16.C deleted file mode 100644 index 3241f981f35..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template16.C +++ /dev/null @@ -1,33 +0,0 @@ -// PRMS Id: 1502 -// Bug: g++ fails to resolve 'gnc' in the call to 'grid'. - -template<class T> class foo { -public: - foo() { } -}; - -template<class T> class bar : public foo<T> { -public: - bar() : foo<T>() {} -}; - -template<class T> class ben : public foo<T> { -public: - ben() : foo<T>() {} - void grid(T (*f)(bar<T>&),bar<T>& x,bar<T>& y,bar<T>& param); -}; - -template<class T> void ben<T>::grid(T (*f)(bar<T>&),bar<T>& x,bar<T>& y,bar<T>& param) { } - -template<class T> T gnc(bar<T>& a) -{ - return 0; -} - -int main() -{ - ben<double> a; - bar<double> x,y,p; - a.grid(gnc,x,y,p); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template17.C b/gcc/testsuite/g++.old-deja/g++.jason/template17.C deleted file mode 100644 index 27e4d047ccd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template17.C +++ /dev/null @@ -1,11 +0,0 @@ -// Caught by Booch Components. -// Bug: g++ tries to instantiate nested enums. -// Build don't link: - -template <class T> struct A -{ - struct B { }; - enum C { c }; -}; - -template struct A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template18.C b/gcc/testsuite/g++.old-deja/g++.jason/template18.C deleted file mode 100644 index 38224bfd5ee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template18.C +++ /dev/null @@ -1,18 +0,0 @@ -// GROUPS passed templates -// Bug: g++ emits template instances when it shouldn't. -// Special g++ Options: -g -Wno-deprecated -fexternal-templates - -// We mark this XFAIL because we can't test for expected linker errors. -// If we get an XPASS for this testcase, that's a bug. -// (OK) excess errors test - XFAIL *-*-* - -#pragma implementation "irrelevant_file" -#line 1 "template18.h" -#pragma interface -template <class T> inline T min (T a, T b) { return a<b?a:b; } -#line 13 "template18.C" - -main() -{ - min (1, 1); // should produce an undefined symbol error. -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template19.C b/gcc/testsuite/g++.old-deja/g++.jason/template19.C deleted file mode 100644 index 68ea9a9fbf7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template19.C +++ /dev/null @@ -1,9 +0,0 @@ -// Make sure type deduction isn't confused by top-level cv-quals. -template <class T> T max (const T a, const T b) { return a>b?a:b; } - -int main() -{ - int a = 0, b = 1; - int c = max (a, b); - int d = max ((const int)a, (const int)b); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template2.C b/gcc/testsuite/g++.old-deja/g++.jason/template2.C deleted file mode 100644 index d3950e9b2b9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: instantiation of member templates breaks. -// Build don't link: - -template <class T> struct A { - static void f (); - void g (); -}; - -template <class T> void A<T>::f () { } -template <class T> void A<T>::g () { } - -A<int> a; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template20.C b/gcc/testsuite/g++.old-deja/g++.jason/template20.C deleted file mode 100644 index ee4daa0b826..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template20.C +++ /dev/null @@ -1,9 +0,0 @@ -// Make sure type deduction works for both types of array parameters. -template <class T> void f (T (&a)[2]) { } -template <class T> void g (T a[2]) { } -int main() -{ - int a[2] = { 0, 0 }; - f (a); - g (a); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template21.C b/gcc/testsuite/g++.old-deja/g++.jason/template21.C deleted file mode 100644 index 817d1da8828..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template21.C +++ /dev/null @@ -1,16 +0,0 @@ -// Gosh, this works! -// Build don't link: - -template<class T> -struct A -{ - struct B - { - void bar(); - }; - struct C { }; -}; - -template<class T> void A<T>::B::bar() { } - -template class A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template22.C b/gcc/testsuite/g++.old-deja/g++.jason/template22.C deleted file mode 100644 index ce247e80752..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template22.C +++ /dev/null @@ -1,31 +0,0 @@ -// Testcase for proper unification of code involving references. -// Build don't link: - -template<class T> -struct A -{ - void foo(); -}; - -template<class T> void A<T>::foo() { } - -template class A<int&>; - -const int& f1 (); -int& f2 (); -int f3 (); - -template <class T> void g1 (const T&); -template <class T> void g2 (T&); -template <class T> void g3 (T); - -int main() -{ - g1 (f1 ()); - g1 (f2 ()); - g1 (f3 ()); - g2 (f2 ()); - g3 (f1 ()); - g3 (f2 ()); - g3 (f3 ()); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template23.C b/gcc/testsuite/g++.old-deja/g++.jason/template23.C deleted file mode 100644 index 1d257a2e7df..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template23.C +++ /dev/null @@ -1,12 +0,0 @@ -// Testcase for instantiation with cv-qualified type -// Build don't link: - -template<class T> -struct A -{ - void foo(); -}; - -template<class T> void A<T>::foo() { } - -template class A<const int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template24.C b/gcc/testsuite/g++.old-deja/g++.jason/template24.C deleted file mode 100644 index 120b717eddd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template24.C +++ /dev/null @@ -1,21 +0,0 @@ -// Bug: g++ doesn't find the conversion from ostream_withassign to ostream. - -#include <iostream.h> - -template <class T> -struct A { - T t; -}; - -template <class T> -ostream & operator<< (ostream & os, A<T> & a) -{ - os << a.t; - return os; -} - -int main () -{ - A<int> a = { 1 }; - cout << a << endl; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template25.C b/gcc/testsuite/g++.old-deja/g++.jason/template25.C deleted file mode 100644 index 9704412263e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template25.C +++ /dev/null @@ -1,48 +0,0 @@ -// PRMS Id: 6393 -// Bug: g++ is too lax in considering UPTs to be the same. - -template <class R, class T> -class Bar -{ -public: - R do_bar (T arg); -}; - - -template <class T> -class Foo -{ - T i; - -public: - void do_foo () {} - void do_foo (T const & t) {} - void do_foo (Bar<char, T> const & bar); // {} Put the body here and it works - void do_foo (Bar<T, T> const & bar); // {} Put the body here and it works -}; - -// These definitions don't work - -template <class T> -inline void Foo<T>:: -do_foo (Bar<char, T> const & bar) -{} - -template <class T> -inline void Foo<T>:: -do_foo (Bar<T, T> const & bar) -{} - - -int main () -{ int i; - Bar<char, int> bar1; - Bar<int, int> bar2; - Foo<int> foo; - foo.do_foo(); - foo.do_foo(i); - foo.do_foo(bar1); - foo.do_foo(bar2); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template26.C b/gcc/testsuite/g++.old-deja/g++.jason/template26.C deleted file mode 100644 index fcd598dda84..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template26.C +++ /dev/null @@ -1,114 +0,0 @@ -// PRMS Id: 6275 -// Bug: unification fails for call to find_parameter_in_stack. - -#include <stdio.h> -#include <stdlib.h> - -const int max_stack_size = 20; - -template <class T> -class Stack { - private: - T objects[max_stack_size]; - int nobjects; - public: - Stack(): nobjects(0) {} - void push(const T&a) { - if (nobjects >= max_stack_size) { - fprintf(stderr,"Stack: overflow\n"); - abort(); - } - objects[nobjects++] = a; - } - T pop() { - if (!nobjects) { - fprintf(stderr,"Stack: underflow\n"); - abort(); - } - nobjects -= 1; - T result = objects[nobjects]; - return result; - } - T top() const { - if (!nobjects) { - fprintf(stderr,"Stack: underflow\n"); - abort(); - } - return objects[nobjects - 1]; - } - int n() const { return nobjects; } - T operator[](int i) { return objects[i]; } -}; - -template <class T> -class Parameter { - T parameter_; - int is_set_; - int overrides_; - public: - Parameter(): is_set_(0), overrides_(0) {} - void set(const T& a) { parameter_ = a; is_set_ = 1; } - void override(int overrides = 1) { overrides_ = overrides; } - const T& value() const { return parameter_; } - int overrides() const { return overrides_; } - int is_set() const { return is_set_; } -}; - -template <class T1, class T2> -T2 -find_parameter_in_stack(Stack<T1>& stack, Parameter<T2>& (T1::*access)()) -{ - T2 result; - int have_result = 0; - for (int i=stack.n()-1; i>=0; i--) { - if ((stack[i].*access)().is_set()) { - if (!have_result || (stack[i].*access)().overrides()) { - result = (stack[i].*access)().value(); - have_result = 1; - } - } - } - return result; -} - -class A { - private: - Parameter<int> a_; - public: - A() { } - Parameter<int>& a() { return a_; } -}; - -int -main(int, char**) -{ - Stack<A> A_stack; - A a1; - A a2; - a1.a().set(1); - a2.a().set(2); - A_stack.push(a1); - A_stack.push(a2); - - int val = find_parameter_in_stack(A_stack, &A::a); - - printf("val = %d\n", val); - if (val != 2) - return 1; - - A_stack.pop(); - A_stack.pop(); - - a1.a().override(); - - A_stack.push(a1); - A_stack.push(a2); - - val = find_parameter_in_stack(A_stack, &A::a); - - printf("val = %d\n", val); - if (val != 1) - return 1; - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template27.C b/gcc/testsuite/g++.old-deja/g++.jason/template27.C deleted file mode 100644 index be90aca8d75..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template27.C +++ /dev/null @@ -1,48 +0,0 @@ -// PRMS Id: 6826 -// Check that unnecessary templates are not instantiated. - -template <class T> -class Test -{ - public: - void doThiss(); - void doThat(); -}; - -template <class T> -void Test<T>::doThiss() -{ - T x; - - x.thiss(); -} - -template <class T> -void Test<T>::doThat() -{ - T x; - - x.that(); -} - -class A -{ - public: - void thiss() {}; -}; - -class B -{ - public: - void that() {}; -}; - -int main() -{ - Test<A> a; - a.doThiss(); // a.doThat() is not well formed, but then - // it's not used so needn't be instantiated. - - Test<B> b; - b.doThat(); // simillarly b.doThiss(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template28.C b/gcc/testsuite/g++.old-deja/g++.jason/template28.C deleted file mode 100644 index c5501d91e61..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template28.C +++ /dev/null @@ -1,33 +0,0 @@ -// PRMS Id: 7179 - -template <class T> -class Car{ -public: - Car(); -} ; - -class Wheels{ -public: - Wheels(); -} ; - -class Shop -{ -public: - Shop(); -private: - Car<Wheels> car ; -} ; - -Wheels::Wheels() {} - -Shop::Shop() {} - -int main() -{ - Shop shop ; - return 0 ; -} - -template <class T> -Car<T>::Car() {} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template29.C b/gcc/testsuite/g++.old-deja/g++.jason/template29.C deleted file mode 100644 index d4212e2e5e7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template29.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS Id: 9500 -// Build don't link: - -template <int S> -class base - { -public: - inline base(); - }; - -template <class T> -class derived : public base<sizeof(T)> - { -public: - inline derived(); - }; - -template <class T> -inline derived<T>::derived() : base<sizeof(T)>(){} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template3.C b/gcc/testsuite/g++.old-deja/g++.jason/template3.C deleted file mode 100644 index 1cd65531757..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template3.C +++ /dev/null @@ -1,14 +0,0 @@ -// PRMS Id: 4679 -// Bug: g++ doesn't re-instantiate templates after definition is seen. - -template <class T> struct A; - -A<int> *a; - -template <class T> struct A { T t; }; - -int main() -{ - if (a) - a->t = 1; // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template30.C b/gcc/testsuite/g++.old-deja/g++.jason/template30.C deleted file mode 100644 index 98bad49a3ee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template30.C +++ /dev/null @@ -1,13 +0,0 @@ -template <class T, class U> -int func(U, T); // ERROR - ref below - -template <class T, class U> -int func(T, U) -{ // ERROR - ref below - return 2; -} - -int main () -{ - func (0, 1); // ERROR - ambiguous -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template31.C b/gcc/testsuite/g++.old-deja/g++.jason/template31.C deleted file mode 100644 index 1148e278da2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template31.C +++ /dev/null @@ -1,40 +0,0 @@ -// PRMS Id: 8569 - -#include <iostream.h> -#include <vector> - -using std::vector; - -class Component { - int george; - char mabel[128]; -}; -class CopyMe { -public: - CopyMe(){;} -private: - vector<Component> strvec; -}; - -class IncludeIt { -public: - IncludeIt() {} - ~IncludeIt() {} - IncludeIt(const IncludeIt& i) { - myStrvec = i.myStrvec; - } - IncludeIt& operator=(const IncludeIt& i) { - myStrvec = i.myStrvec; - } -private: - CopyMe myStrvec; -}; - -int main(int argc, char**argv) { - IncludeIt foo; - IncludeIt* bar; - exit(0); -} - -template class std::__malloc_alloc_template<0>; -template class std::__default_alloc_template<false, 0>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template32.C b/gcc/testsuite/g++.old-deja/g++.jason/template32.C deleted file mode 100644 index d510e93c492..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template32.C +++ /dev/null @@ -1,10 +0,0 @@ -// Bug: Instantiating A<int> screws with class bindings for B -// Build don't link: - -template <class T> struct A { }; -struct B { - typedef int foo; - void f (); -}; - -void B::f () { A<int> a; foo i; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template33.C b/gcc/testsuite/g++.old-deja/g++.jason/template33.C deleted file mode 100644 index 35a63aad3da..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template33.C +++ /dev/null @@ -1,17 +0,0 @@ -// Test nested enums in templates. -// Build don't link: - -template <class T> -class A -{ -public: - enum muni {X, Y}; - - muni e() { return X; }; - muni f(); -}; - -template <class T> -A<T>::muni A<T>::f() { return X; } - -template class A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template34.C b/gcc/testsuite/g++.old-deja/g++.jason/template34.C deleted file mode 100644 index 177286f4abb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template34.C +++ /dev/null @@ -1,24 +0,0 @@ -template<class T> -class Set { - public: - typedef int (*Compare)(const T&, const T&); - static Compare cmp1; - static int (*cmp2)(const T&, const T&); -}; - -template<class T> -int gen_cmp(const T& a, const T& b) { - if (a<b) return -1; - else if (a==b) return 0; - else return 1; -} - -template<class T> -Set<T>::Compare Set<T>::cmp1 = &gen_cmp; - -template<class T> -int (*Set<T>::cmp2)(const T&, const T&) = &gen_cmp; - -int main() { - Set<int> s; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template35.C b/gcc/testsuite/g++.old-deja/g++.jason/template35.C deleted file mode 100644 index be3f808252c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template35.C +++ /dev/null @@ -1,15 +0,0 @@ -// Bug: instantiation of D() corrupts declaration of basis[]. -// Build don't link: - -struct B { }; -template <int t> -struct D : public B -{ - D() : B () { } -}; - -B const * basis[] = -{ - new D<0>, - new D<1>, -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template36.C b/gcc/testsuite/g++.old-deja/g++.jason/template36.C deleted file mode 100644 index 807af75e0d2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template36.C +++ /dev/null @@ -1,51 +0,0 @@ -// Testcase for implicit 'typename' and resolution of 'typename's in the -// current scope. - -class base1 { -public: - int bar() const - { return 1; } -}; - -class base2 { -public: - int bar() const - { return 0; } -}; - -template<class X> -struct base_trait { - typedef base1 base; -}; - -struct base_trait<float> { - typedef base2 base; -}; - -template<class T> -class weird : public base_trait<T>::base { -public: - typedef base_trait<T>::base base; - - base f (); - int base::* g (); - - int zowee() const - { return bar(); } -}; - -template <class T> -weird<T>::base weird<T>::f () -{ - return base(); -} - -template <class T> -int weird<T>::base::* weird<T>::g () -{ return 0; } - -int main() -{ - weird<float> z; - return z.zowee() || z.f().bar(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template37.C b/gcc/testsuite/g++.old-deja/g++.jason/template37.C deleted file mode 100644 index 53607ee7fbe..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template37.C +++ /dev/null @@ -1,36 +0,0 @@ -// PRMS Id: 9930 -// Test of -fexternal-templates hackery in new template code -// Special g++ options: -Wno-deprecated -fexternal-templates - - #pragma implementation "foo.hh" - #pragma interface "foo.hh" - - template<class T> - class ONE - { - public: - static void func(); - }; - - template<class T> - void ONE<T>::func() - { - } - - class ONE<int> - { - public: - static void func(); - }; - - void ONE<int>::func() - { - } - -int main() - { - ONE<char>::func(); - ONE<int>::func(); - - return 0; - } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template38.C b/gcc/testsuite/g++.old-deja/g++.jason/template38.C deleted file mode 100644 index 3870cbc5c14..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template38.C +++ /dev/null @@ -1,18 +0,0 @@ -// Special g++ Options: -fguiding-decls - -struct A { - friend int operator== (const A&, const A&); - A (int) { } -}; - -template <class T> int -operator== (const T&, const T&) -{ - return 0; -} - -main () -{ - A a (1); - return a == 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template39.C b/gcc/testsuite/g++.old-deja/g++.jason/template39.C deleted file mode 100644 index dc76889e4e0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template39.C +++ /dev/null @@ -1,22 +0,0 @@ -// PRMS Id: 10283 -// Build don't link: - -template <class T> struct B { - static void (*p)(); - static void f (); -}; - -template <class T> -void (*B<T>::p)() = &B<T>::f; - -B<int> b; - -template <int i> struct A { - static const int j = i; - int k[j]; -}; - -A<1> a; - -template <int i> -const int A<i>::j; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template4.C b/gcc/testsuite/g++.old-deja/g++.jason/template4.C deleted file mode 100644 index 7fcb45c3f9a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template4.C +++ /dev/null @@ -1,21 +0,0 @@ -// Bug: g++ tries to instantiate ccList twice, and fails. -// Build don't link: - -template<class T> class ccHandle{ }; -template <class T> class ccList; -template <class T> class cc_List { -public: - ccList <T> copy (); -}; - -template <class T> class ccList : public ccHandle < cc_List <T> > { -public: - ccList (int); -}; - -template <class T> -ccList <T> cc_List<T>::copy (){} - -int main (int, char **) { - ccList <int> size1(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template40.C b/gcc/testsuite/g++.old-deja/g++.jason/template40.C deleted file mode 100644 index a8803920a29..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template40.C +++ /dev/null @@ -1,19 +0,0 @@ -// PRMS id: 11315 -// Bug: g++ doesn't recognize the copy ctor for Array<long>. - -template <class Type> -class Array { -public: - Array(int sz=12) - : ia (new Type[sz]), size(sz) {} - ~Array() { delete[] ia;} - Array(const Array<long>& r) : size(0) {} // just for testing -private: - Type *ia; - int size; -}; - -int main(int argc, char *argv[]) -{ - Array<long> ia; // looping occurs on this line -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template41.C b/gcc/testsuite/g++.old-deja/g++.jason/template41.C deleted file mode 100644 index 62d03b67372..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template41.C +++ /dev/null @@ -1,33 +0,0 @@ -// PRMS Id: 11420 -// Bug: Can't handle indirect virtual template base init. - -extern "C" int printf (const char *, ...); - -template<class T> -class Vbase { - public: - Vbase(T i) { printf ("%d\n", i); } -}; - -template<class T> -class D1 : virtual public Vbase<T> { - public: - D1(T i) : Vbase<T>(i) {} -}; - -template<class T> -class D2 : virtual public Vbase<T> { - public: - D2(T i) : Vbase<T>(i) {} -}; - -template<class T> -class Most : public D1<T>, public D2<T> { - public: - Most(T i) : D1<T>(i), D2<T>(i), Vbase<T>(i) {} -}; - -int main () { - Most<int> x(2); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template42.C b/gcc/testsuite/g++.old-deja/g++.jason/template42.C deleted file mode 100644 index 2bd62670f22..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template42.C +++ /dev/null @@ -1,18 +0,0 @@ -// Testcase for not evaluating template default args if they are -// never used. - -struct X { - X(int) { } -}; - -template <class T> -struct A { - void f (T t = T()) { } -}; - -int main () -{ - A<X> a; - X x (1); - a.f (x); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template43.C b/gcc/testsuite/g++.old-deja/g++.jason/template43.C deleted file mode 100644 index d9b3f85fc3a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template43.C +++ /dev/null @@ -1,30 +0,0 @@ -// Test matching of partial specializations. - -template <int* x, int* y> -class EQUAL { -public: - enum { value = 0 }; -}; -template <int* x> -class EQUAL<x,x> { -public: - enum { value = 1 }; -}; - -int x; -int y; - -int equals_x_x = EQUAL<&x,&x>::value; // expected value: 1 -int equals_x_y = EQUAL<&x,&y>::value; // expected value: 0 -int equals_y_x = EQUAL<&y,&x>::value; // expected value: 0 -int equals_y_y = EQUAL<&y,&y>::value; // expected value: 1 - -int main () -{ - if (equals_x_x == 1 - && equals_x_y == 0 - && equals_y_x == 0 - && equals_y_y == 1) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template44.C b/gcc/testsuite/g++.old-deja/g++.jason/template44.C deleted file mode 100644 index 93b47bd23e6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template44.C +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdlib.h> -#include <string.h> - -template <class T> -class List { -public: - int len; - T *array; - - int length() const { return( len ); } - - List() : len( 0 ), array( 0 ) {} -}; - -template <class T> -int AlgoStdCompare(const T* a, const T* b) { - if (*a < *b) - return -1; - else - return (*a > *b); // 0 if equal, 1 if greater -} - -int AlgoStdCompare(const char* const* a, const char * const*b) -{ - return strcmp(*a,*b); -} - -template <class T> -void AlgoFixupSort(List< T >* , int, int ) { -} - -template <class T> -void AlgoSort(int (*compare)(const T *, const T *), - void (*fixup)( List<T> *, int first, int last), - List< T >* theList, int first, int last) { - if (last < 0) - last = theList->length()-1; - - qsort(theList->array+first, last-first+1, sizeof(T), - (int (*)(const void *, const void *))compare); - if (fixup) - fixup(theList, first, last); -} - -template <class T> -void AlgoSort(List< T >* theList, int first = 0, int last = -1) { - int (*compare)(const T*, const T*) = AlgoStdCompare; - void (*fixup)( List<T> *, int first, int last) = AlgoFixupSort; - - AlgoSort(compare, fixup, theList, first, last); -} - -int -main() -{ - List<const char *> slist; - AlgoSort( &slist ); - - List<int> ilist; - AlgoSort( &ilist ); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template5.C b/gcc/testsuite/g++.old-deja/g++.jason/template5.C deleted file mode 100644 index 3c1e4cd04c6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template5.C +++ /dev/null @@ -1,28 +0,0 @@ -// Bug: g++ fails to compare integer constants properly. -// Build don't link: - -template <int X, int Y> -struct Matrix { - int base [X] [Y]; -}; - -template <int M,int H,int N> -Matrix<M,N>& Mul(Matrix<M,N>& Q,Matrix<M,H>& A,Matrix<H,N>& B) { - for(int i=0;i<M;i++) { - for(int j=0;j<N;j++) { - Q.base[i][j]=0; - for(int k=0;k<H;k++) { - Q.base[i][j]+=A.base[i][k]*B.base[k][j]; - } - } - } - return Q; -} - -void f () -{ - Matrix<2, 3> q; - Matrix<2, 4> a; - Matrix<4, 3> b; - q = Mul (q, a, b); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template6.C b/gcc/testsuite/g++.old-deja/g++.jason/template6.C deleted file mode 100644 index c42426a1908..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template6.C +++ /dev/null @@ -1,20 +0,0 @@ -// PRMS Id: 4656 -// Testcase for use of member pointers in template resolution - -template <class T> class A { - public: - A() : a(1) {} - T a; -}; - -template <class T> -int foo (T A<int>::*p) -{ - return 0; -} -int main() -{ - int A<int>::*pm = &A<int>::a; // gets bogus error - failed temp resolution - foo (pm); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template7.C b/gcc/testsuite/g++.old-deja/g++.jason/template7.C deleted file mode 100644 index 87d79a8ab7b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template7.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS Id: 4826 -// Build don't link: - -class A; -template <class T> void f(const T&, const T&); - -void g (const A& a, A& b) { - f (a, b); // gets bogus error - failed unification -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template8.C b/gcc/testsuite/g++.old-deja/g++.jason/template8.C deleted file mode 100644 index 586fb61a02e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template8.C +++ /dev/null @@ -1,10 +0,0 @@ -// PRMS Id: 4827 -// Build don't link: - -class A; -template <class T> int f (const T&, const A *); - -int g (const int& a) -{ - return f (a, (A *)0); // gets bogus error - failed unification -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template9.C b/gcc/testsuite/g++.old-deja/g++.jason/template9.C deleted file mode 100644 index 80fd8c9775b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/template9.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 4864 -// Bug: g++ can't deal with a guiding declaration which comes before the -// template. -// Build don't link: - -void f (const int&, const int&); -template <class T> void f (const T&, const T&) { } - -void g (int a) -{ - f (a,a); // gets bogus error - two identical candidates -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary.C deleted file mode 100644 index 168bfe9103e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary.C +++ /dev/null @@ -1,19 +0,0 @@ -// From: bruno@isoft.com.ar (Bruno R. Depascale) -// Subject: No destructor bug -// Date: Mon, 14 Feb 1994 12:49:45 -0300 (Arg) - -// Bug: temporaries created with constructor notation aren't destroyed. - -int count = 0; - -class A { -public: - A() { ++count; } - ~A() { --count; } -}; - -int main() -{ - A(); - return count; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C deleted file mode 100644 index 36c8e8e5d5b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C +++ /dev/null @@ -1,16 +0,0 @@ -class X // Indentation has been done so to see the similarities. -{ -public: - X() {} // ERROR - referenced below - X(X& x) {x.i=7;} // ERROR - Both functions modify the - void bar(X& x) {x.i=7;} // ERROR - reference parameter x. - int i; -}; - -X foo() { X x; return x; } - -int main() -{ - X x(foo()); // ERROR - Compiler doesn't warn about temporary reference. - x.bar(foo()); // ERROR - The same mistake is warned about in this case. -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C deleted file mode 100644 index 3ffeec79d93..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C +++ /dev/null @@ -1,26 +0,0 @@ -// Bug: the temporary returned from f is elided, causing a to be constructed -// twice but only destroyed once. - -extern "C" int printf (const char *, ...); - -int c,d; - -struct A { - A (int) { c++; } - ~A () { d++; } - A (const A&) { c++; } - int i; -}; - -A f () -{ return 1; } - -int main () -{ - { - A a (1); - a = f (); - } - printf ("%d %d\n", c, d); - return c != d; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary4.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary4.C deleted file mode 100644 index bb7e56f1a75..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary4.C +++ /dev/null @@ -1,31 +0,0 @@ -// Bug: g++ initializes both B::i and B::j before destroying any temps. - -extern "C" int printf (const char *, ...); - -int c = 0; -int d = 0; -int r = 0; - -struct A { - A() { if (c != d) r = 1; ++c; } - A(const A&); // declare so g++ returns A on the stack - ~A() { ++d; } - operator int () { return 0; } -}; - -A foo () -{ - return A(); -} - -struct B { - int i; - int j; - B(): i(foo()), j(foo()) { } -}; - -int main() -{ - B b; - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary5.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary5.C deleted file mode 100644 index 6a2469e3627..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary5.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 6604 -// Bug: Scoped constructor call is not properly recognized as a functional cast - -int c; - -struct A { - A() { ++c; } - ~A() { --c; } - operator int () { return 1; } -}; - -int main () -{ - A::A(); - return c; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary6.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary6.C deleted file mode 100644 index ce6a92e586a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary6.C +++ /dev/null @@ -1,8 +0,0 @@ -// Bug: the temporary from the default parameter to f2 is reused. -// Build don't link: - -struct A {}; -int f2 (int i, const A& ar = A()); -void f (int i, int j = f2(1)); -void g () { f (1); } -void h () { f (1); } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C deleted file mode 100644 index 8b91fe1324d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C +++ /dev/null @@ -1,35 +0,0 @@ -// PRMS ID: 7304 - -struct V { - int n; - V() : n(0) { } - V(int x) : n(x) { } -}; - -V baz(const V &x) -{ - return x; -} - -int bar(V v1, V v2, V v3) -{ - return v1.n; -} - -struct A { - A(): n(7) { } - int foo(); - V n; -}; - -int A::foo() -{ - V v1, v2; - return bar(n, baz(v1), v2); -} - -int main() -{ - A a; - return (a.foo() != 7); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary8.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary8.C deleted file mode 100644 index bb0698e2e3c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary8.C +++ /dev/null @@ -1,25 +0,0 @@ -// Test for proper handling of temporaries in ?: exprs. - -extern "C" int printf (const char *, ...); -int c = 0, d = 0; - -class A { -public: - A() { ++c; } - A(const A&) { ++c; } - ~A() { ++d; } -}; - -A f (const A& a) -{ - return (c ? A() : A()); -} - -int main() -{ - { - f (c ? A() : A()); - } - printf ("%d %d\n", c, d); - return c != d || c != 2; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempover.C b/gcc/testsuite/g++.old-deja/g++.jason/tempover.C deleted file mode 100644 index 0998f692a59..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempover.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates overloading -#define TEMPL template <class T> - -class B {}; - -TEMPL class A : virtual public B { - public: - A(int); -}; - -TEMPL A<T>::A(int){} - -A<double> a(1); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempparse.C b/gcc/testsuite/g++.old-deja/g++.jason/tempparse.C deleted file mode 100644 index 68f67adc473..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempparse.C +++ /dev/null @@ -1,29 +0,0 @@ -/* - PRMS Id: 3631 - Bug is: g++ mangles template class names in a way that it won't accept, - and then tries to feed them to itself. -*/ -// Build don't link: - -template<class T> -struct A { - A(); -}; - -template<class T> -struct B : A<T> { - B(); -}; // gets bogus error - B<C<char>> - -template<class T> -struct C { - C(); -}; - -template<class T> -struct D { - D(); - B<C<T> > p_f; -}; - -typedef D<char> Dummy; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempsub.C b/gcc/testsuite/g++.old-deja/g++.jason/tempsub.C deleted file mode 100644 index 4b69d888d36..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tempsub.C +++ /dev/null @@ -1,28 +0,0 @@ -// Distillation of crash1.C problem (PR 3633) -// Build don't link: - -template<class P> -class A -{ - P p; -}; - -template<class Q> -class B -{ - A<Q> a; // bogus error - temp parm name propagating -}; - -template<class R> -class C -{ - B<R> b; -}; - -template<class S> -class D -{ - S s; -}; - -C< D<int> > c; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/this.C b/gcc/testsuite/g++.old-deja/g++.jason/this.C deleted file mode 100644 index 544db6c361a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/this.C +++ /dev/null @@ -1,16 +0,0 @@ -// PRMS Id: 5190 -// Bug: g++ fails to build up a const reference to `this'. -// Build don't link: - -class X -{ -public: - void member (); -}; - -void print (const X* const &); - -void X::member () -{ - print (this); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk1.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk1.C deleted file mode 100644 index 22c0516f1b3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/thunk1.C +++ /dev/null @@ -1,47 +0,0 @@ -// Test that non-variadic function calls using thunks work right. -// Special g++ Options: -fvtable-thunks - -struct A { - void* p; - A (void* q): p (q) { } - A (const A& a): p (a.p) { } -}; - -class CBase { -public: - void BaseFunc(); -}; - -class MMixin { -public: - virtual A MixinFunc(int arg, A arg2) = 0; -}; - -class CExample : public CBase, public MMixin { -public: - A MixinFunc(int arg, A arg2); -}; - -void CBase::BaseFunc() -{ -} - -A CExample::MixinFunc(int arg, A arg2) -{ - if (arg != 1 || arg2.p != 0) - return 0; - return this; -} - -void* test(MMixin& anExample) -{ - return anExample.MixinFunc(1,A(0)).p; -} - -main () -{ - CExample c; - - if (test(c) != &c) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C deleted file mode 100644 index 73bb0ff33b1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C +++ /dev/null @@ -1,49 +0,0 @@ -// Test that non-variadic function calls using thunks and PIC work right. -// Skip if not native -// Special g++ Options: -fvtable-thunks -fPIC -// excess errors test - XFAIL m68k-motorola-sysv m88k-motorola-sysv3 - -struct A { - void* p; - A (void* q): p (q) { } - A (const A& a): p (a.p) { } -}; - -class CBase { -public: - void BaseFunc(); -}; - -class MMixin { -public: - virtual A MixinFunc(int arg, A arg2) = 0; -}; - -class CExample : public CBase, public MMixin { -public: - A MixinFunc(int arg, A arg2); -}; - -void CBase::BaseFunc() -{ -} - -A CExample::MixinFunc(int arg, A arg2) -{ - if (arg != 1 || arg2.p != 0) - return 0; - return this; -} - -void* test(MMixin& anExample) -{ - return anExample.MixinFunc(1,A(0)).p; -} - -main () -{ - CExample c; - - if (test(c) != &c) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C deleted file mode 100644 index 66ac8f9529c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C +++ /dev/null @@ -1,59 +0,0 @@ -// Test that variadic function calls using thunks work right. -// Note that this will break on any target that uses the generic thunk -// support, because it doesn't support variadic functions. - -// Special g++ Options: -fvtable-thunks -// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 - -#include <stdarg.h> - -struct A { - void* p; - A (void* q): p (q) { } - A (const A& a): p (a.p) { } -}; - -class CBase { -public: - void BaseFunc(); -}; - -class MMixin { -public: - virtual A MixinFunc(int arg, ...) = 0; -}; - -class CExample : public CBase, public MMixin { -public: - A MixinFunc(int arg, ...); -}; - -void CBase::BaseFunc() -{ -} - -A CExample::MixinFunc(int arg, ...) -{ - va_list ap; - va_start (ap, arg); - - if (arg != 1 || va_arg (ap, int) != 2 || va_arg (ap, int) != 3 - || va_arg (ap, int) != 4 || va_arg (ap, int) != 5 - || va_arg (ap, int) != 6 || va_arg (ap, int) != 7 - || va_arg (ap, int) != 8 || va_arg (ap, int) != 9) - return 0; - return this; -} - -void* test(MMixin& anExample) -{ - return anExample.MixinFunc(1,2,3,4,5,6,7,8,9).p; -} - -main () -{ - CExample c; - - if (test(c) != &c) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tpt-1.cc b/gcc/testsuite/g++.old-deja/g++.jason/tpt-1.cc deleted file mode 100644 index 15095200d01..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tpt-1.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Testcase for use of template parms as types for other template parms. - -template <class T, T t> -class A { - T a; -public: - A(): a(t) {} - - operator T () { return a; } -}; - -template <class S, S s> -class B { - A<S,s> a; -public: - B(A<S,s>& b): a(b) {} - - operator S () { return a*20; } -}; - -main() -{ - A<int, 5> a; - B<int, 5> b(a); - - if (b * a == 500) - return 0; - else - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tredecl.C b/gcc/testsuite/g++.old-deja/g++.jason/tredecl.C deleted file mode 100644 index 72cbae7a6ee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tredecl.C +++ /dev/null @@ -1,17 +0,0 @@ -// Bug: Foo<Bar> *p semi-instantiates Foo<Bar> in local scope, so -// when Foo<Bar> f tries to instantiate it later, it only finds the partial -// instantiation from before. -// -// No PR; distilled from James Clark's SGML project. -// -// Build don't link: - -class Bar { }; - -template<class T> class Foo; - -Foo<Bar> *p; - -template<class T> class Foo { }; - -Foo<Bar> f; // gets bogus error - hosed binding levels diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tredecl2.C b/gcc/testsuite/g++.old-deja/g++.jason/tredecl2.C deleted file mode 100644 index faaf8624f27..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tredecl2.C +++ /dev/null @@ -1,5 +0,0 @@ -// No bug; making sure my fix for tredecl.C doesn't break other cases -// Build don't link: - -template<class T> struct Foo { Foo<T> * me() { return this; } }; -Foo<int> i; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C b/gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C deleted file mode 100644 index bcc25ba484f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C +++ /dev/null @@ -1,11 +0,0 @@ -// PRMS Id: 4679 -// Bug: redeclaration of templates erases the definition. -// Build don't link: - -template <class T> class Foo { public: void h(); }; -template <class T> class Foo; - -void g() -{ - Foo<int> f; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tredecl4.C b/gcc/testsuite/g++.old-deja/g++.jason/tredecl4.C deleted file mode 100644 index 64ba4b8ff8b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/tredecl4.C +++ /dev/null @@ -1,5 +0,0 @@ -// It is illegal to use the name of a class template for anything else, -// including another class template. - -template <class T> class A { }; // ERROR - -template <class U, class V> class A { }; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/trivial.C b/gcc/testsuite/g++.old-deja/g++.jason/trivial.C deleted file mode 100644 index f5a535541cb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/trivial.C +++ /dev/null @@ -1,71 +0,0 @@ -// PRMS Id: 3665 -// Build don't link: - -//------------------------------------------------------------- -// Referential declaration within class -// -// Imbeded below is the invocation of the compiler and the error -// message -// -// This compiles successfully with both the xlC and CFRONT compilers -// This was reviewed with Clem Dickey and we agree that it appears to -// be a Cygnus compiler problem. -//------------------------------------------------------------- -/* -$ make bug.reference.o - /usr/p3/bin/i960-vxworks-g++ `getsrc bug.reference.C` -I. -Iinc1 -Iinc2 - -I/vw5.0.3/h -I/vw5.0.3/h/i960 -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3 -/include -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3-930417/include -I/usr/p -3/lib/i960-vxworks/include -I/usr/p3/i960-vxworks/include -c -DCPU_FAMILY=I960 --DCPU=I960CA -mca -mold-align -g3 -O1 -DASSERT_ON -nostdinc -nostdinc++ -MD -./bug.reference.C: In method `class1::class1 (long unsigned int, long unsigned i -nt **&)': -./bug.reference.C:43: cannot convert type `long unsigned int **' -./bug.reference.C:43: to type `long unsigned int *[]&' -make: 1254-004 The error code from the last command is 1. -*/ - -// typedefs -typedef unsigned long u32; -typedef u32 *ul[16]; - -// class defs -class class1 { - u32 var1; - class1(const class1 &); // Copy constructor - class1& operator=(const class1 &); // operator= member function -public: - class1(u32, ul&); - ul &ulref; - ~class1() {} -}; - - -// member function defs -class1::class1(u32 u, ul &l) : var1(u), ulref(l) -{} - -/* =========================================================================== -Note: The following is a "work around" that allows the successful compilation. - - -// typedefs -typedef unsigned long u32; -typedef u32 *ul[16]; - -// class defs -class class1 { - u32 var1; - class1(const class1 &); // Copy constructor - class1& operator=(const class1 &); // operator= member function -public: - class1(u32, ul*); - ul &ulref; - ~class1() {} -}; - - -// member function defs -class1::class1(u32 u, ul *l) : var1(u), ulref(*l) -{} -============================================================================*/ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeck.C b/gcc/testsuite/g++.old-deja/g++.jason/typeck.C deleted file mode 100644 index cffbc87bbce..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typeck.C +++ /dev/null @@ -1,19 +0,0 @@ -// Bug: g++ fails to catch incompatibilities in the parameter lists when -// assigning. -// Build don't link: - -typedef struct S *type_p; -typedef struct S const *ctype_p; - -typedef ctype_p (*PF) (int); - -type_p callee (type_p arg) { return 0; } - -void foobar () -{ - static PF p = callee; // ERROR - - - p = callee; // ERROR - -} - -PF pp = callee; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typedef.C b/gcc/testsuite/g++.old-deja/g++.jason/typedef.C deleted file mode 100644 index fac78cebeaf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typedef.C +++ /dev/null @@ -1,9 +0,0 @@ -// PRMS Id: 4687 -// Bug: g++ misinterprets typedefs of function type in class scope. -// Build don't link: - -struct A { - typedef int F(); - F *fp; - void* g() { return fp; } // gets bogus error - typing -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typedef2.C b/gcc/testsuite/g++.old-deja/g++.jason/typedef2.C deleted file mode 100644 index 44a32de3925..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typedef2.C +++ /dev/null @@ -1,12 +0,0 @@ -// PRMS Id: 5367 -// Bug: the nested name of C::func gets hosed. - -struct C { - typedef int func(int *, int *); -}; - -int -main() -{ - C::func *handler; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typedef3.C b/gcc/testsuite/g++.old-deja/g++.jason/typedef3.C deleted file mode 100644 index 5b96451ccc9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typedef3.C +++ /dev/null @@ -1,8 +0,0 @@ -// Test that inheriting from a type typedefed to itself works. -// Build don't link: - -typedef struct class1 { - class1& operator=(const class1&); -} class1; - -class class2 : public class1 { }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C b/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C deleted file mode 100644 index f6cd45bc664..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C +++ /dev/null @@ -1,11 +0,0 @@ -#include <typeinfo> -#include <iostream.h> - -struct foo { double f(int); }; - -int main() { - double f (int); - const std::type_info &r = typeid (f); - cout << typeid(f).name() << endl; - cout << typeid(foo::f).name() << endl; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeid2.C b/gcc/testsuite/g++.old-deja/g++.jason/typeid2.C deleted file mode 100644 index 64ecc5a17f5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/typeid2.C +++ /dev/null @@ -1,30 +0,0 @@ -// PRMS Id: 11596 - -#include <typeinfo> -extern "C" int printf (const char *, ...); - -class Chicken -{ -public: - int eggs_per_day; -}; - -template <class Bird> -class Flock -{ -public: - Bird * flock_head; - int head_count; - void print_self() { - printf ("A flock of %d %ss\n", head_count, typeid (Bird).name ()); - printf ("A flock of %d %ss\n", head_count, typeid (*flock_head).name ()); - } -}; - -int main() -{ - Flock<Chicken> x; - printf ("%s\n", typeid(x).name()); - x.head_count = 42; - x.print_self(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/union.C b/gcc/testsuite/g++.old-deja/g++.jason/union.C deleted file mode 100644 index b145390efcc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/union.C +++ /dev/null @@ -1,11 +0,0 @@ -// Bug: g++ doesn't insert anon union members into class scope. -// Breaks groff. -// Build don't link: - -struct A { - union { - int i; - }; - - void foo () { i = 1; } // gets bogus error - -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/vecdel.C b/gcc/testsuite/g++.old-deja/g++.jason/vecdel.C deleted file mode 100644 index 717e9678898..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/vecdel.C +++ /dev/null @@ -1,19 +0,0 @@ -__SIZE_TYPE__ newsize = 0; -__SIZE_TYPE__ delsize = 0; - -struct A { - int i; - void * operator new [] (__SIZE_TYPE__ i) - { newsize = i; return ::operator new [](i); } - void operator delete [] (void *p, __SIZE_TYPE__ i) - { delsize = i; ::operator delete [](p); } -}; - -int main() -{ - A* ap = new A [2]; - delete [] ap; - if (!newsize || newsize != delsize) - return 1; - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/virtual.C b/gcc/testsuite/g++.old-deja/g++.jason/virtual.C deleted file mode 100644 index 3fa952b164f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/virtual.C +++ /dev/null @@ -1,41 +0,0 @@ -// From: chw@bellcore.com (Charlie Woloszynski,MRE 2J-278,8295228,,27143) -// Newsgroups: gnu.g++.bug -// Subject: gcc-2.5.5 bug in multiple inheritance and pure virtual functions -// Date: 25 Jan 1994 23:41:36 -0500 - -// Bug: g++ fails to notice definitions of abstract virtuals. -// Build don't link: - -class A -{ -public: - virtual void a1() = 0; - virtual void a2() = 0; -}; - -class B -{ -public: - virtual void b1() = 0; - virtual void b2() = 0; -}; - - -class C: public A, public B -{ -public: - virtual void a2() {}; - virtual void b2() {}; -}; - -class D : public C -{ -public: - virtual void a1() {}; - virtual void b1() {}; -}; - -int main() -{ - D d; // gets bogus error -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/virtual2.C b/gcc/testsuite/g++.old-deja/g++.jason/virtual2.C deleted file mode 100644 index ef42f8b19b7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/virtual2.C +++ /dev/null @@ -1,13 +0,0 @@ -struct A { - virtual A* f () { return this; } -}; - -struct B: public A { - virtual B* f () { return 0; } -}; - -int main () -{ - A* ap = new B; - return (ap->f () != 0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning1.C b/gcc/testsuite/g++.old-deja/g++.jason/warning1.C deleted file mode 100644 index 86a2160e764..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning1.C +++ /dev/null @@ -1,7 +0,0 @@ -// Bug: g++ protests that foo was never defined. -// Build don't link: - -static void foo (); -static void foo (); -static void foo () { } -void bar () { foo(); } // gets bogus error - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C deleted file mode 100644 index 8dbf5ed3217..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C +++ /dev/null @@ -1,19 +0,0 @@ -// Don't warn about these comparisons. -// Build don't link: -// Special g++ Options: -W -Wall - -struct A { - unsigned int b : 28; -}; - -int f (int i, unsigned char u, A a, unsigned long ul) -{ - if ((u & 0x10) == 0) - return 1; - if (i == 0U) - return 1; - if (a.b > ul) - return 1; - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning2.C b/gcc/testsuite/g++.old-deja/g++.jason/warning2.C deleted file mode 100644 index 6b51dd05219..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning2.C +++ /dev/null @@ -1,14 +0,0 @@ -// g++ ought to warn about casting a base pointer to a derived reference. -// Build don't link: - -struct A { - virtual int f () = 0; -}; - -struct B: public A { int f () { } }; - -int main() -{ - B* bp; - A& ar = (A&)bp; // WARNING - -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning3.C b/gcc/testsuite/g++.old-deja/g++.jason/warning3.C deleted file mode 100644 index b63b9cac148..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Bug: overloading of 'A' for template causes bogus shadowing warnings. -// Special g++ Options: -Wshadow -// Build don't link: - -template<class T> -class A -{ - public: - virtual ~A() {} -}; - -template class A<int>; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning4.C b/gcc/testsuite/g++.old-deja/g++.jason/warning4.C deleted file mode 100644 index a4eb4ac7d41..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning4.C +++ /dev/null @@ -1,16 +0,0 @@ -// Bug: a virtual function with the same name in an unrelated class will -// cause a bogus overloading warning. -// Special g++ Options: -Woverloaded-virtual -// Build don't link: - -struct A { - virtual void foo (); -}; - -struct B { - virtual void bar (); -}; - -struct C: public A { - virtual void bar (); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning5.C b/gcc/testsuite/g++.old-deja/g++.jason/warning5.C deleted file mode 100644 index 239d867b52f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning5.C +++ /dev/null @@ -1,24 +0,0 @@ -// PRMS Id: 5135 -// Bug: g++ complains that the result of the new expression is not used. -// Special g++ Options: -Wall - -extern "C" int printf (const char *, ...); -inline void * operator new (__SIZE_TYPE__, void *p) { return p; } - -class foo { -public: - foo() : a(42) {}; - int a; -}; - -int -main() -{ - char buffer[1024]; - - new (buffer) foo; - - foo* pY = (foo *)buffer; - - return pY->a != 42; -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning6.C b/gcc/testsuite/g++.old-deja/g++.jason/warning6.C deleted file mode 100644 index 920a4694acd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning6.C +++ /dev/null @@ -1,7 +0,0 @@ -// Special g++ Options: -Wunused -// Build don't link: - -struct A { - int i:8; - virtual ~A() {} -}; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning7.C b/gcc/testsuite/g++.old-deja/g++.jason/warning7.C deleted file mode 100644 index 1fe03f89ce9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning7.C +++ /dev/null @@ -1,6 +0,0 @@ -// PRMS Id: 5481 -// Special g++ Options: -Wunused -// Build don't link: - -struct A { }; -static A a = A(); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning8.C b/gcc/testsuite/g++.old-deja/g++.jason/warning8.C deleted file mode 100644 index d6ea821eb90..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning8.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -struct A { - A(); - ~A(); -}; - -struct B { - B (const A&); - ~B (); -}; - -const B& f () -{ - A a; - return a; // WARNING - returning reference to temporary -} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning9.C b/gcc/testsuite/g++.old-deja/g++.jason/warning9.C deleted file mode 100644 index d46ba37650c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning9.C +++ /dev/null @@ -1,13 +0,0 @@ -// Special g++ Options: -Wsynth - -struct A { - operator int (); - A& operator= (int); // WARNING - not used below -}; - -main() -{ - A a, b; - - a = b; // WARNING - uses synthesized op= -} |