diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other')
191 files changed, 0 insertions, 4121 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/.cvsignore b/gcc/testsuite/g++.old-deja/g++.other/.cvsignore deleted file mode 100644 index 7abff1dbead..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -config.status diff --git a/gcc/testsuite/g++.old-deja/g++.other/900403_04.C b/gcc/testsuite/g++.old-deja/g++.other/900403_04.C deleted file mode 100644 index 9d55a37976b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/900403_04.C +++ /dev/null @@ -1,12 +0,0 @@ -// GROUPS passed abort -// Build don't link: -// g++ 1.37.1 bug 900403_04 - -// The following erroneous code causes g++ to abort. - -// keywords: abort, bit-fields, zero length - -struct s { - unsigned int foo:0; // ERROR - causes abort - unsigned int field; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/900519_12.C b/gcc/testsuite/g++.old-deja/g++.other/900519_12.C deleted file mode 100644 index 1170b068b2f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/900519_12.C +++ /dev/null @@ -1,11 +0,0 @@ -// GROUPS abort -// Build don't link: -// g++ 1.37.1 bug 900519_12 - -// The following erroneous code causes g++ to segfault. - -// cfront 2.0 passes this test. - -// keywords: segfault, typedef, pointer type, function type - -typedef eek void (*)(); // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.other/Makefile.in b/gcc/testsuite/g++.old-deja/g++.other/Makefile.in deleted file mode 100644 index d5eb149dbee..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -#### host, target, and site specific Makefile frags come in here. - -srcdir = . - -# Nothing to do... -all: - -clean: - -rm -f *.o *.diff *~ *.bad core - -distclean: clean - -rm -f Makefile config.status diff --git a/gcc/testsuite/g++.old-deja/g++.other/access1.C b/gcc/testsuite/g++.old-deja/g++.other/access1.C deleted file mode 100644 index 43aff60a161..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -class X{ - unsigned int i; - public: - void f(); -}; - -void X::f() -{ - union { - int foo[sizeof (i)]; - }; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/access2.C b/gcc/testsuite/g++.old-deja/g++.other/access2.C deleted file mode 100644 index beb02a1f7d8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// Based on a test-case in the Standard, submitted by several people - -class Outer { - typedef int T; - struct Inner { - T i; // ERROR - not accessible - XFAIL *-*-* - void f() { - T j; // ERROR - not accessible - XFAIL *-*-* - } - }; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/access3.C b/gcc/testsuite/g++.old-deja/g++.other/access3.C deleted file mode 100644 index 2ba2c0c51d6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access3.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: -// The standard sez that a use of a name gets the most access it can through -// the various paths that can reach it. Here, the access decl in B gives -// us access. - -struct A -{ - void f (); -}; - -struct B: private virtual A -{ - A::f; -}; - -struct C: private virtual A, public B -{ -}; - -int -main () -{ - C c; - - c.f (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/access4.C b/gcc/testsuite/g++.old-deja/g++.other/access4.C deleted file mode 100644 index 75f3a6191a3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access4.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -struct A { - static int i; -}; - -struct B : private A { }; - -struct C : public B { - int f () { return A::i; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/access5.C b/gcc/testsuite/g++.old-deja/g++.other/access5.C deleted file mode 100644 index 0d58ea0b3f3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access5.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -class A -{ -protected: - int i; -}; - -class B : private A -{ -protected: - A::i; -}; - -struct C : public B { - friend int f(C *p); -}; - -int f(C *p) { - return p->i; -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/access6.C b/gcc/testsuite/g++.old-deja/g++.other/access6.C deleted file mode 100644 index 7a7c7ff5941..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/access6.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -template <int I> -struct S { - void g(); -}; - -class C { - static const int i = 3; // gets bogus error - private - XFAIL *-*-* -public: - S<C::i>* f(); // gets bogus error - redeclared - XFAIL *-*-* -}; - -S<C::i>* C::f() { // gets bogus error - private - XFAIL *-*-* - return 0; -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/addrof1.C b/gcc/testsuite/g++.old-deja/g++.other/addrof1.C deleted file mode 100644 index b4d55f6a21b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/addrof1.C +++ /dev/null @@ -1,30 +0,0 @@ -typedef struct st { - unsigned char a; - unsigned char b; - unsigned char c; - unsigned char d; -} __attribute__((aligned(4))) st; - -void testme(int, int, int); - -static inline void -stupid_func(st s) -{ - testme(s.a, s.b, s.c); -} - -int main() -{ - st s; - - s.a = s.b = s.c = 216; - stupid_func(s); - - return 0; -} - -void testme(int a, int b, int c) -{ - if (a != 216 || b != 216 || c != 216) - abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C b/gcc/testsuite/g++.old-deja/g++.other/ambig1.C deleted file mode 100644 index d6574a2b79c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: - -struct A { - int operator ++(); // ERROR - candidates - void operator ()(); // ERROR - candidates - void operator delete(void*); // ERROR - candidates -}; - -struct B { - int operator ++(int); // ERROR - candidates - void operator ()(); // ERROR - candidates - void operator delete(void*); // ERROR - candidates - void f(); -}; - -struct C : public A, public B { -}; - -void f() -{ - C c; - C* cp; - - delete cp; // ERROR - ambiguous - c(); // ERROR - ambiguous - c++; // ERROR - ambiguous -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon1.C b/gcc/testsuite/g++.old-deja/g++.other/anon1.C deleted file mode 100644 index 87948481d2b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/anon1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -static union { - union { - }; -}; // ERROR - anonymous union with no members diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon2.C b/gcc/testsuite/g++.old-deja/g++.other/anon2.C deleted file mode 100644 index 49a7b2c35d6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/anon2.C +++ /dev/null @@ -1,31 +0,0 @@ -extern "C" void abort (void); - -static union { - int x1; - long x2; - short x3; - long x4; -}; - -static union { - union { - union { - int z; - }; - }; - union { - union { - double d; - int i; - }; - }; -}; - - -int main() -{ - z = 3; - if (i != 3) - abort (); - d = 2.5; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/array1.C b/gcc/testsuite/g++.old-deja/g++.other/array1.C deleted file mode 100644 index 0ecba7778aa..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/array1.C +++ /dev/null @@ -1,26 +0,0 @@ -int i; - -struct S { - S (int) { - ++i; - if (i == 3) - throw 3; - }; - - S () {} - - ~S() { - --i; - } -}; - -int main() -{ - try { - S s[5] = { 0, 1, 2, 3, 4 }; - } catch (...) { - } - - if (i != 1) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/array2.C b/gcc/testsuite/g++.old-deja/g++.other/array2.C deleted file mode 100644 index 255d8cce2d3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/array2.C +++ /dev/null @@ -1,18 +0,0 @@ -int i; - -struct S { - S () { - ++i; - }; - - S (int) { - }; -}; - -int main() -{ - S s[3][3] = { 2 }; - - if (i != 8) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/badarrow.C b/gcc/testsuite/g++.old-deja/g++.other/badarrow.C deleted file mode 100644 index e5946fd7768..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/badarrow.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -struct S { - int i; -} s; - -void f() -{ - s->i = 3; // ERROR - base operand -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/badopt1.C b/gcc/testsuite/g++.old-deja/g++.other/badopt1.C deleted file mode 100644 index 096770e77ad..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/badopt1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Based on a testcase by Bryan Weston <bryanw@bluemoon.sps.mot.com> -// egcs 1.1 fails to increment count - -#include <cstdlib> - -struct Base { Base() {} }; // removing the constructor fixes the problem -struct Derived : Base {}; // so does removing the base class - -int main() { - int count = 0; - Derived* array[1]; // making this Base*[1] does not fix the problem - array[count++] = new Derived (); // but then new Base() does - if (count!=1) - std::abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C b/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C deleted file mode 100644 index ad21fd7fb85..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Based on a bug report by Stephen Vavasis <vavasis@CS.Cornell.EDU> - -// excess errors test - XFAIL *-*-* - -// declares template operator!= -#include <utility> - -struct foo { - enum e { bar } baz:1; - void test() { - baz != bar; - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/cast1.C b/gcc/testsuite/g++.old-deja/g++.other/cast1.C deleted file mode 100644 index 7cd805975aa..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/cast1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -struct S0 { }; -struct S1 : virtual public S0 { }; -struct S2 : virtual public S0 { }; - -struct S3 : public S1, public S2, virtual public S0 -{ -}; - -void f(const S0*) {} - -void g() -{ - f(static_cast<S3*>(0)); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/cast2.C b/gcc/testsuite/g++.old-deja/g++.other/cast2.C deleted file mode 100644 index 80cf7dc1864..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/cast2.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// Origin: Mark Mitchell <mark@codesourcery.com> - -struct A { -}; - -int main() -{ - A a; - typedef void (A::*F)(); - F p; - - const_cast<const A>(a); // ERROR - const_cast requires pointer/ref types - const_cast<F>(p); // ERROR - const_cast requires pointer/ref types - const_cast<int (*)()>(&main); // ERROR - function type in const_cast - const_cast<int (&)()>(main); // ERROR - function type in const_cast -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/cleanup1.C b/gcc/testsuite/g++.old-deja/g++.other/cleanup1.C deleted file mode 100644 index fd4dc6e4db0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/cleanup1.C +++ /dev/null @@ -1,20 +0,0 @@ -// Bug: fold is too eager about pushing down CLEANUP_POINT_EXPR. - -int d; - -struct A { - A() { } - ~A() { d = 1; } -}; - -int f (const A& a) -{ - return 1; -} - -int main () -{ - if (f (A()) && d == 0) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C b/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C deleted file mode 100644 index 4cd0b55e43d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C +++ /dev/null @@ -1,26 +0,0 @@ -// Origin: Bryan Scattergood <bryan@fsel.com> -// Special g++ Options: -O -fno-exceptions - -extern "C" void abort(); - -class A -{ -public: - A(); - ~A(); - int foo(); -}; - -A::A() {} -A::~A() { abort (); } -int A::foo() {} - -extern int f() -{ - return 0; -} - -int main() -{ - return ((f() != 0) ? A().foo() : 0); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/configure.in b/gcc/testsuite/g++.old-deja/g++.other/configure.in deleted file mode 100644 index e198b4f0d45..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/configure.in +++ /dev/null @@ -1,15 +0,0 @@ -# This file is a shell script fragment that supplies the information -# necessary to tailor a template configure script into the configure -# script appropriate for this directory. For more information, check -# any existing configure script. - -srctrigger=g++-03.exp -srcname="DejaGnu" - -# per-host: - -# per-target: - -target_makefile_frag=../config/mt-${target_alias} - -# post-target: diff --git a/gcc/testsuite/g++.old-deja/g++.other/const1.C b/gcc/testsuite/g++.old-deja/g++.other/const1.C deleted file mode 100644 index 7c26da1aea3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/const1.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct S -{ - void f() - { - const int i; // ERROR - uninitialized const - } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/const2.C b/gcc/testsuite/g++.old-deja/g++.other/const2.C deleted file mode 100644 index 90b70d16619..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/const2.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -struct S { - static const char* cp = "abc"; // ERROR - initialization of non-const -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv1.C b/gcc/testsuite/g++.old-deja/g++.other/conv1.C deleted file mode 100644 index a558c5eba64..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -class X { -public: - const operator int (); // ERROR - invalid declaration. -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv2.C b/gcc/testsuite/g++.old-deja/g++.other/conv2.C deleted file mode 100644 index e713304c575..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors - -void cheat( int* i ) { ++(*i); } - -struct t { - void cheat( int& i ) { ++i; } -}; - -int main() -{ - void (t::*member)( const int& ) = &t::cheat; // ERROR - conversion - void (*cheater)( const int* ) = &cheat; // ERROR - converting - t t2; - const int i=1; - int j=1; - (t2.*member)( i ); - (t2.*member)( j ); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv3.C b/gcc/testsuite/g++.old-deja/g++.other/conv3.C deleted file mode 100644 index 7690f56ee94..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv3.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -// submitted by David C Binderman <dcb@pncl.co.uk> - -typedef const int ci; -typedef ci aci[ 10]; -aci var = { 2, 3, 5, 7, 11, 13 }; - -void -f() -{ - int * ip = var; // ERROR - requires const_cast -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv4.C b/gcc/testsuite/g++.old-deja/g++.other/conv4.C deleted file mode 100644 index 0ed0ee86563..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv4.C +++ /dev/null @@ -1,17 +0,0 @@ -// Testcase for proper hiding of base conversion ops. - -struct A -{ - operator const char *(); -}; - -struct B : public A -{ - operator const char *() { return 0; } -}; - -int main( void ) -{ - B b; - const char *p = b; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv5.C b/gcc/testsuite/g++.old-deja/g++.other/conv5.C deleted file mode 100644 index 97bf23889a9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv5.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: - -// Based on bug report by Thomas Kunert <kunert@physik.tu-dresden.de> - -// Special g++ Options: - -int foo(); -const int (*bar)() = foo; // ERROR - adding const - XFAIL *-*-* diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv6.C b/gcc/testsuite/g++.old-deja/g++.other/conv6.C deleted file mode 100644 index 918e69742d8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/conv6.C +++ /dev/null @@ -1,28 +0,0 @@ -// Test for composite pointer types, as defined in [expr.rel], -// and common pointer to member types, as defined in [expr.eq]. - -struct A { int i; }; -struct B : public A { }; - -int main () -{ - B b; - - // The composite type is `A const *' - A* ap = &b; - const B* bp = &b; - if (ap != bp) // gets bogus error - distinct types XFAIL *-*-* - return 1; - - // The composite type is `B const *const *' - B *const * p = 0; - B const * * q = 0; - if (p != q) // gets bogus error - distinct types XFAIL *-*-* - return 1; - - // The common type is `int const B::*' - const int A::*apm = &A::i; - int B::*bpm = &A::i; - if (apm != bpm) // gets bogus error - distinct types XFAIL *-*-* - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/copy1.C b/gcc/testsuite/g++.old-deja/g++.other/copy1.C deleted file mode 100644 index 5cc68a5623e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/copy1.C +++ /dev/null @@ -1,25 +0,0 @@ -// Bug: expand_vec_init doesn't copy arrays of builtin types. - -struct B { - B() { } - B(const B&) { } -}; - -struct A -{ - B b; - int ar[5]; -}; - -int main() -{ - A a; - for (int i = 0; i < 5; ++i) - a.ar[i] = i; - - A a2 = a; - - for (int i = 0; i < 5; ++i) - if (a2.ar[i] != a.ar[i]) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash1.C b/gcc/testsuite/g++.old-deja/g++.other/crash1.C deleted file mode 100644 index f7caa2f00ba..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash1.C +++ /dev/null @@ -1,6 +0,0 @@ -class A -{ - enum B { ONE, TWO, THREE }; -}; - -class A::B; // ERROR - A::B is not a class type diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash2.C b/gcc/testsuite/g++.old-deja/g++.other/crash2.C deleted file mode 100644 index 93e0a6e3bcc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct A { - int rep; - static const A a(0); // ERROR - initialization - static const A b = 3; // ERROR - initialization - static const A& c = 2; // ERROR - initialization - A(int x) : rep(x) {} -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash3.C b/gcc/testsuite/g++.old-deja/g++.other/crash3.C deleted file mode 100644 index 01148434535..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Special g++ Options: -g -O2 - -inline void f() { - struct S {}; - S s; -} - -int g() -{ - for (int i = 0; i < 2; ++i) - f(); -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash4.C b/gcc/testsuite/g++.old-deja/g++.other/crash4.C deleted file mode 100644 index d86a6bb3f66..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash4.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct T { - struct S __attribute__ ((packed)) { // ERROR - parse error - int i; - }; -}; // ERROR - parse error diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash5.C b/gcc/testsuite/g++.old-deja/g++.other/crash5.C deleted file mode 100644 index 761ec0d960f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash5.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: - -class TecMesh {}; - -extern TecMesh& m; - -struct X { - X(TecMesh&); -}; - -struct D { - D(); - TecMesh& Mesh; -}; - - -D::D () - : Mesh(m) -{ - X x(D::Mesh); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash6.C b/gcc/testsuite/g++.old-deja/g++.other/crash6.C deleted file mode 100644 index 498c9833501..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash6.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// Special g++ Options: -O2 - -struct E -{ - int f(int); -}; - -int ha() -{ - enum {X = 0}; - - int A, C; - - E vList[10]; - - A = (C + 1) % 3; - vList[1].f(A); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash7.C b/gcc/testsuite/g++.old-deja/g++.other/crash7.C deleted file mode 100644 index 0f581988b1f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash7.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -void f() -{ - union { - private: - int i; // ERROR - private - } u; - - u.i = 3; // ERROR - within this context -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash8.C b/gcc/testsuite/g++.old-deja/g++.other/crash8.C deleted file mode 100644 index 22b27ef9b12..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash8.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Origin: Jason Merrill <jason@cygnus.com> - -int main() -{ - void f(); - class A { - friend void f(); - }; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash9.C b/gcc/testsuite/g++.old-deja/g++.other/crash9.C deleted file mode 100644 index d3c23977abf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/crash9.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// Origin: Jason Merrill <jason@cygnus.com> - -struct A { }; -struct B : public A -{ - int A; -}; -struct C : public B { }; diff --git a/gcc/testsuite/g++.old-deja/g++.other/cvt1.C b/gcc/testsuite/g++.old-deja/g++.other/cvt1.C deleted file mode 100644 index f448cc1a31b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/cvt1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -typedef int Array_T[2]; - -struct S1 { - S1(const Array_T&); -}; - -struct S2 { - S1 g(); - Array_T a; -}; - -S1 S2::g() -{ - return S1(a); -} - -void h() -{ - S2 s2; - s2.g(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/dcast1.C b/gcc/testsuite/g++.old-deja/g++.other/dcast1.C deleted file mode 100644 index d9dd6575aec..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dcast1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -class C { -public: - virtual void f(); -}; - -extern volatile C* cp; -extern volatile C& cr; - -void f () -{ - dynamic_cast<void*>(cp); // ERROR - cannot dynamic_cast - dynamic_cast<C&>(cr); // ERROR - cannot dynamic_cast -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/dcast2.C b/gcc/testsuite/g++.old-deja/g++.other/dcast2.C deleted file mode 100644 index bd343a7e61d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dcast2.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -// Based on a testcase by Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA> - -struct B { - virtual ~B(); -}; - -struct D : public B { -}; - -void foo() { - B x; - dynamic_cast<D*>(&x); // WARNING - will never succeed - B* p = &x; - dynamic_cast<D*>(p); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/debug1.C b/gcc/testsuite/g++.old-deja/g++.other/debug1.C deleted file mode 100644 index 84858957a79..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/debug1.C +++ /dev/null @@ -1,48 +0,0 @@ -// Build don't link: -// Special g++ Options: -g - -typedef unsigned int size_t; - - -struct dummy { }; - -struct arrrrrgh { }; - - -template<class Par,class Rand = arrrrrgh> -struct whyyyyyyy { }; - - - - -template<class T, class S =dummy> -struct grrrrrrrr { }; - - -template<class Par, class Par2 =Par, class Rand =arrrrrgh> -class no_future -{ -public: - - - template<class S> - no_future(const grrrrrrrr<whyyyyyyy<Par,Rand>*,S>& man ) { } - - ~no_future( ) { } - -private: - - - no_future(const no_future&); - no_future& operator=(const no_future&); -}; - - -int main( ) -{ - grrrrrrrr<whyyyyyyy<double>*> man; - - no_future<double> here(man); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/debug2.C b/gcc/testsuite/g++.old-deja/g++.other/debug2.C deleted file mode 100644 index 200aeb3cffc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/debug2.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: -// Special g++ Options: -funroll-loops -O2 -g - -inline void f() -{ - typedef int T; -} - -inline void g() -{ - typedef double U; -} - -int n; - -struct B -{ - ~B() { - for (int i = 0; i < n; ++i) - g(); - } -}; - -struct D : public B { - ~D() { - for (int j = 0; j < n; ++j) - f(); - } -}; - -D d; diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl1.C b/gcc/testsuite/g++.old-deja/g++.other/decl1.C deleted file mode 100644 index 7a55ce0cdeb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/decl1.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Based on a test case by Phil Blecker <tmwg@inxservices.com> - -// excess errors test - XFAIL *-*-* - -int foo(int); -int bar() { - int baz(int(foo(0))); - int foo = baz; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl2.C b/gcc/testsuite/g++.old-deja/g++.other/decl2.C deleted file mode 100644 index 1da75406d9f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/decl2.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// Based on a test-case by Maciej Radziejewski <maciejr@iws.uni-stuttgart.de> - -int i(0)(1); // ERROR - multiple initialization -int j(2) = 3; // ERROR - multiple initialization -int k(4)(5)(6); // ERROR - multiple initialization -int m, n(7)(8); // ERROR - multiple initialization diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl3.C b/gcc/testsuite/g++.old-deja/g++.other/decl3.C deleted file mode 100644 index 6068e3105dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/decl3.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -// Origin: Adapted by Nathan Sidwell 29 Apr 1999 <nathan@acm.org> -// from a test case submitted by Corey Kosak <kosak@cs.cmu.edu> -// http://egcs.cygnus.com/ml/egcs-bugs/1999-04/msg00502.html - -// We should not allow arrays of abstract type. [class.abstract/2] - -struct cow_t { - virtual void f()=0; // ERROR - abstract -}; - - -int main() -{ - cow_t cow[2]; // ERROR - abstract class - cow[0].f(); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/defarg1.C b/gcc/testsuite/g++.old-deja/g++.other/defarg1.C deleted file mode 100644 index 68b07a510cc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/defarg1.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: - -int f (int x) -{ - extern void g (int i = f (x)); // ERROR - default argument uses local - - g(); - - return 0; -} - -int f (void); - -int h1 (int (*)(int) = f); -int h2 (int (*)(double) = f); // ERROR - no matching f - -template <class T> -int j (T t) -{ - extern void k (int i = j (t)); // ERROR - default argument uses local - - k (); - - return 0; -} - -template int j (double); // ERROR - instantiated from here - diff --git a/gcc/testsuite/g++.old-deja/g++.other/defarg2.C b/gcc/testsuite/g++.old-deja/g++.other/defarg2.C deleted file mode 100644 index edb0770c7d6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/defarg2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Test that default args don't mess up pmf type comparisons. -// Contributed by Jason Merrill <jason@cygnus.com>. - -struct A { - void f (int = 0) { } -}; - -int -main () -{ - void (A::*p)(int) = 0; - p = &A::f; - if (p != &A::f) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete1.C b/gcc/testsuite/g++.old-deja/g++.other/delete1.C deleted file mode 100644 index 6386fe1883b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/delete1.C +++ /dev/null @@ -1,15 +0,0 @@ -//Build don't link: -struct cl_heap_ring{ - void operator delete (void* ptr) { } - cl_heap_ring () - { } -}; - -struct cl_heap_null_ring : public cl_heap_ring { - void operator delete (void* ptr) { } -}; - -void f() -{ - new cl_heap_null_ring(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete2.C b/gcc/testsuite/g++.old-deja/g++.other/delete2.C deleted file mode 100644 index d90def03a3f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/delete2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -struct foo { - operator char*() const; -}; - -void bar(foo a) { - delete a; // should be accepted - delete[] a; // should be accepted - char b[1]; - delete b; // ERROR - expecting pointer type - delete[] b; // ERROR - expecting pointer type -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete3.C b/gcc/testsuite/g++.old-deja/g++.other/delete3.C deleted file mode 100644 index eb56350371b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/delete3.C +++ /dev/null @@ -1,38 +0,0 @@ -#include <new> - -int i; - -extern "C" void printf(const char*, ...); - -template <class T, class U> -struct map { - ~map (); -}; - -template <class T, class U> -map<T, U>::~map () -{} - -struct SomeClass { }; - -void* operator new(size_t numBytes, SomeClass&, const nothrow_t&) throw() -{ - return operator new(numBytes, nothrow); -} - -void operator delete(void* pMemory, SomeClass&, const nothrow_t&) throw() -{ - i = 7; - return operator delete(pMemory); -} - -int -main() -{ - map< int, int>* pMap = new map< int, int>; - - delete pMap; - - if (i == 7) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete4.C b/gcc/testsuite/g++.old-deja/g++.other/delete4.C deleted file mode 100644 index 74ddcdd1545..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/delete4.C +++ /dev/null @@ -1,53 +0,0 @@ -// Build don't link: - -// Copyright (C) 1999 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 15 Apr 1999 <nathan@acm.org> - -// delete (void *)e and delete[] (void *)e result in undefined behaviour -// [expr.delete/3]. Check we warn about them -// operator new functions can only return NULL, if their exceptions -// specification is `throw()'. All other cases must return a non-null pointer -// [expr.new/13]. - -typedef __SIZE_TYPE__ size_t; - -void *operator new(size_t) -{ - return 0; // ERROR - cannot return NULL -} -void *operator new[](size_t) -{ - return 0; // ERROR - cannot return NULL -} - -struct X -{ - void *operator new(size_t) - { - return 0; // ERROR - cannot return NULL - } - void *operator new[](size_t) - { - return 0; // ERROR - cannot return NULL - } -}; - -struct Y -{ - void *operator new(size_t) throw() - { - return 0; // ok - } - void *operator new[](size_t) throw() - { - return 0; // ok - } -}; - -void fn(double *d, void *v) -{ - delete d; // ok - delete v; // WARNING - deleting void - delete[] d; // ok - delete[] v; // WARNING - deleting void -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete5.C b/gcc/testsuite/g++.old-deja/g++.other/delete5.C deleted file mode 100644 index e9cc493d668..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/delete5.C +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 1999 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 15 Apr 1999 <nathan@acm.org> - -typedef __SIZE_TYPE__ size_t; - -struct X -{ - int i; - - X():i(){} - void *operator new(size_t) - { - return 0; // WARNING - cannot return NULL - } - void *operator new[](size_t) - { - return 0; // WARNING - cannot return NULL - } -}; - -struct Y -{ - int i; - - Y():i(){} - void *operator new(size_t) throw() - { - return 0; // ok - } - void *operator new[](size_t) throw() - { - return 0; // ok - } -}; - -int main() -{ - Y *yp = new Y; - - return yp != 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-1.C b/gcc/testsuite/g++.old-deja/g++.other/dll-1.C deleted file mode 100644 index 0c66b7faf4b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-1.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Special g++ Options: -mno-nop-fun-dllimport -// Skip if not target: arm-*pe -// declspec test #1 -// set compiler_result "__imp_imp.*\.section${spaces}.drectve\n\[^\n\]*-export:exp" -// set not_compiler_result "__imp_exp" - -__declspec (dllimport) void imp (); - -__declspec (dllexport) void exp () { imp (); } diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-2.C b/gcc/testsuite/g++.old-deja/g++.other/dll-2.C deleted file mode 100644 index f5c7b2eb8e8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Skip if not target: arm-*pe -// Build don't link: -// Microsoft's MSVC 2.0 allows dllimport followed by dllexport for variables, -// but does not allow dllexport followed by dllimport. -// -// Switching between dll{export,import} works for functions. -// We test for that too (by ensuring no error is produced). - -__declspec (dllimport) int foo1 (); -__declspec (dllexport) int foo1 (); - -__declspec (dllexport) int foo2 (); -__declspec (dllimport) int foo2 (); - -__declspec (dllimport) int bar1; -__declspec (dllexport) int bar1; - -__declspec (dllexport) int bar2; // ERROR - previously declared -__declspec (dllimport) int bar2; // ERROR - redefinition diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-3.C b/gcc/testsuite/g++.old-deja/g++.other/dll-3.C deleted file mode 100644 index 469ea1c6b78..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-3.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// Skip if not target: arm-*pe -// Special g++ Options: -mno-nop-fun-dllimport -// set compiler_result "__imp_f1.*\.section${spaces}.drectve\n\[^\n\]*-export:f2" -// set not_compiler_result "__imp_f2" - -class aClass -{ -public: - __declspec(dllimport) int f1(); - __declspec(dllexport) int f2(); -}; - -__declspec(dllexport) int aClass::f2() -{ - return f1(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-4.C b/gcc/testsuite/g++.old-deja/g++.other/dll-4.C deleted file mode 100644 index 322f003dbde..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-4.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Skip if not target: arm-*pe -// Ensure dllexport overrides dllimport. -// set compiler_result "\.section${spaces}\.drectve\n\[^\n\]*-export:foo1.*\.section${spaces}\.drectve\n\[^\n\]*-export:foo2" -// set not_compiler_result "(__imp_foo1|__imp_foo2)" - -__declspec (dllimport) int foo1 (); -__declspec (dllexport) int foo1 (); - -__declspec (dllexport) int foo2 (); -__declspec (dllimport) int foo2 (); - -__declspec (dllexport) int foo1 () { return foo2 (); } -__declspec (dllexport) int foo2 () { return foo1 (); } diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-5.C b/gcc/testsuite/g++.old-deja/g++.other/dll-5.C deleted file mode 100644 index b2ad9f51bac..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-5.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// Skip if not target: arm-*pe -// dllimport is "sorta like" to "extern". -// set compiler_result "(\nfoo1:.*\nfoo2:|\nfoo2:.*\nfoo1:)" -// set not_compiler_result "__imp_" - -__declspec (dllimport) int foo1; -int foo1; - -__declspec (dllimport) int foo2; -int foo2 = 5; - -int f () { return foo1 + foo2; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/dll-6.C b/gcc/testsuite/g++.old-deja/g++.other/dll-6.C deleted file mode 100644 index b4e0b42edbf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dll-6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Skip if not target: arm-*pe -// set not_compiler_result "__imp_" -// dll.h -class aClass - { -public: - __declspec(dllimport) aClass(); - }; - -// dll.cpp - -__declspec(dllexport) aClass::aClass() - { - } diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor1.C b/gcc/testsuite/g++.old-deja/g++.other/dtor1.C deleted file mode 100644 index 3f9803c39a8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dtor1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Test for use of typedef in explicit destructor call. - -#include <new> - -struct X { - typedef X foo; -}; - -X x; -unsigned char bar[sizeof (X)]; - -int -main () -{ - X* p = new (bar) X; - p->~foo(); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor2.C b/gcc/testsuite/g++.old-deja/g++.other/dtor2.C deleted file mode 100644 index 201068c415b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dtor2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -class K { -public: - friend class C; - -private: - static K qwe; - K(); - ~K(); -}; - -K K::qwe; diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor3.C b/gcc/testsuite/g++.old-deja/g++.other/dtor3.C deleted file mode 100644 index a2ad16dfdb3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dtor3.C +++ /dev/null @@ -1,51 +0,0 @@ -// Build don't link: - -struct S1 -{ - ~S1(int); // ERROR - destructors may not have parameters -}; - - -template <class T> -struct S2 -{ - ~S2(int); // ERROR - destructors may not have parameters -}; - - -struct S3 -{ - ~S3(double) {} // ERROR - destructors may not have parameters -}; - - -template <class T> -struct S4 -{ - ~S4(double) {} // ERROR - destructors may not have parameters -}; - - -struct S5 -{ - ~S5(); -}; - -S5::~S5(float) -{ // ERROR - destructors may not have parameters -} - - -template <class T> -struct S6 -{ - ~S6(); -}; - -template <class T> -S6<T>::~S6(float) -{ // ERROR - destructors may not have parameters -} - - - diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor4.C b/gcc/testsuite/g++.old-deja/g++.other/dtor4.C deleted file mode 100644 index f23ab782560..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/dtor4.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: - -struct S1 { - ~S1(); // ERROR - candidate -}; - -S1::~S1() const -{ // ERROR - prototype does not match -} - - -struct S2 { - ~S2() volatile; // ERROR - destructors may not be volatile -}; - - -template <class T> -struct S3 { - ~S3(); // ERROR - candidate -}; - -template <class T> -S3<T>::~S3() volatile -{ // ERROR - prototype does not match -} - - -template <class T> -struct S4 { - ~S4() const; // ERROR - destructors may not be const -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/elab1.C b/gcc/testsuite/g++.old-deja/g++.other/elab1.C deleted file mode 100644 index 614e73bac53..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/elab1.C +++ /dev/null @@ -1,9 +0,0 @@ -typedef struct {} S; - -S s1; -struct S* s2; // ERROR - S is a typedef name - -template <class T> -struct X { - friend class T; // ERROR - T is a template type parameter -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/empty1.C b/gcc/testsuite/g++.old-deja/g++.other/empty1.C deleted file mode 100644 index 0789884079b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/empty1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Origin: Mark Mitchell <mark@codesourcery.com> - -extern "C" void abort(); -extern "C" void printf(const char*, ...); - -int i; - -struct A; - -struct A* as[10]; - -struct A { - A () { as[i++] = this; } - A (const A&) { as[i++] = this; } - ~A() { if (i == 0 || as[--i] != this) abort(); } -}; - -A f() { return A(); } - -int main () -{ - A a (f ()); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/enum1.C b/gcc/testsuite/g++.old-deja/g++.other/enum1.C deleted file mode 100644 index f692991a442..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/enum1.C +++ /dev/null @@ -1,15 +0,0 @@ -extern "C" void abort(); - -struct A -{ - enum { a = 3}* p; - int f() { return (int) a; } -}; - -int main() -{ - A a; - - if (a.f() != 3) - abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/expr1.C b/gcc/testsuite/g++.old-deja/g++.other/expr1.C deleted file mode 100644 index fece8d48c29..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/expr1.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -// Simplified from bug report by Trevor Taylor <ttaylor@powerup.com.au> - -struct T { - int operator()(int) { } // ERROR - candidate -}; - -int main() { - T()(); // ERROR - no such operator -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/field1.C b/gcc/testsuite/g++.old-deja/g++.other/field1.C deleted file mode 100644 index e734830a1c4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/field1.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct X -{ - static const bool b = true; - static const int i = b ? 1 : 2; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/field2.C b/gcc/testsuite/g++.old-deja/g++.other/field2.C deleted file mode 100644 index 5eb67554fdf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/field2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Test for proper handling of field calls. -// Contributed by Jason Merrill <jason@cygnus.com> - -struct A { - inline A* operator()() { return this; } -}; - -struct B { - int i; - union { A a; }; -}; - -int -main () -{ - B b; - A* ap = &b.a; - A* ap2 = b.a(); - return (ap != ap2); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/for1.C b/gcc/testsuite/g++.old-deja/g++.other/for1.C deleted file mode 100644 index 31cd741a366..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/for1.C +++ /dev/null @@ -1,41 +0,0 @@ -// Build don't link: - -int i; -int j; - -struct S { - int operator()(int) - { - i = 1; - } - - typedef int I; - - void f() { - for (S I; false; ) - ; - int k = I(3); - } -}; - -typedef int J; - -struct T { - int operator()(int) - { - j = 1; - } - - void f() { - for (T J; false; ) - ; - int k = J(3); - } -}; - -int main() -{ - S s; - s.f(); - return 2 * i + j; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend1.C b/gcc/testsuite/g++.old-deja/g++.other/friend1.C deleted file mode 100644 index 76fcebe1fae..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/friend1.C +++ /dev/null @@ -1,85 +0,0 @@ -// Build don't link: -// f() should be able to access B::j, as of FDIS [class.protected]/1 - -// Subject: Re: [bug] Inheritance and friend access control broken -// References: <199803032141.WAA09332@piano.dptmaths.ens-cachan.fr> -// <orhg5ff544.fsf@iguacu.dcc.unicamp.br> -// <199803041125.MAA06937@cor.dptmaths.ens-cachan.fr> -// <orn2f6ek92.fsf@iguacu.dcc.unicamp.br> <19980304102900.46897@dgii.com> -// From: Alexandre Oliva <oliva@dcc.unicamp.br> -// Date: 06 Mar 1998 01:43:18 -0300 - -template <int*> -class X {}; - -template <typename T> -void g(); - -struct S; - -template <typename T> -struct R; - -class B { -protected: - int i; // ERROR - in this context - static int j; -}; - -class D : public B { - friend void f(); - template <typename T> - friend void g(); - friend struct S; - template <typename T> - friend struct R; -}; - -struct S { - void h(); - X<&B::j> x; -}; - -template <typename T> -struct R { - void h(); - X<&B::j> x; -}; - -void f() -{ - ((B*)0)->i = 3; // ERROR - protected - ((D*)0)->i = 4; - B::j = 5; - D::j = 6; -} - -template <typename T> -void g() -{ - ((B*)0)->i = 3; // ERROR - protected - ((D*)0)->i = 4; - B::j = 5; - D::j = 6; -} - -template void g<int>(); - -void S::h() -{ - ((B*)0)->i = 3; // ERROR - protected - ((D*)0)->i = 4; - B::j = 5; - D::j = 6; -} - -template <typename T> -void R<T>::h() -{ - ((B*)0)->i = 3; // ERROR - protected - ((D*)0)->i = 4; - B::j = 5; - D::j = 6; -} - -template struct R<double>; diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend2.C b/gcc/testsuite/g++.old-deja/g++.other/friend2.C deleted file mode 100644 index 32a0a285fc6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/friend2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -void -f() -{ - class Local_2 { - friend class Friend; - - int i; - }; - - class Friend { - public: - void g() { - Local_2 l2; - l2.i = 3; - } - }; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend3.C b/gcc/testsuite/g++.old-deja/g++.other/friend3.C deleted file mode 100644 index 84c6b2d3b7c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/friend3.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -class foo { -public: - class bar; - void func(bar *); - class bar { - int st; - friend void foo::func(bar *); - }; -}; - - -void foo::func(bar *obj) { - obj->st++; -} - -void test02() { - foo obj_f; - foo::bar obj_b; - - obj_f.func( &obj_b); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend4.C b/gcc/testsuite/g++.old-deja/g++.other/friend4.C deleted file mode 100644 index 07969cd5487..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/friend4.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: - -// by Alexandre Oliva <oliva@dcc.unicamp.br> - -// I'm not 100% sure this program is correct, but g++ shouldn't just -// crash. - -// The idea is to give privileged access to bar<A> only to -// specializations foo<A,B>, for all B. - -template <class A, class B> void foo(); -template <class C> class bar { - int i; // ERROR - private - template <class B> friend void foo<C,B>(); // ERROR - bogus declaration -}; -template <class A, class B> void foo() { - bar<A> baz; baz.i = 1; // ERROR - foo cannot access bar<int>::i - bar<int> buz; buz.i = 1; // ERROR - foo cannot access bar<int>::i -} -int main() { - foo<void,void>(); - foo<int,void>(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend5.C b/gcc/testsuite/g++.old-deja/g++.other/friend5.C deleted file mode 100644 index ab15fa58c5b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/friend5.C +++ /dev/null @@ -1,5 +0,0 @@ -// submitted by David C Binderman <dcb@pncl.co.uk> - -struct A { - friend bool(); // ERROR - invalid declaration -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/incomplete.C b/gcc/testsuite/g++.old-deja/g++.other/incomplete.C deleted file mode 100644 index 0c230c18777..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/incomplete.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: - -struct S; - -void f(S s) {} // ERROR - incomplete type diff --git a/gcc/testsuite/g++.old-deja/g++.other/init1.C b/gcc/testsuite/g++.old-deja/g++.other/init1.C deleted file mode 100644 index a87f14bc4d3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init1.C +++ /dev/null @@ -1,10 +0,0 @@ -extern "C" void abort(); - -int i; -int j = i++; - -int main() -{ - if (i != 1) - abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init10.C b/gcc/testsuite/g++.old-deja/g++.other/init10.C deleted file mode 100644 index fa238132f3f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init10.C +++ /dev/null @@ -1,22 +0,0 @@ -int i; - -struct D { - D () { - i++; - } -}; - -struct C { - C() {} - - D d[1]; -}; - - -int main () -{ - C c; - - if (i != 1) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init11.C b/gcc/testsuite/g++.old-deja/g++.other/init11.C deleted file mode 100644 index 79d7d6caa71..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init11.C +++ /dev/null @@ -1,38 +0,0 @@ -// Check that elements for which no explicit initializer was given are -// default-initialized properly. - -extern "C" int printf (const char *, ...); - -struct A -{ - int i; - A(): i (42) { } - A(int j): i(j) { } -}; - -A ar[4] = { 1, 2 }; - -struct B -{ - A a1, a2, a3, a4; -}; - -B b = { 1, 2 }; - -struct C -{ - A ar[4]; -}; - -C c = { 1, 2 }; - -int -main () -{ - printf ("%d %d %d %d\n%d %d %d %d\n%d %d %d %d\n", - ar[0].i, ar[1].i, ar[2].i, ar[3].i, - b.a1.i, b.a2.i, b.a3.i, b.a4.i, - c.ar[1-1].i, c.ar[2-1].i, c.ar[3-1].i, c.ar[4-1].i); - - return (b.a4.i != 42 || c.ar[3].i != 42); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init12.C b/gcc/testsuite/g++.old-deja/g++.other/init12.C deleted file mode 100644 index ee0a029253a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init12.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: -// Special g++ Options: -O3 -// Origin: Mark Mitchell <mark@codesourcery.com> - -typedef int (*fp)(); - -struct S -{ - fp f; -}; - -struct T -{ - static int f() {} -}; - -static const S s = { &T::f }; - -int main() -{ - return (*s.f)(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init13.C b/gcc/testsuite/g++.old-deja/g++.other/init13.C deleted file mode 100644 index 1213a5c5622..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init13.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't run: -// Special g++ Options: -O3 -// Origin: Gabriel Dos_Reis <Gabriel.Dos_Reis@sophia.inria.fr> - -void f() {} - -struct X { - ~X() { f (); } -}; - -X x; - -int main () {} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init2.C b/gcc/testsuite/g++.old-deja/g++.other/init2.C deleted file mode 100644 index c17427a7643..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init2.C +++ /dev/null @@ -1,20 +0,0 @@ -// Special g++ Options: -O3 - -typedef int (*fp)(); - -struct S -{ - fp f; -}; - -static int f() -{ - return 0; -} - -static const S s = { &f }; - -int main() -{ - return (*s.f)(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init3.C b/gcc/testsuite/g++.old-deja/g++.other/init3.C deleted file mode 100644 index a4c6e761e66..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init3.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -struct X -{ - static const bool is_signed = true ; - static const int digits = is_signed ? 8 *sizeof(wchar_t)-1 : 0; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/init4.C b/gcc/testsuite/g++.old-deja/g++.other/init4.C deleted file mode 100644 index 9bc473fb9d7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init4.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -class error { -public: - error(int) {} -}; - -class foo { - const error x = 1; // ERROR - initialization of non-static data member -}; - - diff --git a/gcc/testsuite/g++.old-deja/g++.other/init5.C b/gcc/testsuite/g++.old-deja/g++.other/init5.C deleted file mode 100644 index 3f4785e360e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init5.C +++ /dev/null @@ -1,27 +0,0 @@ -// Objects must be destructed in decreasing cnt order -// Original test attributed to James Kanze <jkanze@otelo.ibmmail.com> -// execution test - XFAIL *-*-* - -static int cnt; - -class A { - int myCnt; -public: - A() : myCnt(cnt++) {} - ~A() { if (--cnt != myCnt) abort(); } -}; - -void f() { static A a; /* a.myCnt == 1 */ } - -class B { - int myCnt; -public: - B() : myCnt(cnt+1) { f(); ++cnt; } - ~B() { if (--cnt != myCnt) abort(); } -}; - -static A a1; // a1.myCnt == 0 -static B b1; // b1.myCnt == 2 -static A a2; // a2.myCnt == 3 - -int main() {} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init6.C b/gcc/testsuite/g++.old-deja/g++.other/init6.C deleted file mode 100644 index a684ae10740..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init6.C +++ /dev/null @@ -1,12 +0,0 @@ -// Test for default-initialization of POD-structs in functional cast notation. - -struct foo { int a[10]; }; - -int main() -{ - foo f = foo(); - int r = 0; - for (int i = 0; i < 10; ++i) - r |= f.a[i]; - return r; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init7.C b/gcc/testsuite/g++.old-deja/g++.other/init7.C deleted file mode 100644 index 3b17da029e8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init7.C +++ /dev/null @@ -1,28 +0,0 @@ -// simplified from testcase in Windows Developer Journal, -// submitted by eyal.ben-david@aks.com - -// The initialization of a static local variable must be retried if a -// previous try finished by throwing an exception [stmt.dcl]/4 - -struct foo { - foo() { throw true; } -}; - -void bar() { - static foo baz; -} - -int main() { - try { - bar(); // must throw - } - catch (bool) { - try { - bar(); // must throw again! - } - catch (bool) { - return 0; - } - } - abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init8.C b/gcc/testsuite/g++.old-deja/g++.other/init8.C deleted file mode 100644 index 80df498e6e1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init8.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: - -// submitted by David C Binderman <dcb@pncl.co.uk> - -// According to [dcl.init]/9, this should be ill-formed - -void -f() -{ - const int var [ 10 ]; // ERROR - missing initializer -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init9.C b/gcc/testsuite/g++.old-deja/g++.other/init9.C deleted file mode 100644 index 5626174bbe4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/init9.C +++ /dev/null @@ -1,40 +0,0 @@ -// Build don't link: - -// Based on a testcase submitted by Tudor Hulubei <tudor@cs.unh.edu> - -// X is not a POD because it has a user-defined destructor. -// Therefore, we can't cross its initialization. - -// vector<int> is not even an aggregate; nevertheless, no error is -// reported... - -struct A { - A() {} -}; - -void a() { - goto bar; // ERROR - jump from here - A x; // ERROR - jump crosses initialization - bar: // ERROR - jump to here - ; -} - -struct X { - ~X() {} -}; - -void b() { - goto bar; // ERROR - jump from here - X x; // ERROR - jump crosses initialization - bar: // ERROR - jump to here - ; -} - -#include <vector> - -void c() { - goto bar; // ERROR - jump from here - vector<int> x; // ERROR - jump crosses initialization - bar: // ERROR - jump to here - ; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lineno1.C b/gcc/testsuite/g++.old-deja/g++.other/lineno1.C deleted file mode 100644 index ab003e0ff95..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lineno1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Submitted by Nathan Sidwell <nathan@acm.org> -// Bug: g++ was giving the wrong line number for statics. -// Special g++ Options: -w - -class A -{ - A(); // ERROR - private - ~A(); // ERROR - private -}; - -static A a; // ERROR - here - - - diff --git a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C b/gcc/testsuite/g++.old-deja/g++.other/lineno2.C deleted file mode 100644 index 4d64d1abf1a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Submitted by Nathan Sidwell <nathan@acm.org> -// Bug: g++ wasn't listing candidates for a failed conversion. - -void f(int, double); // ERROR - candidate -void f(double, int); // ERROR - candidate -void f(int); // ERROR - candidate - -int -main () -{ - void (*ptr)(int, int); - - ptr = &f; // ERROR - no match -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C deleted file mode 100644 index 65a2848a2b1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C +++ /dev/null @@ -1,14 +0,0 @@ -typedef struct { - int i; -} *p; - -void f (p) { } // ERROR - function uses anonymous type -p q; - -int main() -{ - extern p j; - struct A { int j; }; - extern A a; // ERROR - extern uses local type - extern void f (A); // ERROR - extern uses local type -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage2.C b/gcc/testsuite/g++.old-deja/g++.other/linkage2.C deleted file mode 100644 index c9b6e2a3d62..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/linkage2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> -extern "C" -{ -typedef struct {int dummy[10];} *GDBM_FILE; -extern GDBM_FILE gdbm_open(); -} - -typedef struct { int dummy[10]; } *FAIL_FILE; -extern FAIL_FILE fail_open(); // ERROR - non-local function - -typedef struct { int dummy[10]; } *SUCCESS_FILE, S; -extern SUCCESS_FILE success_open(); - diff --git a/gcc/testsuite/g++.old-deja/g++.other/local1.C b/gcc/testsuite/g++.old-deja/g++.other/local1.C deleted file mode 100644 index d0ed4f04e2e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/local1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't run: - -struct Outer { - virtual ~Outer() {} -}; - -int -main() -{ - { struct Inner : virtual public Outer {} inner; } - { struct Inner : virtual public Outer {} inner; } -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/local2.C b/gcc/testsuite/g++.old-deja/g++.other/local2.C deleted file mode 100644 index 2d17b33e601..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/local2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Special g++ Options: -O2 - -void f () -{ - struct Init { - Init () { - } - }; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup1.C b/gcc/testsuite/g++.old-deja/g++.other/lookup1.C deleted file mode 100644 index f3ea5ebbb72..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup1.C +++ /dev/null @@ -1,9 +0,0 @@ -// simple test for id from base class during class defn -// Build don't link: - -struct foo { - enum { blah = 1 }; -}; -struct bar : public foo { - char cache[blah]; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup10.C b/gcc/testsuite/g++.old-deja/g++.other/lookup10.C deleted file mode 100644 index da2b485c5d3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup10.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -struct A { - struct B { - static int i; - }; - enum { a }; -}; - -int A::B::i = a; diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup11.C b/gcc/testsuite/g++.old-deja/g++.other/lookup11.C deleted file mode 100644 index 61a6e91d545..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup11.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: - -namespace A { - int i; -} -using namespace A; -namespace B { - int i; -} -using namespace B; - -int i; diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup12.C b/gcc/testsuite/g++.old-deja/g++.other/lookup12.C deleted file mode 100644 index 5c3143cdf33..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup12.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// Origin: Mark Mitchell <mark@codesourcery.com> - -struct B { - struct X {}; -}; - - -struct D : public B { - void X(); - - struct X x; - - void f(); -}; - - -void D::f() -{ - struct X y; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup13.C b/gcc/testsuite/g++.old-deja/g++.other/lookup13.C deleted file mode 100644 index 0c1e5460c4f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup13.C +++ /dev/null @@ -1,18 +0,0 @@ -// Origin: Mark Mitchell <mark@codesourcery.com> - -int main() -{ - typedef double I; - - struct S1 { - typedef char I; - - struct S2; - }; - - struct S1::S2 { - typedef I J; - }; - - return !(sizeof (S1::S2::J) == 1); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup14.C b/gcc/testsuite/g++.old-deja/g++.other/lookup14.C deleted file mode 100644 index 5c81c44815a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup14.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Origin: Mark Mitchell <mark@codesourcery.com> - -union U { - typedef int I; - - struct S { - void f(); - }; -}; - -void U::S::f() { - I i; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup15.C b/gcc/testsuite/g++.old-deja/g++.other/lookup15.C deleted file mode 100644 index be9096a3be1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup15.C +++ /dev/null @@ -1,37 +0,0 @@ -// Build don't link: -// Origin: Benjamin Kosnik <bkoz@cygnus.com> - -class b -{ - int j; -public: - b(int a = 6): j(a) {} - void imbue(int a) {++j;} -}; - -class d: public b -{ - int k; -public: - d(int a = 7): b(a), k(a) {} - void imbue(int a) {++k;} -}; - -//virtual public kills, public ok -class mostd: virtual public d -{ - int l; -public: - mostd(int a = 9): d(a), l(a) {} -}; - -int main() { - - d dobj; - dobj.imbue(5); - - mostd mobj; - mobj.imbue(5); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup2.C b/gcc/testsuite/g++.old-deja/g++.other/lookup2.C deleted file mode 100644 index 0772399222d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -struct B { - int i; -}; - -struct D: virtual public B { - int i; -}; - -struct D2 : public D { - void f() { i = 3; } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup3.C b/gcc/testsuite/g++.old-deja/g++.other/lookup3.C deleted file mode 100644 index 347be4e295a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup3.C +++ /dev/null @@ -1,17 +0,0 @@ -// Test to make sure that the use of __typeof__ in WIFEXITED works. - -int main () -{ - int stat_loc = 0; - (__extension__ - ({ - union - { - __typeof__ (stat_loc) __in; - int __i; - } __u; - __u.__in = (stat_loc); - __u.__i; - }) - ); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup4.C b/gcc/testsuite/g++.old-deja/g++.other/lookup4.C deleted file mode 100644 index 59b7a75b2bd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup4.C +++ /dev/null @@ -1,21 +0,0 @@ -// Test for proper handling of references to overloaded member functions. - -struct A { - static void f (int) { } - void f (); -}; - -void (*p)(int) = &A::f; - -void A::f () -{ - p = f; -} - -int main() -{ - A a; - p = &a.f; - (a.f)(); - (a.f)(42); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup5.C b/gcc/testsuite/g++.old-deja/g++.other/lookup5.C deleted file mode 100644 index 9fe04151142..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup5.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// Simplified from bug report by Paris Smaragdis <paris@media.mit.edu> - -// crash test - XFAIL *-*-* - -template <class T> class vector {}; -class foo {}; -int main() { - foo f; - f.vector(); // ERROR - not a method -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup6.C b/gcc/testsuite/g++.old-deja/g++.other/lookup6.C deleted file mode 100644 index 08f5ac521ed..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup6.C +++ /dev/null @@ -1,25 +0,0 @@ -int f(int i) -{ - struct C { - int i; - C () : i(1) {} - int f() { - struct D { - int i; - D () : i(2) {} - int g() { return i; } - } d; - - return d.g(); - } - } c; - - return c.f(); -} - - -int main() -{ - if (f(0) != 2) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup7.C b/gcc/testsuite/g++.old-deja/g++.other/lookup7.C deleted file mode 100644 index 55726a5d613..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup7.C +++ /dev/null @@ -1,12 +0,0 @@ -// Test for handling of type shadowing in function scope. - -int main() -{ - int A = 42; - struct A - { - enum { a }; - }; - A = A::a; - return A; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup8.C b/gcc/testsuite/g++.old-deja/g++.other/lookup8.C deleted file mode 100644 index f81572ab260..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup8.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -struct S { - int A; - struct A { - enum { a = 0 }; - }; - - void f(); -}; - -void S::f() { - A = A::a; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup9.C b/gcc/testsuite/g++.old-deja/g++.other/lookup9.C deleted file mode 100644 index 250040071d2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/lookup9.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct S { - typedef long I; -}; - -struct D : virtual public S { - I i; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/loop1.C b/gcc/testsuite/g++.old-deja/g++.other/loop1.C deleted file mode 100644 index 3380dd4d74d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/loop1.C +++ /dev/null @@ -1,30 +0,0 @@ -// Test for bad loop optimization of goto fixups. -// Special g++ Options: -O2 - -typedef bool (*ftype) (); - -int c, d; -struct A { - A() { ++c; } - A(const A&) { ++c; } - ~A() { ++d; } -}; - -void f (ftype func) -{ - A a; - do { - if ((*func)()) return; - } while (true); -} - -bool test () -{ - return true; -} - -main () -{ - f (test); - return (c != d); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/main1.C b/gcc/testsuite/g++.old-deja/g++.other/main1.C deleted file mode 100644 index 09ab4113f9d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/main1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't linK: - -int main() -{ // ERROR - invalid redeclaration of - return 0; -} - - -int main(int, const char**) -{ // ERROR - as - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/mangle1.C b/gcc/testsuite/g++.old-deja/g++.other/mangle1.C deleted file mode 100644 index 0ffc5d1a262..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/mangle1.C +++ /dev/null @@ -1,42 +0,0 @@ -// Test for proper mangling by setting up name clashes. -// Special g++ Options: -fno-squangle - -class A { }; -typedef A A2; -typedef int I; -typedef void V; -typedef I I2; - -void f (const A2&, int, const A2&, const A&) { } // ERROR - name clash -int f__FRC1AiT0T0 = 0; // ERROR - name clash - -void f (int, long, int, I) { } // ERROR - name clash -int f__Filii = 0; // ERROR - name clash - -void f (I, float, I, I2) { } // ERROR - name clash -int f__Fifii = 0; // ERROR - name clash - -void f (void*, float, void*, V*) { } // ERROR - name clash -int f__FPvfT0T0 = 0; // ERROR - name clash - -void f (wchar_t) { } // ERROR - name clash -int f__Fw = 0; // ERROR - name clash - -void f(int, A, A2, A) { } // ERROR - name clash -int f__FiG1AN21 = 0; // ERROR - name clash - -void f(const A2&, const A2&, const A2&, const A2&, - int&) { } // ERROR - name clash -int f__FRC1AN30Ri = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, - int&) { } // ERROR - name clash -int f__FRC1AiT0N20Ri = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, int&, int&, - int&) { } // ERROR - name clash -int f__FRC1AiT0N20RiN25 = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, int, int, - int) { } // ERROR - name clash -int f__FRC1AiT0N20iii = 0; // ERROR - name clash diff --git a/gcc/testsuite/g++.old-deja/g++.other/mangle2.C b/gcc/testsuite/g++.old-deja/g++.other/mangle2.C deleted file mode 100644 index 873cb369e76..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/mangle2.C +++ /dev/null @@ -1,42 +0,0 @@ -// Test for proper mangling by setting up name clashes. -// Special g++ Options: -fsquangle - -class A; -typedef A A2; -typedef int I; -typedef void V; -typedef I I2; - -void f (const A2&, int, const A2&, const A&) { } // ERROR - name clash -int f__FRC1AiRCB0n1 = 0; // ERROR - name clash - -void f (int, long, int, I) { } // ERROR - name clash -int f__Filii = 0; // ERROR - name clash - -void f (I, float, I, I2) { } // ERROR - name clash -int f__Fifii = 0; // ERROR - name clash - -void f (void*, float, void*, V*) { } // ERROR - name clash -int f__FPvfPvn1 = 0; // ERROR - name clash - -void f (wchar_t) { } // ERROR - name clash -int f__Fw = 0; // ERROR - name clash - -void f(int, A, A2, A) { } // ERROR - name clash -int f__FiG1An2 = 0; // ERROR - name clash - -void f(const A2&, const A2&, const A2&, const A2&, - int&) { } // ERROR - name clash -int f__FRC1An3Ri = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, - int&) { } // ERROR - name clash -int f__FRC1AiRCB0n2Ri = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, int&, int&, - int&) { } // ERROR - name clash -int f__FRC1AiRCB0n2Rin2 = 0; // ERROR - name clash - -void f(const A2&, int, const A2&, const A2&, const A2&, int, int, - int) { } // ERROR - name clash -int f__FRC1AiRCB0n2in2 = 0; // ERROR - name clash diff --git a/gcc/testsuite/g++.old-deja/g++.other/mutable1.C b/gcc/testsuite/g++.old-deja/g++.other/mutable1.C deleted file mode 100644 index 3fd0c3e6b7c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/mutable1.C +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 1999 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 14 Jan 1999 <nathan@acm.org> - -// Make sure objects with mutable members are never placed in a read only -// section. - -// All these are POD structs, and hence do not need ctors -struct A { mutable int i; }; -struct B { A a; }; -struct C { A a[1]; }; -struct D { static A const a; }; - -// all these are static consts and hence naively suitable for a read only -// section. But they contain a mutable, so must be in a writable section. -static int const i = 0; -static A const a = {0}; -static B const b = {{0}}; -static C const c = {{{0}}}; -static A const aa[] = {{0}}; -static B const bb[] = {{{0}}}; -static C const cc[] = {{{{0}}}}; -A const D::a = {0}; - -int main() -{ - a.i = 05; - b.a.i = 05; - c.a[0].i = 05; - aa[0].i = 05; - bb[0].a.i = 05; - cc[0].a[0].i = 05; - D::a.i = 05; - - if(!a.i) return 1; - if(!b.a.i) return 1; - if(!c.a[0].i) return 1; - if(!aa[0].i) return 1; - if(!bb[0].a.i) return 1; - if(!cc[0].a[0].i) return 1; - if(!D::a.i) return 1; - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/nested1.C b/gcc/testsuite/g++.old-deja/g++.other/nested1.C deleted file mode 100644 index 0c038561d66..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/nested1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: - -struct C -{ - struct D - { - }; -}; - -struct E -{ - C& c; - void g(); -}; - -void E::g() -{ - c.D().f(); // ERROR - no matching function -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/nested2.C b/gcc/testsuite/g++.old-deja/g++.other/nested2.C deleted file mode 100644 index 5492b536b43..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/nested2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// by Bert Bril <bert@dgb.nl> - -struct M1 { - struct I {}; -}; - -struct M2 { - struct I {}; - struct J : virtual public M2::I, - virtual public M1::I {}; -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/nested3.C b/gcc/testsuite/g++.old-deja/g++.other/nested3.C deleted file mode 100644 index 783caadd285..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/nested3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// Origin: Chip Salzenberg <chip@perlsupport.com> - -class Foo { - public: - class Bar; -}; - -class Foo::Bar { - public: - Bar() {} -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/new.C b/gcc/testsuite/g++.old-deja/g++.other/new.C deleted file mode 100644 index e2839578d15..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/new.C +++ /dev/null @@ -1,57 +0,0 @@ -// Build don't link: - -typedef __SIZE_TYPE__ size_t; -inline void * -operator new(size_t alloc_sz, const char *fname, unsigned lineno) -{ -} -inline void * -operator new[](size_t alloc_sz, const char *fname, unsigned lineno) -{ -} -inline void -operator delete(void *ptr, const char *fname, unsigned lineno) -{ -} -inline void -operator delete[](void *ptr, const char *fname, unsigned lineno) -{ -} - -class DEF { -public: - DEF( DEF *parent=0, const char *name=0 ); -}; - -class ABC -{ -public: - enum stuff { ID0, ID1 }; - ABC( stuff, DEF *parent=0, const char *name=0 ); -}; - -class GHI : public DEF -{ -}; - -class LMNFrame; -class LMN : public DEF -{ - friend class LMNFrame; - public: -public: - LMN(); -private: - LMNFrame *draw_area; - - ABC *scroll_h; -}; -class LMNFrame : public GHI { -}; -LMN::LMN() -{ - draw_area = new ("abc", 69) LMNFrame; - - scroll_h = new ("def", 71) ABC(ABC::ID0, this); -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/new2.C b/gcc/testsuite/g++.old-deja/g++.other/new2.C deleted file mode 100644 index 9a6e0514ff4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/new2.C +++ /dev/null @@ -1,21 +0,0 @@ -//Build don't link: -typedef __SIZE_TYPE__ size_t; -void *operator new(size_t, unsigned int); - -struct X{ - X(); - X(int); -}; - - -void f(X *x = new X); // ERROR - - -void f(X *x = new X(4)); // ERROR - - -void f(X *x = new X[4]); // ERROR - - -void f(X *x = new (3) X(6)); // ERROR - - -void f(X *x = new (2) X[10]); // ERROR - - -void f(X *x = new X[10][5]); // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.other/new3.C b/gcc/testsuite/g++.old-deja/g++.other/new3.C deleted file mode 100644 index fa32cdde6cb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/new3.C +++ /dev/null @@ -1,25 +0,0 @@ -typedef __SIZE_TYPE__ size_t; - -template <class T> -struct A -{ - int size; - A () - { - T *p; - p = new T[size]; - int foo; - foo = 5 * size; - }; -}; - -struct B -{ - virtual ~B() { } - void operator delete [] (void *ptr, size_t size) { } -}; - -int main () -{ - A<B> *p = new A<B>; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/null1.C b/gcc/testsuite/g++.old-deja/g++.other/null1.C deleted file mode 100644 index 22d08a40aef..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/null1.C +++ /dev/null @@ -1,41 +0,0 @@ -// Build don't run: - -#include <cstddef> - -void g(int) {} -void g(long) {} -extern void g(void*); - -template <int I> -void h() {} - -void k(int) {} - -template <class T> -void l(T); - -template <> -void l(int) {} - -int main() -{ - int i = NULL; // WARNING - converting NULL to non-pointer type - float z = NULL; // WARNING - converting NULL to non-pointer type - int a[2]; - - i != NULL; // WARNING - NULL used in arithmetic - NULL != z; // WARNING - NULL used in arithmetic - k != NULL; // No warning: decay conversion - NULL != a; // Likewise. - -NULL; // WARNING - converting NULL to non-pointer type - +NULL; // WARNING - converting NULL to non-pointer type - ~NULL; // WARNING - converting NULL to non-pointer type - a[NULL] = 3; // WARNING - converting NULL to non-pointer-type - i = NULL; // WARNING - converting NULL to non-pointer type - z = NULL; // WARNING - converting NULL to non-pointer type - k(NULL); // WARNING - converting NULL to int - g(NULL); // WARNING - converting NULL to int - h<NULL>(); // WARNING - NULL bound to integer template parameter - l(NULL); // WARNING - converting NULL to int - NULL && NULL; // No warning: converting NULL to bool is OK -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/null2.C b/gcc/testsuite/g++.old-deja/g++.other/null2.C deleted file mode 100644 index 9dc5b130914..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/null2.C +++ /dev/null @@ -1,12 +0,0 @@ -// Based on a testcase by Eric Dumazet <Eric.Dumazet@COSMOSBAY.COM> - -#include <cstdlib> - -const char * const foo = ""; // foo is not NULL - -int main() { - if ((foo == 0) ? 0 : foo) // so this should evaluate to `foo' - return 0; - else - std::abort(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/null3.C b/gcc/testsuite/g++.old-deja/g++.other/null3.C deleted file mode 100644 index aef456e974a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/null3.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: - -void x() -{ - int* p = 1==0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overcnv1.C b/gcc/testsuite/g++.old-deja/g++.other/overcnv1.C deleted file mode 100644 index 05941df5ff0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overcnv1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -class A { -public: - void f(const char * const * ); -}; -void f(const char * const *) {} - -void g() -{ - char *ar[10]; - A a; - f(ar); - a.f(ar); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C b/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C deleted file mode 100644 index 725ce0991ce..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C +++ /dev/null @@ -1,18 +0,0 @@ -// Test that we resolve this case as mandated by the standard, but also -// warn about it. We choose op char* not because it is a member of B -- -// the standard says that all conversion ops are treated as coming from -// the type of the argument -- but because it is non-const. - -struct A { - operator const char *() const; -}; - -struct B : public A { - operator char *() { return 0; } -}; - -int main() -{ - B b; - (const char *)b; // WARNING - surprising overload resolution -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload1.C b/gcc/testsuite/g++.old-deja/g++.other/overload1.C deleted file mode 100644 index 59191d501e2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload1.C +++ /dev/null @@ -1,11 +0,0 @@ -struct A { - A operator+ (int) const { return *this; } -}; - -A operator+ (A, float); - -int main () -{ - A a; - a + 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload2.C b/gcc/testsuite/g++.old-deja/g++.other/overload2.C deleted file mode 100644 index 598f71c821e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload2.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't run: - -template <class T> -class ConstArray { -}; - -template <class T1, class T2> -void operator+(const ConstArray<T1>&, const ConstArray<T2>&) -{ -} - -template <class T1, class T2> -void operator+(const ConstArray<T1>&, T2); - -template <class T1, class T2> -void operator+(T1, const ConstArray<T2>&); - -const ConstArray<int> cai() { return ConstArray<int>(); } -const ConstArray<double> cad() { return ConstArray<double>(); } - -int main() -{ - cai () + cad (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload3.C b/gcc/testsuite/g++.old-deja/g++.other/overload3.C deleted file mode 100644 index fc1d5c09d61..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload3.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't run: - -void f(const int *); -void f(int *) {} - -void f2(const volatile int *); -void f2(volatile int *) {} - -int i; - -int main() -{ - f(&i); - f2(&i); -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload4.C b/gcc/testsuite/g++.old-deja/g++.other/overload4.C deleted file mode 100644 index 22478531b95..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't run: - -void f(int* const volatile * const * const*); -void f(int* const * const * const*) {} - -int main() -{ - int*** ip; - f(&ip); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload5.C b/gcc/testsuite/g++.old-deja/g++.other/overload5.C deleted file mode 100644 index 5f5e11f9dd1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload5.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't run: - -struct S {}; - -struct T : public S {}; - -struct U : public T {}; - -void f(int T::*) {} -void f(int U::*); - -void g(void (T::*)(int)) {} -void g(void (U::*)(int)); - -int main() -{ - int S::*ip; - void (S::*fp)(int); - - f(ip); - g(fp); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload6.C b/gcc/testsuite/g++.old-deja/g++.other/overload6.C deleted file mode 100644 index fae26c34824..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload6.C +++ /dev/null @@ -1,18 +0,0 @@ -extern "C" void abort(); - -struct S1 -{ - int f() { return 0; } - int f() const { return 1; } -}; - -struct S2 : public S1 -{ -}; - -int main() -{ - S2 s2; - if (s2.f() != 0) - abort (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload7.C b/gcc/testsuite/g++.old-deja/g++.other/overload7.C deleted file mode 100644 index 57bec8bed2d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload7.C +++ /dev/null @@ -1,22 +0,0 @@ -// Check that object call works when there are multiple conversion ops -// returning the same type. - -typedef int (*pfn)(); - -int zero () { return 0; } -int one () { return 1; } -int two () { return 2; } - -struct A { - A() { } - operator pfn () { return one; } - operator pfn () const { return zero; } - operator pfn () volatile { return two; } -}; - -int -main () -{ - const A a; - return a(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload8.C b/gcc/testsuite/g++.old-deja/g++.other/overload8.C deleted file mode 100644 index d2c1483a9b2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload8.C +++ /dev/null @@ -1,22 +0,0 @@ -class a { -public: - int f() { return 0; } - int f() const { return 1; } -}; - -class b : public a { -}; - -int main() -{ - int (b::* ptr1)() = &b::f; - int (b::* ptr2)() const = &b::f; - - b ao; - - if ((ao.*ptr1)() != 0) - return 1; - if ((ao.*ptr2)() != 1) - return 1; -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload9.C b/gcc/testsuite/g++.old-deja/g++.other/overload9.C deleted file mode 100644 index 521f4bd4d06..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/overload9.C +++ /dev/null @@ -1,31 +0,0 @@ -struct T { ~T() {}; }; - -int g () -{ - foo: - T t; - int f(int); - bar: - T t2; - int f(double); - return f(3); -} - - -int f(int) -{ - return 0; -} - - -int f(double) -{ - return 1; -} - - -int main() -{ - return g(); -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/parse1.C b/gcc/testsuite/g++.old-deja/g++.other/parse1.C deleted file mode 100644 index d81751289f0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/parse1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Test that we save declspecs before a class defn properly. -// Build don't link: - -static volatile union { - void f() { } -} u; diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf1.C b/gcc/testsuite/g++.old-deja/g++.other/pmf1.C deleted file mode 100644 index e84a39a03f1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf1.C +++ /dev/null @@ -1,8 +0,0 @@ -struct foo {}; -typedef long unsigned int & (foo::*pmf)(void); -void fn (...) {} -int main () -{ - pmf y = 0; - fn (y); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf2.C b/gcc/testsuite/g++.old-deja/g++.other/pmf2.C deleted file mode 100644 index 92935c0e451..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf2.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: - -// submitted by David C Binderman <dcb@pncl.co.uk> - -struct S -{ - void f(); -}; - -void (S ::* pmf) (); - -S * pf; - -void -f() -{ - pmf = & pf->f; // ERROR - not a valid pmf expression -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C deleted file mode 100644 index 237812246e5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C +++ /dev/null @@ -1,24 +0,0 @@ -// Submitted by Nathan Sidwell <nathan@acm.org> -// Bug: g++ was crashing after giving errors. - -template<class T> - void connect_to_method( - T *receiver, - void (T::*method)()) - {} - -class Gtk_Base -{ -public: - void expose(); - void show(); - void show(int); - Gtk_Base(); -}; - - -Gtk_Base::Gtk_Base() -{ - connect_to_method(this,&show); // ERROR - invalid pmf expression - connect_to_method(this,&expose); // ERROR - invalid pmf expression -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/printf1.C b/gcc/testsuite/g++.old-deja/g++.other/printf1.C deleted file mode 100644 index 04c4d9f8de5..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/printf1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wall - -struct a -{ - void x(char *f,...) __attribute__((format(printf,2,3))); -}; - -int main() -{ - a A; - A.x("%d"); // WARNING - too few arguments for format - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C deleted file mode 100644 index 1b5d5df8e39..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -class x -{ -public: - virtual int is_constant(); -}; - -void foo() -{ - x* y; - if (y->is_constant) // ERROR - assuming & - { - } -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C deleted file mode 100644 index 85730952d0c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C +++ /dev/null @@ -1,15 +0,0 @@ -class cow { -public: - void moo (char *); -}; - -void f() -{ - cow* c; - - void (cow::*fp0)(char*) = &cow::moo; // OK - void (cow::*fp1)(int) = &cow::moo; // ERROR - conversion - int (cow::*fp2)(char*) = &cow::moo; // ERROR - conversion - int (cow::*fp3)(char*, void*) = fp2; // ERROR - conversion - int (cow::*fp4)(double) = (int (cow::*)(double)) fp2; // OK -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C deleted file mode 100644 index 3f6a2afca0e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: - -class c { - void (c::*x)(); -public: - void f() { this->x(); } // ERROR - pointer-to-member -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C deleted file mode 100644 index dc378b23e6f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C +++ /dev/null @@ -1,12 +0,0 @@ -// Test to make sure g++ can handle target types that aren't identical -// with pointers to members. - -struct A { int i; }; -struct B : public A { }; - -int main () -{ - int A::*p = &A::i; - const int B::*q = &A::i; - return p != q; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/realloc.C b/gcc/testsuite/g++.old-deja/g++.other/realloc.C deleted file mode 100644 index 1e1c6db8aa4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/realloc.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -extern "C" void realloc(); - -class bug { -public: - void realloc(int foo,int bar); -}; - -void f() { - bug c; - c.realloc(50,50); -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl1.C b/gcc/testsuite/g++.old-deja/g++.other/redecl1.C deleted file mode 100644 index d08e5aa9088..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/redecl1.C +++ /dev/null @@ -1,6 +0,0 @@ -//Build don't link: -struct X{ - void i(); - void i(int); // ERROR - - int i; // ERROR - conflict -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl2.C b/gcc/testsuite/g++.old-deja/g++.other/redecl2.C deleted file mode 100644 index 7dcdeb4cbe8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/redecl2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct S { - S(int); - S(int); // ERROR - already declared - - ~S(); - ~S(); // ERROR - already declared -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/ref1.C b/gcc/testsuite/g++.old-deja/g++.other/ref1.C deleted file mode 100644 index b6d82aa25ca..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/ref1.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: - -int f(); - -void g() -{ - const int& i = f(); // OK - int& j = f(); // ERROR - initialization of non-const reference - const volatile int& k = f(); // ERROR - initialization of volatile ref -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti1.C b/gcc/testsuite/g++.old-deja/g++.other/rtti1.C deleted file mode 100644 index 7377e156dba..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rtti1.C +++ /dev/null @@ -1,121 +0,0 @@ -// test of rtti of non-class types -// Special g++ Options: -frtti - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -int i; -short s; -char c; -long l; - -unsigned int ui; -unsigned short us; -unsigned char uc; -unsigned long ul; - -float f; -double d; - -int& ri = i; -const volatile int cvi = 10; -volatile const int vci = 20; -const int ci = 100; - -int *pi; -int ai[10]; - -enum color { red, blue, green, yellow}; - -int (*fp)(); -int (*gp)(); -int (*hp)(int); - -class XX { -public: - int xxi; - float xxf; - int xxf1 () {}; - int xxf2 (int k) {}; -}; - -class YY { -public: - int yyi; - double yyd; - int yyf1 (float f) {}; - double yyf2 () {return yyd;}; -}; - -int XX::*ptmd1; -int XX::*ptmd2; -float XX::*ptmd3; -int YY::*ptmd4; - -int (XX::*ptmf1) (); -int (XX::*ptmf2) (); -int (XX::*ptmf3) (int); -int (YY::*ptmf4) (); - -int func1 () -{ return 0;} - -int func2 () -{ return 1;} - -int func3 (int i) -{ return i;} - -short func4 () -{ return 99;} - -void error (int i) -{ - exit(i); -} - -int main () -{ - if (typeid(i) != typeid(int)) error(1); - if (typeid(s) != typeid(short)) error(2); - if (typeid(c) != typeid(char)) error(3); - if (typeid(l) != typeid(long)) error(4); - if (typeid(ui) != typeid(unsigned int)) error(5); - if (typeid(us) != typeid(unsigned short)) error(6); - if (typeid(uc) != typeid(unsigned char)) error(7); - if (typeid(ul) != typeid(unsigned long)) error(8); - if (typeid(f) != typeid(float)) error(9); - if (typeid(d) != typeid(double)) error(10); - - if (typeid(*pi) != typeid(int)) error(51); - if (typeid(pi) == typeid(ai)) error(52); - if (typeid(ri) != typeid(i)) error(53); - if (typeid(cvi) != typeid(vci)) error (54); - if (typeid(vci) != typeid(i)) error(55); - if (typeid(ci) != typeid(cvi)) error (56); - if (typeid(ci) != typeid(const int)) error(57); - - if (typeid(func1) != typeid(func2)) error (81); - if (typeid(func2) == typeid(func3)) error (82); - if (typeid(func1) == typeid(func4)) error (83); - if (typeid(func3) == typeid(func4)) error (84); - - if (typeid(red) != typeid(color)) error (101); - if (typeid(green) != typeid(blue)) error (102); - - if (typeid(fp) != typeid(gp)) error (103); - if (typeid(gp) == typeid(hp)) error (104); - - if (typeid(ptmd1) != typeid(ptmd2)) error (105); - if (typeid(ptmd1) == typeid(ptmd3)) error (106); - if (typeid(ptmd2) == typeid(ptmd4)) error (107); - - if (typeid(ptmf1) != typeid(ptmf2)) error (108); - if (typeid(ptmf2) == typeid(ptmf3)) error (109); - if (typeid(ptmf1) == typeid(ptmf4)) error (110); - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti2.C b/gcc/testsuite/g++.old-deja/g++.other/rtti2.C deleted file mode 100644 index a7a218b06e6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rtti2.C +++ /dev/null @@ -1,88 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance classes -// Special g++ Options: -frtti - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; -}; - -class Y : public X { - short ys; -}; - -class Z : public Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { - public: - int Ai; -}; - -class B { - public: - int Bi; -}; - -class D : public A, public B { - int Di; -}; - -/* -class E : public D, public B { - int Ei; -}; -*/ -class E { - int Ei; -}; - -class F : public E, public D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = &d; -F f; -A *aap = &f; -D *dp = &f; -B *bbp = dp; - -void *vp = zp; - -void error (int i) -{ - exit(i); -} - -int main () -{ - if (typeid(z) != typeid(Z)) error(1); - if (typeid(*yp) == typeid(Z)) error(2); - if (typeid(*yp) == typeid(*zp)) error(3); - if (typeid(xp) == typeid(yp)) error(4); - - xp = (X *)&y; - if (typeid(*xp) == typeid(*yp)) error(5); - if (typeid(*xp) == typeid(Y)) error(6); - - if (typeid(*ap) == typeid(*bp)) error (31); - if (typeid(*ap) == typeid(D)) error(32); - - if (typeid(*aap) == typeid(*bbp)) error(33); - if (typeid(*dp) == typeid(*aap)) error(34); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti3.C b/gcc/testsuite/g++.old-deja/g++.other/rtti3.C deleted file mode 100644 index fdb1f9e090d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rtti3.C +++ /dev/null @@ -1,96 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance with -// virtual functions -// Special g++ Options: -frtti - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; - virtual int f() {}; -}; - -class Y : public X { - short ys; -}; - -class Z : public Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { - public: - int Ai; - virtual int a() {}; -}; - -class B { - public: - int Bi; - virtual int g() {}; -}; - -class D : public A, public B { - int Di; -}; - -/* -class E : public D, public B { - int Ei; -}; -*/ -class E { - int Ei; -}; - -class F : public E, public D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = &d; -D *dp = &d; -F f; -A *aap = &f; -B *bbp = &f; - -void *vp = zp; - -void error (int i) -{ - exit(i); -} - -int main () -{ - if (typeid(z) != typeid(Z)) error(1); - if (typeid(*yp) != typeid(Z)) error(2); - if (typeid(*yp) != typeid(*zp)) error(3); - if (typeid(xp) == typeid(yp)) error(4); - - xp = (X *)&y; - if (typeid(*xp) == typeid(*yp)) error(5); - if (typeid(*xp) != typeid(Y)) error(6); - - if (typeid(*ap) != typeid(*bp)) error (31); - if (typeid(*ap) != typeid(D)) error(32); - vp = dp; - vp = dynamic_cast<void*> ((B *)vp); - if (dp != (D *)vp) error(35); - - dp = (D *)&f; - if (typeid(*aap) != typeid(*bbp)) error(37); - if (typeid(*dp) != typeid(*aap)) error(38); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti4.C b/gcc/testsuite/g++.old-deja/g++.other/rtti4.C deleted file mode 100644 index 571ed68fd9f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rtti4.C +++ /dev/null @@ -1,86 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance with -// virtual inheritance -// Special g++ Options: -frtti -w - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; - virtual int f() {}; -}; - -class Y : public virtual X { - short ys; -}; - -class Z : public virtual Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { -public: - int Ai; - virtual int a() {}; -}; - -class B { -public: - int Bi; - virtual int g() {}; -}; - -class D : public virtual A, private B { - int Di; -}; - -class E : public virtual D, public B { - int Ei; -}; - -class F : public E, public virtual D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = (B *)&d; -F f; -A *aap = &f; -D *dp = &f; -B *bbp = (B *)dp; - -void *vp = zp; - -void error (int i) -{ - exit(i); -} - -int main () -{ - if (typeid(z) != typeid(Z)) error(1); - if (typeid(*yp) != typeid(Z)) error(2); - if (typeid(*yp) != typeid(*zp)) error(3); - if (typeid(xp) == typeid(yp)) error(4); - - xp = (X *)&y; - if (typeid(*xp) == typeid(*yp)) error(5); - if (typeid(*xp) != typeid(Y)) error(6); - - if (typeid(*ap) != typeid(*bp)) error (31); - if (typeid(*ap) != typeid(D)) error(32); - if (typeid(*aap) != typeid(*bbp)) error(33); - if (typeid(*dp) != typeid(*aap)) error(34); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti5.C b/gcc/testsuite/g++.old-deja/g++.other/rtti5.C deleted file mode 100644 index 38a5146e8c9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rtti5.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Special g++ Options: -fno-rtti - -// Copyright (C) 1999 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 9 Apr 1999 <nathan@acm.org> -// derrived from bug report from Alexander Zvyagin <zvyagin@mx.ihep.su> - -// check we don't die with disabled rtti - - -int main(void) { - int i; - typeid(i); // ERROR - rtti disabled -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/rttid2.C b/gcc/testsuite/g++.old-deja/g++.other/rttid2.C deleted file mode 100644 index 50c1867c267..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rttid2.C +++ /dev/null @@ -1,100 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance classes -// dynamic casting -// Special g++ Options: -frtti - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; -}; - -class Y : public X { - short ys; -}; - -class Z : public Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { - public: - int Ai; -}; - -class B { - public: - int Bi; -}; - -class D : public A, public B { - int Di; -}; - -/* -class E : public D, public B { - int Ei; -}; -*/ -class E { - int Ei; -}; - -class F : public E, public D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = &d; -F f; -F *fp = &f; -A *aap = &f; -D *dp = &f; -B *bbp = dp; - -void *vp = zp; - -/* -void error (int i) -{ - printf("FAIL\n"); - exit(i); -} -*/ - -void error (int i) -{ - exit(i); -} - -int main () -{ - - vp = (void *)0; - - vp = dynamic_cast<Y *> (&z); - if (vp == 0) error(11); - - vp = dynamic_cast<X *> (yp); - if (vp == 0) error(12); - - vp = dynamic_cast<D *> (dp); - if (vp != (void *)dp) error(21); - - vp = dynamic_cast<B *> (fp); - if (vp != (void *)bbp) error(22); - -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/rttid3.C b/gcc/testsuite/g++.old-deja/g++.other/rttid3.C deleted file mode 100644 index 69b7fc5c38a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rttid3.C +++ /dev/null @@ -1,115 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance with -// virtual functions -// dynamic casting -// Special g++ Options: -frtti - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; - virtual int f() {}; -}; - -class Y : public X { - short ys; -}; - -class Z : public Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { - public: - int Ai; - virtual int a() {}; -}; - -class B { - public: - int Bi; - virtual int g() {}; -}; - -class D : public A, public B { - int Di; -}; - -/* -class E : public D, public B { - int Ei; -}; -*/ -class E { - int Ei; -}; - -class F : public E, public D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = &d; -D *dp = &d; -F f; -F *fp = &f; -A *aap = &f; -B *bbp = &f; - -void *vp = zp; - -/* -void error (int i) -{ - printf("FAIL\n"); - exit(i); -} -*/ - -void error (int i) -{ - exit(i); -} - -int main () -{ - vp = (void *)0; - - vp = dynamic_cast<Y *> (&z); - if (vp == 0) error(11); - - vp = dynamic_cast<Z *> (yp); - if (vp == 0) error(11); - - vp = dynamic_cast<X *> (yp); - if (vp == 0) error(12); - - vp = dynamic_cast<D *> (dp); - if (vp != (void *)dp) error(21); - - vp = dynamic_cast<B *> (dp); - if (vp == (void *)dp) error(21); - - vp = dynamic_cast<B *> (fp); - if (vp != (void *)bbp) error(22); - - vp = dynamic_cast<void *> (aap); - if (vp != (void *)fp) error(23); - - vp = dynamic_cast<B *> (aap); - if (vp != (void *)bbp) error(24); - -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/rttid4.C b/gcc/testsuite/g++.old-deja/g++.other/rttid4.C deleted file mode 100644 index 0b72bae1ee3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/rttid4.C +++ /dev/null @@ -1,111 +0,0 @@ -// test of rtti of single inheritance and multiple inheritance with -// virtual inheritance -// dynamic casting -// Special g++ Options: -w - -#include <typeinfo> - -extern "C" { - int printf(const char *, ...); - void exit(int); -} - -class X { - public: - int xi; - virtual int f() {}; -}; - -class Y : public virtual X { - short ys; -}; - -class Z : public virtual Y { - int zi; -}; - -Z z; -Y y; -Y *yp = &z; -X *xp = &z; -Z *zp = &z; - -class A { -public: - int Ai; - virtual int a() {}; -}; - -class B { -public: - int Bi; - virtual int g() {}; -}; - -class D : public virtual A, private B { - int Di; -}; - -class E : public virtual D, public B { - int Ei; -}; - -class F : public E, public virtual D { - int Fi; -}; - -D d; -A *ap = &d; -B *bp = (B *)&d; -F f; -F *fp = &f; -A *aap = &f; -D *dp = &f; -E *ep = &f; -B *bbp = (B *)dp; - -void *vp = zp; - -/* -void error (int i) -{ - printf("FAIL\n"); - exit(i); -} -*/ - -void error (int i) -{ - exit(i); -} - -int main () -{ - vp = (void *)0; - - vp = dynamic_cast<Y *> (&z); - if (vp == 0) error(11); - - vp = dynamic_cast<Z *> (yp); - if (vp == 0) error(11); - - vp = dynamic_cast<X *> (yp); - if (vp == 0) error(12); - - vp = dynamic_cast<D *> (dp); - if (vp != (void *)dp) error(21); - - // Ill-formed: dynamic_cast to private or ambiguous base - // vp = dynamic_cast<B *> (dp); - // if (vp == (void *)dp) error(21); - - // vp = dynamic_cast<B *> (fp); - // if (vp == (void *)bbp) error(22); - - vp = dynamic_cast<void *> (aap); - if (vp != (void *)fp) error(23); - - vp = dynamic_cast<B *> (aap); - if (vp == (void *)bbp) error(24); - -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/signed.C b/gcc/testsuite/g++.old-deja/g++.other/signed.C deleted file mode 100644 index 3bdce03a3e4..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/signed.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -// Copyright (C) 1999 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 24 Mar 1999 <nathan@acm.org> - -// Determine that function style casts are groked - -void fn() -{ - +char(5); - +short(5); - +int(5); - +long(5); - +signed(5); - +unsigned(5); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/singleton.C b/gcc/testsuite/g++.old-deja/g++.other/singleton.C deleted file mode 100644 index 075d83ac79a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/singleton.C +++ /dev/null @@ -1,38 +0,0 @@ -// This tests two things: -// 1. there is an annoying warning. -// singleton.C:26: warning: `class singleton' only defines private constructors and has no friends -// egcs fails to see that there is a public static accessor function. -// 2. the program crashes, because apparently the static variable s in -// singleton::instance() is considered constructed although the ctor -// exited via an exception. (crash changed to non-zero return here) - -class singleton { -public: - static singleton& instance() { - static singleton s; - return s; - } - int check() {return initialized;} - -private: - singleton() : initialized(1) { - if ( counter++ == 0 ) throw "just for the heck of it"; - initialized = 2; - } - singleton( const singleton& rhs ); - void operator=( const singleton& rhs ); - int initialized; - static int counter; -}; - -int singleton::counter; - -int main() -{ - while (1) { - try { - return singleton::instance().check()-2; - } catch (...) { } - } -} - diff --git a/gcc/testsuite/g++.old-deja/g++.other/sizeof1.C b/gcc/testsuite/g++.old-deja/g++.other/sizeof1.C deleted file mode 100644 index 6b547ae912e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/sizeof1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// Origin: Jason Merrill <jason@cygnus.com> - -struct X { - int f (); - int f (int); -}; - -void f(int i) -{ - i = sizeof(X::f); // ERROR - cannot take sizeof a member function -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/static1.C b/gcc/testsuite/g++.old-deja/g++.other/static1.C deleted file mode 100644 index c18e55c63dc..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/static1.C +++ /dev/null @@ -1,8 +0,0 @@ -extern "C" void abort(); - -struct S -{ - static const int i = 3; -}; - -const int S::i = 2; // ERROR - duplicate initialization diff --git a/gcc/testsuite/g++.old-deja/g++.other/static2.C b/gcc/testsuite/g++.old-deja/g++.other/static2.C deleted file mode 100644 index 471448d3300..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/static2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Based on a test case by Koos Vriezen <koos@polder.ubc.kun.nl> - -struct foo { - static void (*mystatic) (); -}; - -void bar(foo& t) { - t.mystatic (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/static3.C b/gcc/testsuite/g++.old-deja/g++.other/static3.C deleted file mode 100644 index b75771e76e2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/static3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: - -class S -{ - ~S(); -public: - friend void f(); -}; - - -S::~S() -{ - static S s; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/static4.C b/gcc/testsuite/g++.old-deja/g++.other/static4.C deleted file mode 100644 index 70213370b07..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/static4.C +++ /dev/null @@ -1,9 +0,0 @@ -// Origin: Andrew Pollard <andrew@odie.demon.co.uk> -// Special g++ Options: -O - -struct A { - A(int, int); -}; -A::A(int, int) {} -static A _A(0, 0); -int main() { return(0); } diff --git a/gcc/testsuite/g++.old-deja/g++.other/string1.C b/gcc/testsuite/g++.old-deja/g++.other/string1.C deleted file mode 100644 index 425e9bf817c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/string1.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// Origin: mrs@wrs.com (Mike Stump) - -class Wrapper { -public: - static const char msgPtr[]; - static const char *JunkFunc() { - return &msgPtr[0]; - } -}; - -const char Wrapper::msgPtr[] = "Hello world."; - -int main() { - const char *p1 = &Wrapper::msgPtr[0]; - const char *p2 = Wrapper::JunkFunc(); - - if (p1 != p2) - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/temporary1.C b/gcc/testsuite/g++.old-deja/g++.other/temporary1.C deleted file mode 100644 index 93cd7097783..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/temporary1.C +++ /dev/null @@ -1,40 +0,0 @@ -extern "C" int printf(char*, ...); - -int c, d; -class Foo -{ -public: - Foo() { printf("Foo() 0x%08lx\n", (unsigned long)this); ++c; } - Foo(Foo const &) { printf("Foo(Foo const &) 0x%08lx\n", (unsigned long)this); } - ~Foo() { printf("~Foo() 0x%08lx\n", (unsigned long)this); ++d; } -}; - -// Bar creates constructs a temporary Foo() as a default -class Bar -{ -public: - Bar(Foo const & = Foo()) { printf("Bar(Foo const &) 0x%08lx\n", (unsigned long)this); } -}; - -void fakeRef(Bar *) -{ -} - -int main() -{ - // Create array of Bar. Will use default argument on constructor. - // The old compiler will loop constructing Bar. Each loop will - // construct a temporary Foo() but will not destruct the Foo(). - // The Foo() temporary is destructed only once after the loop - // completes. This could lead to a memory leak if the constructor - // of Foo() allocates memory. - Bar bar[2]; - - fakeRef(bar); - - printf("Done\n"); - - if (c == d && c == 2) - return 0; - return 1; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/typeck1.C b/gcc/testsuite/g++.old-deja/g++.other/typeck1.C deleted file mode 100644 index 6dd5fed5c25..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typeck1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: - -extern int a[][]; // ERROR - invalid multidimensional array -extern int b[7][]; // ERROR - invalid multidimensional array -extern int c[][7]; // OK - -extern int (*i)[]; // ERROR - previous declaration -extern int (*i)[7]; // ERROR - conflicting types for `i' - -extern int m[]; -extern int m[7]; // OK - -void f(int (*j)[3]) -{ - extern int (*k)[]; - f(k); // ERROR - passing wrong type -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef1.C b/gcc/testsuite/g++.old-deja/g++.other/typedef1.C deleted file mode 100644 index d44772932ed..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -typedef const struct { - int x; -} Test; - -void foo(Test); - -void foo(Test t) -{ - t.x = 0; // ERROR - assignment of read-only member - return; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef2.C b/gcc/testsuite/g++.old-deja/g++.other/typedef2.C deleted file mode 100644 index b12ed13c406..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef2.C +++ /dev/null @@ -1,10 +0,0 @@ -//Build don't link: -struct S{ - - static const int i; - static const int j; -}; - -typedef S T; -const int T::i = 4; -const int T::j = 4; diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef3.C b/gcc/testsuite/g++.old-deja/g++.other/typedef3.C deleted file mode 100644 index 465e9a00e7a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef3.C +++ /dev/null @@ -1,14 +0,0 @@ -//Build don't link: -template<class T> -struct X{ - T v; - X(){} - virtual ~X(){} - virtual inline T f(T x){return x;} -}; - -void f() -{ - typedef int H; - X<H> y; -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef4.C b/gcc/testsuite/g++.old-deja/g++.other/typedef4.C deleted file mode 100644 index 8b5ba499406..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef4.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: - -struct A { - void f (); -}; - -typedef A foo; - -void foo::f() { } diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef5.C b/gcc/testsuite/g++.old-deja/g++.other/typedef5.C deleted file mode 100644 index d8f74aee938..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef5.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -// by Alexandre Oliva <oliva@dcc.unicamp.br> - -typedef int t; -typedef t* u; -typedef u v; -typedef v* (*w)(t); -typedef int t; -typedef t* u; -typedef u v; -typedef v* (*w)(t const); // this is ok -typedef v* (*w)(t); // ERROR - covers message `previously declared here' -typedef v* (*const w)(t); // ERROR - invalid redeclaration -typedef v const* (*w)(t); // ERROR - invalid redeclaration -typedef v* const (*w)(t); // ERROR - invalid redeclaration diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef6.C b/gcc/testsuite/g++.old-deja/g++.other/typedef6.C deleted file mode 100644 index 53b81669172..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typedef6.C +++ /dev/null @@ -1,17 +0,0 @@ -// Submitted by Jason Merrill <jason@cygnus.com>. -// Bug: g++ fails to see through the T typedef in the C ctor. -// Build don't link: - -struct A { - A (int) { } -}; - -typedef A T; - -struct B: public virtual T { - B (): T(1) { } -}; - -struct C: public B { - C (): T(1) { } -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C b/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C deleted file mode 100644 index 070e885fe91..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -#include <typeinfo> - -struct S { - S (const char*); -}; - -void f(S s); -void f(type_info); - -void g() -{ - f("abc"); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/typename1.C b/gcc/testsuite/g++.old-deja/g++.other/typename1.C deleted file mode 100644 index 2921b3d3c02..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/typename1.C +++ /dev/null @@ -1,17 +0,0 @@ -// This code snippet should be rejected with -pedantic -// Based on a test case by Louidor Erez <s3824888@techst02.technion.ac.il> - -// Build don't link: -// Special g++ Options: -pedantic - -template<class T> -class Vector { -public: - typedef T* iterator; -}; - -template<class T> -void f() -{ - Vector<T>::iterator i = 0; // ERROR - missing typename - XFAIL *-*-* -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/union1.C b/gcc/testsuite/g++.old-deja/g++.other/union1.C deleted file mode 100644 index 6573b4d055f..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/union1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: - -class A -{ - private: - int myInt; - - public: - A& operator = (int right) {myInt = right; return *this;} -}; - -union B -{ - char f1; - A f2; // gets bogus error - non-copy assignment op is OK -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using1.C b/gcc/testsuite/g++.old-deja/g++.other/using1.C deleted file mode 100644 index d22d512f64b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/using1.C +++ /dev/null @@ -1,26 +0,0 @@ -class D2; - -class B { -private: - int a; // ERROR - B::a is private -protected: - int b; - - friend class D2; -}; - -class D : public B { -public: - using B::a; - using B::b; -}; // ERROR - within this context - -class D2 : public B { -public: - using B::a; - using B::b; - -private: - using B::b; -}; // ERROR - conflicting access specifications - diff --git a/gcc/testsuite/g++.old-deja/g++.other/using2.C b/gcc/testsuite/g++.old-deja/g++.other/using2.C deleted file mode 100644 index 2924498e35a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/using2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -struct X{ - void f(); -}; - -struct Y:X{ - void f(int); - void f(); // ERROR - conflict - using X::f; -}; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.other/using3.C b/gcc/testsuite/g++.old-deja/g++.other/using3.C deleted file mode 100644 index 7d75d8a8794..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/using3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -struct A{ - A(); -}; - -typedef struct { - A i; -} S; - -struct B: S{ - using S::S; // ERROR - no such field -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using4.C b/gcc/testsuite/g++.old-deja/g++.other/using4.C deleted file mode 100644 index 218ffe2a85c..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/using4.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: - -// Based on a testcase by Martin Bachtold <martinb@coyotesystems.com> - -// excess errors test - XFAIL *-*-* - -struct foo { - void m(); -}; - -struct bar : foo { - using foo::m; - void m(int); -}; - -void f() { - bar b; - b.m(); - b.m(1); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/using5.C b/gcc/testsuite/g++.old-deja/g++.other/using5.C deleted file mode 100644 index 65dc9522a76..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/using5.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: - -// Based on bug report by Klaus-Georg Adams -// <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> - -struct bar { - typedef bar t; -}; - -struct foo : bar { - using bar::t; - t field; - t meth(); - void baz(t arg); -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual1.C b/gcc/testsuite/g++.old-deja/g++.other/virtual1.C deleted file mode 100644 index 28483177bf9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/virtual1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -struct S0 { virtual void f1 () { } }; - -struct S1 : virtual public S0 { virtual void f1 () { } }; - -struct S2 : public S1 { virtual void f1 () { } }; - -struct S3 : virtual public S0 { virtual void f1 () { } }; - -struct S4 : public S3 { }; - -void creator () { new S4; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual2.C b/gcc/testsuite/g++.old-deja/g++.other/virtual2.C deleted file mode 100644 index a3ebbcd40e1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/virtual2.C +++ /dev/null @@ -1,19 +0,0 @@ -struct B -{ - virtual int f() volatile - { return 0; } -}; - - -struct D : public B -{ - virtual int f() - { return 1; } -}; - -int main() -{ - volatile D d; - volatile B& b = d; - return b.f(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual3.C b/gcc/testsuite/g++.old-deja/g++.other/virtual3.C deleted file mode 100644 index b9a77191030..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/virtual3.C +++ /dev/null @@ -1,24 +0,0 @@ -struct B -{ - virtual int f() volatile - { return 1; } -}; - -struct D : public B -{ - int f() - { return 0; } -}; - -struct D2 : public D -{ - int f() - { return 2; } -}; - -int main() -{ - D2 d2; - D& d = d2; - return d.f(); -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual4.C b/gcc/testsuite/g++.old-deja/g++.other/virtual4.C deleted file mode 100644 index 8a44ee14135..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/virtual4.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -class A { -public: - virtual int foo() = 0; // ERROR - original definition -}; - -class B { -public: - virtual double foo() = 0; -}; - -class C - : public A, public B -{ -public: - virtual double foo() { return 2; } // ERROR - conflicting return type -}; - -class D - : public B, public A -{ -public: - virtual double foo() { return 2; } // ERROR - conflicting return type -}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/vtbl1.C b/gcc/testsuite/g++.old-deja/g++.other/vtbl1.C deleted file mode 100644 index 4724ee1b497..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/vtbl1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't run: -// Origin: DJ Delorie <dj@delorie.com> - -class X { -public: - int i; - X() { i = 0; } - ~X(); - virtual int foo() { return i; } - virtual void bar(); -}; - -int main() -{ -} diff --git a/gcc/testsuite/g++.old-deja/g++.other/warn01.C b/gcc/testsuite/g++.old-deja/g++.other/warn01.C deleted file mode 100644 index 229363a3ec0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/warn01.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: -W -Wall - -typedef unsigned long size_t; -extern void* malloc (size_t); -extern void free (void*); -extern void* realloc (void*, size_t); - -struct vtable { - void* (* _malloc) (size_t); - void (* _free) (void*); - void* (* _realloc) (void*, size_t); -}; - -struct vtable mtable = { malloc, free }; // WARNING - _realloc diff --git a/gcc/testsuite/g++.old-deja/g++.other/warn3.C b/gcc/testsuite/g++.old-deja/g++.other/warn3.C deleted file mode 100644 index 4827c5645f2..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.other/warn3.C +++ /dev/null @@ -1,54 +0,0 @@ -// Build don't link: - -class A { -}; - - -class B { -public: - void f(); - -private: - B (); - B (const B&); -}; // WARNING - only private constructors - - -class C { -public: - void f(); - -private: - ~C (); -}; // WARNING - only private destructors - - -class D { -private: - void f(); -}; // WARNING - all member functions are private - - -template <class T> -class X { -private: - ~X (); -}; // WARNING - only private destructors - -template class X<int>; -template class X<double>; - - -template <class T> -class Y { -private: - Y (); - Y (const Y&); -}; // WARNING - only private constructors - - -template <class T> -class Z { -private: - void f(); -}; // WARNING - all member functions are private |