diff options
Diffstat (limited to 'gcc/testsuite')
31 files changed, 0 insertions, 1270 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig01.C b/gcc/testsuite/g++.old-deja/g++.gb/sig01.C deleted file mode 100644 index a3e927743f3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig01.C +++ /dev/null @@ -1,33 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment -// Test assignment to local signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C a; - S * p; - - p = &a; - - printf ("%s%s\n", p->f (), p->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig02.C b/gcc/testsuite/g++.old-deja/g++.gb/sig02.C deleted file mode 100644 index f739a282c1b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig02.C +++ /dev/null @@ -1,45 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment -// Test assigning objects of different classes to local signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } -}; - -class D -{ -public: - char * f (void) { return "SS"; } -}; - -signature S -{ - char * f (void); -}; - -int main (void) -{ - C a; - D b; - S * p; - int i; - - for (i = 0; i < 2; i++) - { - if (i == 0) - p = &a; - else - p = &b; - printf ("%s", p->f ()); - } - printf ("\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig03.C b/gcc/testsuite/g++.old-deja/g++.gb/sig03.C deleted file mode 100644 index d791c7edbef..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig03.C +++ /dev/null @@ -1,33 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr overloading -// Test overloading of signature member functions. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * f (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * f (int); -}; - -int main (void) -{ - C a; - S * p; - - p = &a; - - printf ("%s%s\n", p->f (), p->f (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig04.C b/gcc/testsuite/g++.old-deja/g++.gb/sig04.C deleted file mode 100644 index af549591591..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig04.C +++ /dev/null @@ -1,46 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr this -// Test passing of 'this' pointer through signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C; -int inc_mod_4 (C *); - -class C -{ -public: - char * text[4]; - int i; - int get_i (void) { return i; } - char * msg (void) { i = inc_mod_4 (this); return text[i]; } -}; - -signature S -{ - char * msg (void); -}; - -int inc_mod_4 (C * p) -{ - return (p->get_i () + 1) % 4; -} - -int main (void) -{ - C o = { "P", "A", "S", "S", -1 }; - S * p; - int i; - - p = &o; - - for (i = 0; i < 4; i++) - printf ("%s", p->msg ()); - - printf ("\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig05.C b/gcc/testsuite/g++.old-deja/g++.gb/sig05.C deleted file mode 100644 index 3023e348dfb..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig05.C +++ /dev/null @@ -1,31 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr initialization -// Test initialization of a local signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C a; - S * p = &a; - - printf ("%s%s\n", p->f (), p->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig06.C b/gcc/testsuite/g++.old-deja/g++.gb/sig06.C deleted file mode 100644 index b6476d5f905..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig06.C +++ /dev/null @@ -1,31 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr initialization -// Test initialization of a local signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -C a; -S * p = &a; - -int main (void) -{ - printf ("%s%s\n", p->f (), p->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig07.C b/gcc/testsuite/g++.old-deja/g++.gb/sig07.C deleted file mode 100644 index 18a47be7e6e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig07.C +++ /dev/null @@ -1,29 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr default-argument -// Test calling a signature member function with default argument. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (char * text) { return text; } -}; - -signature S -{ - char * f (char * text = "PA"); -}; - -C a; -S * p = &a; - -int main (void) -{ - printf ("%s%s\n", p->f (), p->f ("SS")); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig08.C b/gcc/testsuite/g++.old-deja/g++.gb/sig08.C deleted file mode 100644 index 2d5d14d9970..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig08.C +++ /dev/null @@ -1,40 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr argument return-value -// Test passing a signature pointer to a function and returning it from one. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * text; - char * get_msg (void) const { return text; } -}; - -const C a = { "PA" }; -const C b = { "SS" }; - -signature S -{ - char * get_msg (void) const; -}; - -char * f (const S * p) -{ - return p->get_msg (); -} - -const S * g (const C * p) -{ - return p; -} - -int main (void) -{ - printf ("%s%s\n", f(&a), g(&b)->get_msg ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig09.C b/gcc/testsuite/g++.old-deja/g++.gb/sig09.C deleted file mode 100644 index a2e3b33e192..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig09.C +++ /dev/null @@ -1,34 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment initialization new -// Test assignment to/initialization of signature pointer with run-time value. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - int f (void) { return 1; } -}; - -signature S -{ - int f (void); -}; - -S * p1 = new C; - -int main (void) -{ - S * p2 = new C; - S * p3; - - p3 = new C; - - if (p1->f () + p2->f () + p3->f () == 3) - printf ("PASS\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig10.C b/gcc/testsuite/g++.old-deja/g++.gb/sig10.C deleted file mode 100644 index e16f2eeb095..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig10.C +++ /dev/null @@ -1,38 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr argument return-value new -// Test passing a signature pointer to a function and returning it from one. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ - char * text; -public: - C (char * s) { text = s; } - char * get_msg (void) const { return text; } -}; - -signature S -{ - char * get_msg (void) const; -}; - -char * f (const S * p) -{ - return p->get_msg (); -} - -const S * g (const C * p) -{ - return p; -} - -int main (void) -{ - printf ("%s%s\n", f(new C ("PA")), g(new C ("SS"))->get_msg ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig11.C b/gcc/testsuite/g++.old-deja/g++.gb/sig11.C deleted file mode 100644 index 892695f3fa3..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig11.C +++ /dev/null @@ -1,34 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr array -// Test a signature pointer array. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } -}; - -class D -{ -public: - char * f (void) { return "SS"; } -}; - -signature S -{ - char * f (void); -}; - -int main (void) -{ - S * p[2] = { new C, new D }; - - printf ("%s%s\n", p[0]->f (), p[1]->f ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig12.C b/gcc/testsuite/g++.old-deja/g++.gb/sig12.C deleted file mode 100644 index 2747a805915..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig12.C +++ /dev/null @@ -1,40 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr structure -// Test a signature pointer structure. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } -}; - -class D -{ -public: - char * f (void) { return "SS"; } -}; - -signature S -{ - char * f (void); -}; - -struct SP -{ - S * p; - S * q; -}; - -int main (void) -{ - SP o = { new C, new D }; - - printf ("%s%s\n", o.p->f (), o.q->f ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig13.C b/gcc/testsuite/g++.old-deja/g++.gb/sig13.C deleted file mode 100644 index f5da9f80888..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig13.C +++ /dev/null @@ -1,38 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment initialization -// Test assignment of/initialization with same type signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - int f (void) { return 1; } -}; - -signature S -{ - int f (void); -}; - -C a; -S * p1 = &a; -S * q1 = p1; - -int main (void) -{ - C a; - S * p2 = &a; - S * q2 = p2; - S * q3; - - q3 = p2; - - if (q1->f () + q2->f () + q3->f () == 3) - printf ("PASS\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig14.C b/gcc/testsuite/g++.old-deja/g++.gb/sig14.C deleted file mode 100644 index 6ce1d02d1bf..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig14.C +++ /dev/null @@ -1,55 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment initialization -// Test assignment of/initialization with different type signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - int f (void) { return 1; } - int g (int) { return 2; } -}; - -signature S -{ - int f (void); - int g (int); -}; - -signature T -{ - int f (void); -}; - -signature U -{ - int g (int); -}; - -C a; -S * p1 = &a; -T * q1 = p1; -U * r1 = p1; - -int main (void) -{ - C a; - S * p2 = &a; - T * q2 = p2; - U * r2 = p2; - T * q3; - U * r3; - - q3 = p2; - r3 = p2; - - if (q1->f () + q2->f () + q3->f () == 3 - && r1->g (0) + r2->g (0) + r3->g (0) == 6) - printf ("PASS\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig15.C b/gcc/testsuite/g++.old-deja/g++.gb/sig15.C deleted file mode 100644 index f0ae52e9ea7..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig15.C +++ /dev/null @@ -1,35 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr cast -// Test casting a signature pointer to a class pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C a; - S * p; - C * q; - - p = &a; - q = (C *) p; - - printf ("%s%s\n", q->f (), q->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig16.C b/gcc/testsuite/g++.old-deja/g++.gb/sig16.C deleted file mode 100644 index 35475e9f504..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig16.C +++ /dev/null @@ -1,44 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr cast -// Test casting a class pointer to an anonymous signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "S"; } - char * h (void) { return "FAIL"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -signature T -{ - char * f (void); -}; - -C a; -signature { char * g (int); } * r1 = - (signature { char * h (void); char * g (int); } *) &a; - -int main (void) -{ - C a; - S * p = &a; - T * q = p; - signature { char * g (int); } * r2 = - (signature { char * h (void); char * g (int); } *) &a; - - printf ("%s%s%s\n", q->f (), r1->g (0), r2->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig17.C b/gcc/testsuite/g++.old-deja/g++.gb/sig17.C deleted file mode 100644 index 6d1d1d94df6..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig17.C +++ /dev/null @@ -1,54 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr cast -// Test casting a class pointer through a chain of signature pointers. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -class D : public C -{ -public: - char * h (void) { return "FAIL"; } -}; - -class E : public C -{ -public: - int foo (int) { return 0; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -signature T -{ - char * f (void); -}; - -int main (void) -{ - D a; - S * p; - T * q; - signature { char * g (int); } * r; - - p = &a; - q = (T*) (signature { char * f (void); int foo (int); } *) (E*) (S*) (C*) p; - r = (signature { char * h (void); char * g (int); } *) &a; - - printf ("%s%s\n", q->f (), r->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig18.C b/gcc/testsuite/g++.old-deja/g++.gb/sig18.C deleted file mode 100644 index ba0ec8689cd..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig18.C +++ /dev/null @@ -1,33 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment virtual -// Test assignment of object from virtual class to signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - virtual char * f (void) { return "PA"; } - virtual char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C a; - S * p; - - p = &a; - - printf ("%s%s\n", p->f (), p->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig19.C b/gcc/testsuite/g++.old-deja/g++.gb/sig19.C deleted file mode 100644 index 160a4a3bd49..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig19.C +++ /dev/null @@ -1,38 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr initialization virtual -// Test initialization of signature pointer with object from abstract class. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - virtual char * f (void) = 0; - virtual char * g (int) = 0; -}; - -class D : public C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C * p = new D; - S * q = p; - - printf ("%s%s\n", q->f (), q->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig20.C b/gcc/testsuite/g++.old-deja/g++.gb/sig20.C deleted file mode 100644 index a8228de74b9..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig20.C +++ /dev/null @@ -1,38 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr initialization virtual -// Test initialization of signature pointer with object from virtual class. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - virtual char * f (void) { return "FA"; } - virtual char * g (int) { return "IL"; } -}; - -class D : public C -{ -public: - char * f (void) { return "PA"; } - char * g (int) { return "SS"; } -}; - -signature S -{ - char * f (void); - char * g (int); -}; - -int main (void) -{ - C * p = new D; - S * q = p; - - printf ("%s%s\n", q->f (), q->g (0)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig21.C b/gcc/testsuite/g++.old-deja/g++.gb/sig21.C deleted file mode 100644 index faad45b6403..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig21.C +++ /dev/null @@ -1,56 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment virtual -// Test assignment of objects of different types to same signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - virtual char * f (void) = 0; -}; - -class D : public C -{ -public: - char * f (void) { return "P"; } -}; - -class E -{ -public: - char * f (void) { return "AS"; } -}; - -class F : public C -{ -public: - char * f (void) { return "S"; } -}; - -signature S -{ - char * f (void); -}; - -int main (void) -{ - E a; - C * p = new D; - S * q; - - q = p; - printf ("%s", q->f ()); - - q = &a; - printf ("%s", q->f ()); - - p = new F; - q = p; - printf ("%s\n", q->f ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig22.C b/gcc/testsuite/g++.old-deja/g++.gb/sig22.C deleted file mode 100644 index 25b0a1aa5d1..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig22.C +++ /dev/null @@ -1,59 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment initialization -// Test assignment to/init of sigptr that requires copying sigtable slots. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - int f (void) { return 1; } - int g (int) { return 2; } - int h (void) { return 666; } -}; - -signature S -{ - int f (void); - int g (int); - int h (void); -}; - -signature T -{ - int f (void); - int h (void); -}; - -signature U -{ - int h (void); - int g (int); -}; - -C a; -S * p = &a; -T * q1 = p; -U * r1 = p; - -int main (void) -{ - C a; - S * p = &a; - T * q2 = p; - U * r2 = p;; - T * q3; - U * r3; - - q3 = p; - r3 = p; - - if (q1->f () + q2->f () + q3->f () == 3 - && r1->g (0) + r2->g (0) + r3->g (0) == 6) - printf ("PASS\n"); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig23.C b/gcc/testsuite/g++.old-deja/g++.gb/sig23.C deleted file mode 100644 index 767cfa31281..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig23.C +++ /dev/null @@ -1,53 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment local-signature -// Test assignment to signature pointer of local signature. - -extern "C" -{ - int printf (char *, ...); -} - -char * PA (void) -{ - class C - { - public: - char * f (void) { return "PA"; } - }; - - signature S - { - char * f (void); - }; - - C a; - S * p = &a; - - return p->f (); -} - -char * SS (void) -{ - class C - { - public: - char * f (void) { return "SS"; } - }; - - signature S - { - char * f (void); - }; - - C a; - S * p = &a; - - return p->f (); -} - -int main (void) -{ - printf ("%s%s\n", PA (), SS ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig24.C b/gcc/testsuite/g++.old-deja/g++.gb/sig24.C deleted file mode 100644 index 2dca6f994ce..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig24.C +++ /dev/null @@ -1,36 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr opaque-type -// Test calling member functions taking/returning opaque type through sigptr. - -extern "C" -{ - int printf (char *, ...); -} - -signature S -{ - typedef t; - char * f (t); - t g (void); - t h (void); -}; - -class C -{ -public: - typedef char * t; - char * f (t text) { return text; } - t g (void) { return "PA"; } - t h (void) { return "SS"; } -}; - -int main (void) -{ - C a; - S * p = &a; - S::t w = p->h (); - - printf ("%s%s\n", p->f (p->g ()), p->f (w)); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig25.C b/gcc/testsuite/g++.old-deja/g++.gb/sig25.C deleted file mode 100644 index d00ef57ca5e..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig25.C +++ /dev/null @@ -1,33 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr default-implementation -// Test calling default implementation through signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C { }; - -class D -{ -public: - char * f (void) { return "SS"; } -}; - -signature S -{ - char * f (void) { return "PA"; } -}; - -int main (void) -{ - C a; - D b; - S * p = &a; - S * q = &b; - - printf ("%s%s\n", p->f (), q->f ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig26.C b/gcc/testsuite/g++.old-deja/g++.gb/sig26.C deleted file mode 100644 index 399737b4a37..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig26.C +++ /dev/null @@ -1,34 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr default-implementation -// Test calling default implementation through signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C { }; - -class D -{ -public: - char * f (void) { return "SS"; } -}; - -signature S -{ - char * f (void) { return "PA"; } - char * g (void) { return f (); } -}; - -int main (void) -{ - C a; - D b; - S * p = &a; - S * q = &b; - - printf ("%s%s\n", p->g (), q->g ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig27.C b/gcc/testsuite/g++.old-deja/g++.gb/sig27.C deleted file mode 100644 index 7b9e7d29617..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig27.C +++ /dev/null @@ -1,38 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr multiple-inheritance -// Test class defined by multiple inheritance as implementation of signature. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * f (void) { return "PA"; } -}; - -class D -{ -public: - char * g (void) { return "SS"; } -}; - -class E : public C, public D { }; - -signature S -{ - char * f (void); - char * g (void); -}; - -int main (void) -{ - E a; - S * p = &a; - - printf ("%s%s\n", p->f (), p->g ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig28.C b/gcc/testsuite/g++.old-deja/g++.gb/sig28.C deleted file mode 100644 index 4edff680ce8..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig28.C +++ /dev/null @@ -1,46 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr multiple-inheritance -// Test correct adjustment of `this' pointer in case of multiple inheritance. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ - char * text; -public: - C () { text = "PA"; } - char * f (void) { return text; } -}; - -class D -{ - char * text; -public: - D () { text = "SS"; } - char * g (void) { return text; } -}; - -class E : public C, public D -{ -public: - E () : C (), D () { } -}; - -signature S -{ - char * f (void); - char * g (void); -}; - -int main (void) -{ - E a; - S * p = &a; - - printf ("%s%s\n", p->f (), p->g ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig29.C b/gcc/testsuite/g++.old-deja/g++.gb/sig29.C deleted file mode 100644 index e5c5e392643..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig29.C +++ /dev/null @@ -1,46 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr multiple-inheritance -// Test calling virtual function from MI class through signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ - char * text; -public: - C () { text = "PA"; } - virtual char * f (void) { return text; } -}; - -class D -{ - char * text; -public: - D () { text = "SS"; } - virtual char * g (void) { return text; } -}; - -class E : public C, public D -{ -public: - E () : C (), D () { } -}; - -signature S -{ - char * f (void); - char * g (void); -}; - -int main (void) -{ - E a; - S * p = &a; - - printf ("%s%s\n", p->f (), p->g ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig30.C b/gcc/testsuite/g++.old-deja/g++.gb/sig30.C deleted file mode 100644 index 3e93e114b86..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig30.C +++ /dev/null @@ -1,48 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr multiple-inheritance -// Test calling overwritten virtual functions through signature pointer. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - char * text1; - C () { text1 = "PA"; } - virtual char * f (void) = 0; -}; - -class D -{ -public: - char * text2; - D () { text2 = "SS"; } - virtual char * g (void) = 0; -}; - -class E : public C, public D -{ -public: - E () : C (), D () { }; - char * f (void) { return text1; } - char * g (void) { return text2; } -}; - -signature S -{ - char * f (void); - char * g (void); -}; - -int main (void) -{ - E a; - S * p = &a; - - printf ("%s%s\n", p->f (), p->g ()); - - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.gb/sig31.C b/gcc/testsuite/g++.old-deja/g++.gb/sig31.C deleted file mode 100644 index 90fa9e9d47a..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.gb/sig31.C +++ /dev/null @@ -1,52 +0,0 @@ -// Special g++ Options: -fhandle-signatures -// GROUPS passed gb sigptr assignment sigsigtable -// Test use of multiple signature-signature tables for same signature pair. - -extern "C" -{ - int printf (char *, ...); -} - -class C -{ -public: - virtual int f (void) { return 1; } - int g (int) { return 2; } -}; - -class D : public C -{ -public: - int f (void) { return 3; } - int g (int) { return 4; } -}; - -signature S -{ - int f (void); - int g (int); -}; - -signature T -{ - int g (int); - int f (void); -}; - -int main (void) -{ - S * p = new C; - T * q = p; - T * r; - - p = new D; - r = p; - - if (q->f () == 1 && q->g (0) == 2 - && r->f () == 3 && r->g (0) == 4) - printf ("PASS\n"); - else - printf ("FAIL\n"); - - return 0; -} |