diff options
author | camthesaxman <camthesaxman@users.noreply.github.com> | 2020-01-30 02:12:24 -0600 |
---|---|---|
committer | camthesaxman <camthesaxman@users.noreply.github.com> | 2020-01-30 02:12:24 -0600 |
commit | 3397016bff4dd62706f7d807a5196e79ae9c30b6 (patch) | |
tree | 98e90037403f29116f3ea6d0d8a1ba3623f4e968 /gcc_arm/testsuite/g++.old-deja/g++.brendan | |
parent | 4f87fae05b87cefd4f8fc0b2b18e639b0fad25fc (diff) |
delete test suite
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.brendan')
316 files changed, 0 insertions, 10301 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/README b/gcc_arm/testsuite/g++.old-deja/g++.brendan/README deleted file mode 100755 index ce760b1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/README +++ /dev/null @@ -1,40 +0,0 @@ - -abstract - abstract functions -alignof - gcc alignof builtin -ambiguity - diagnosing ambiguities -arm - ARM cases -array-refs - arrays of references -bit-fields - bit fields -chainon - deaths cuz we call chainon() incorrectly -copy - copy constructors -crash - old compiler crashes/aborts -cvt - user-defined conversions -def-fns - default function generation (in add'n to copy) -enum-clash - int vs enum -enum - enumerated types -err-msg - error messages -friend - dealing with friend functions and classes -groff - crashes derived from groff code -init - initialization bugs -label - handling labels -line - line numbers in error messages -misc - miscellaneous tests that didn't fit another category -nest - nested types -new-array - doing new of an array -new - generic operator new bugs -operators - tests for various overloaded operators -parse - parser bugs -prepost - prefix/postfix operator ++/-- -ptolemy - bugs derived from ptolemy -recurse - infinite recursion in the compiler -redecl - handling redeclarations -scope - managing scopes -shadow - shadowing of params, etc -sizeof - ARM compliance w/ sizeof operator -sorry - old "sorry, not implemented" messages -static - handling static data -template - template bugs -union - handling unions -visibility - access control and visibility checking -warnings - warning messages - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/abstract1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/abstract1.C deleted file mode 100755 index b9cd9c5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/abstract1.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// GROUPS passed abstract-functions -class O -{ -public: - virtual int c()=0; -}; - -class I: public O -{ -}; - -class S: public virtual I -{ -public: - int c(); - virtual int v()=0; -}; - -class D: public S -{ - int v(); -}; - -D *p=new D(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/access1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/access1.C deleted file mode 100755 index 0272c7a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/access1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: -// GROUPS passed access-control -class Base -{ -protected: - virtual void DoSomething() = 0; -}; - -class Fibber : public Base -{ -public: - void DoBP() { - DoSomething(); - } -}; - -class Flat : public virtual Fibber -{ -public: - void DoIt() { - DoSomething(); - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/alignof.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/alignof.C deleted file mode 100755 index 1449ade..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/alignof.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed extensions -struct bar { int bit : 1; }; - -void foo (int *r, bar t) -{ - // doing alignof on a bit-field should be illegal - __alignof__ (t.bit);// ERROR - .* - - // both of these (a regular ref and an INDIRECT_REF) should work - __alignof__ (r); - __alignof__ (*r); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ambiguity1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ambiguity1.C deleted file mode 100755 index c6d6fcb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ambiguity1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed ambiguity -struct A { - A (int); -}; - -struct B { - B (int); -}; - -void myfunc (const A& t0); // ERROR - -void myfunc (const B& t0); // ERROR - - -int main () -{ - myfunc(1); // ERROR - ambiguous call -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/anon-union1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/anon-union1.C deleted file mode 100755 index 86b7ce3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/anon-union1.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed anonymous-unions -static union { - char* uC; -private: - int uI;// ERROR - .*private member.* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm1.C deleted file mode 100755 index e415632..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm1.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed ARM-compliance -// ARM $5.7, it's illegal to do math on a `void*'. - -int -main() -{ - void *p; - ++p;// ERROR - .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm2.C deleted file mode 100755 index 62bdc3d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed ARM-compliance -// ARM 9.4 ``There cannot be a static and a nonstatic member function -// with the same name and the same argument types.'' -// -// The trick is to make sure it's caught with both orders (static, -// then normal, and vice-versa. - -class X { -public: - int foo(); - static int foo(); // error: redeclaration// ERROR - .* -}; - -class Y { -public: - static int foo(); - int foo(); // error: redeclaration// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm3.C deleted file mode 100755 index c352bfa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/arm3.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -// ARM $11.4: A function first declared in a friend decl is equivalent -// to an extern decl, so the below is illegal. - -class X { - friend g(); // ERROR - previous declaration -}; -static g() { return 1; }// ERROR - previously declared diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/array-refs.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/array-refs.C deleted file mode 100755 index 0eaa45c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/array-refs.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed arm -int a, b; - -// declaring an array of references should be illegal -int & v[ 2] = { a, b};// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/array1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/array1.C deleted file mode 100755 index 1812958..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/array1.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// Special g++ Options: -fconserve-space -fcommon -// GROUPS passed array-bindings - -extern "C" void printf (char *, ...); -char array[~(~0ul>>1)|~(0ul>>3)]; // ERROR - overflow in array dimension.* -int main () { printf ("PASS\n"); return 0; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/asm-extn1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/asm-extn1.C deleted file mode 100755 index fecd092..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/asm-extn1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// Special g++ Options: -S -// GROUPS passed asm-extension -// Skip if not target: sparc-sun-* -// This used to crash because c_expand_asm_keyword didn't know what to -// do with this. The parser rules were changed to accept an expr, instead -// of a stmt. - -extern void traptable(void); - -main() -{ - asm("wr %0,%%tbr" : : "r" (traptable)); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields1.C deleted file mode 100755 index 76f4ac3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields1.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed bit-fields -struct bar { - int : 2 = 1;// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields2.C deleted file mode 100755 index c77ce86..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bit-fields2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed bit-fields - struct { - char c; - int i:8; - } s; - - int main() - { - int &ir = s.i; // ERROR - address of bitfield - int *ip = &s.i; // ERROR - address of bitfield - ir = 10; - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bool1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/bool1.C deleted file mode 100755 index 1e7b343..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/bool1.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed boolean -int -main() -{ - typedef char Boolean; // Instrinsic.h - Boolean c = false; - bool b = true; - - if (!c != !b) - ; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen1.C deleted file mode 100755 index 84dd634..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen1.C +++ /dev/null @@ -1,40 +0,0 @@ -// GROUPS passed code-generation -// Check that sub-word sized structs/classes are passed correctly -// if the struct/class has a constructor (i.e. ANY constructor). - -extern "C" void printf (char *, ...); - -struct base { - unsigned int f1 : 8; - unsigned int f2 : 8; - - base (int ii) - { - } -}; - -base global_base (7); - -int test2 (base formal_base); - -int main () -{ - global_base.f1 = 0x55; - global_base.f2 = 0xee; - - if (test2 (global_base) == 0) - printf ("PASS\n"); - else - printf ("FAIL\n"); - - return 0; -} - -int test2 (base formal_base) -{ - if (formal_base.f1 != global_base.f1) - return -1; - if (formal_base.f2 != global_base.f2) - return -1; - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen2.C deleted file mode 100755 index 133755e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen2.C +++ /dev/null @@ -1,18 +0,0 @@ -// GROUPS passed code-generation -// Check that declarations with initializations are executed -// correctly. - -extern "C" void printf (char *, ...); - -int main () -{ - char buff[40] ; - char *tmp = &buff[0]; // also fails for char *tmp = buff; - - if ((unsigned int) tmp != (unsigned int) &buff[0]) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen3.C deleted file mode 100755 index 6d73bd2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen3.C +++ /dev/null @@ -1,34 +0,0 @@ -// GROUPS passed code-generation -// Check that passing things which are not a multiple of -// 4 bytes in size doesn't mess up other subsequent parameters. - -extern "C" void printf (char *, ...); - -struct base { - int f1 : 8; - int f2 : 8; -}; - -base global_base; - -int val1; - -int test2 (struct base formal_base, int v1); - -int main () -{ - val1 = 0x5e5e; - return test2 (global_base, val1); -} - -int test2 (struct base formal_base, int v1) -{ - formal_base.f1 = formal_base.f2; // prevent warnings - - if (v1 != 0x5e5e) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen4.C deleted file mode 100755 index e29b16a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen4.C +++ /dev/null @@ -1,31 +0,0 @@ -// Special g++ Options: -O -// GROUPS passed code-generation -// Options: -O -// -// Check that when an int value is assigned to a short int, the proper -// half of the int (i.e. the low order half) ends up in the short. -// -// This fails with 1.32.0 with -O and f1() is inline. -// -// Workaround - declare "f1_arg" as type "short int". - -extern "C" void printf (char *, ...); - -short int v2; - -long v1 = 0x11117777; - -inline void f1 (long f1_arg) -{ - v2 = f1_arg; -} - -int main () -{ - f1 (v1); - - if (v2 != 0x00007777) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen5.C deleted file mode 100755 index 0d59b56..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen5.C +++ /dev/null @@ -1,57 +0,0 @@ -// Special g++ Options: -fthis-is-variable -// GROUPS passed code-generation -// Check that the "this" pointer is zero when a method is -// called for an object pointed to by a null pointer. - -// Normally, the "__builtin_new" operation which actually -// allocates objects in heap space is *not* called at the -// actual point of the "new" keyword. Rather, a check is -// made within each constructor and if the "this" pointer -// value passed in is zero, then the actual allocation of -// memory (via __builtin_new) is done at that point (i.e. -// at the very beginning of the constructor). - -// A special trick allows one to subvert this mechanism. -// Specifically, if a given constructor contains a statement -// like: "this = this", then no attempt will be made to -// implicitly call __builtin_new within that constructor. - -extern "C" void printf (char *, ...); - -struct base { - int member; - - base (); - void member_function (); -}; - -base *base_pointer_1 = 0; -base *base_pointer_2 = 0; - -int errors = 0; - -int main () -{ - //base_pointer_2 = new base(); - base_pointer_1->member_function (); - - if (errors) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -base::base () -{ - this = this; - if ((int) this != 0) - errors++; -} - -void base::member_function () -{ - if ((int) this != 0) - errors++; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen6.C deleted file mode 100755 index ea5d730..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/code-gen6.C +++ /dev/null @@ -1,54 +0,0 @@ -// GROUPS passed code-generation -// Check that type float parameters can be correctly passed to -// methods. - -extern "C" void printf (char *, ...); - -class tres_floats { - float ff1; - float ff2; - float ff3; -public: - tres_floats (float f1, float f2, float f3); - float get_f1 (); - float get_f2 (); - float get_f3 (); -}; - -float v1 = 1.2345; -float v2 = 3.14159; -float v3 = 0.707; - -int main () -{ - tres_floats tf (v1, v2, v3); - - if ((tf.get_f1() != v1) || (tf.get_f2() != v2) || (tf.get_f3() != v3)) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -tres_floats::tres_floats (float f1, float f2, float f3) -{ - ff1 = f1; - ff2 = f2; - ff3 = f3; -} - -float tres_floats::get_f1 () -{ - return ff1; -} - -float tres_floats::get_f2 () -{ - return ff2; -} - -float tres_floats::get_f3 () -{ - return ff3; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/complex1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/complex1.C deleted file mode 100755 index 908b4ca..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/complex1.C +++ /dev/null @@ -1,22 +0,0 @@ -// Special g++ Options: - -// This test makes sure that the stuff in lex.c (real_yylex) is -// set up to handle real and imag numbers correctly. This test is against -// a bug where the compiler was not converting the integer `90' to a -// complex number, unless you did `90.0'. Fixed 10/1/1997. - -extern "C" void printf (char *, ...); - -__complex__ double cd; - -int -main(int argc, char *argv[]) -{ - cd = 1.0+90i; - cd *= argc; - - if (__real__ cd != 1 || __imag__ cd != 90) - exit (1); - - exit (0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy1.C deleted file mode 100755 index 27d959f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy1.C +++ /dev/null @@ -1,21 +0,0 @@ -// GROUPS passed copy-ctors -extern "C" void printf (char *, ...); -int count = 0; - -class C { -public: - C (int) { count++; } - operator int () { return 0; } -}; - -int -main () -{ - C c1 (1); - C c2 (c1); - - if (count != 1) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy2.C deleted file mode 100755 index 0ecc1e9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy2.C +++ /dev/null @@ -1,79 +0,0 @@ -// GROUPS passed copy-ctors -/* -The old g++ output is - -Item() -Compound() -Pre foo -foo -~Compound() -~Item() -Post foo -~Compound() -~Item() - -The output should be something like (produced from ATT 2.1) - -Item() -Compound() -Pre foo -Item(const Item& i) <------ missing above -foo -~Compound() -~Item() -Post foo -~Compound() -~Item() - -*/ - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void -die (int x) -{ - if (x != ++count) - { - printf ("FAIL\n"); - exit (1); - } -} - - -class Item { - public: - Item() { die (1); } - Item(const Item& i) { die (4); } - ~Item() { count++; if (count != 7 && count != 10) die (-1); } -}; - - -class Compound { - Item i; - public: - Compound() { die (2); } - ~Compound() { count++; if (count != 6 && count != 9) die (-1); } -}; - - -void foo(Compound a) -{ - die (5); -} - -int -main() -{ - Compound a; - - die (3); - foo(a); - - die (8); - - printf ("PASS\n"); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy3.C deleted file mode 100755 index 3b1edd5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy3.C +++ /dev/null @@ -1,58 +0,0 @@ -// GROUPS passed copy-ctors -/* - -If I compile it with cfront (AT&T C++ Translator 2.00.02 08/25/89) and run it -I get: - - A::A() - A::A(const A&) - B::Bar() - A::~A() - A::~A() - -If I compile it with g++ (gcc version 2.2.2) and run it I get: - - A::A() - B::Bar() - A::~A() - A::~A() - -*/ -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void -die (int x) -{ - if (x != ++count) - { - printf ("FAIL\n"); - exit (1); - } -} - - -class A { -public: - A() { die (1); } - A(const A&) { die (2); } - ~A() { count++; if (count != 4 && count != 5) die (-1); } -}; - -class B : public A { -public: - void Bar() { die (3); } -}; - -void Foo(B b) { b.Bar(); } - -int -main() -{ - B b; - Foo(b); - - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy4.C deleted file mode 100755 index 35b5393..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy4.C +++ /dev/null @@ -1,58 +0,0 @@ -// GROUPS passed copy-ctors -// Using Cfront 3.0.1 the programm below prints -// -// A() -// A(const A& a) -// ~A() -// A(A& a) <---- !!! -// ~A() -// ~A() -// -// the g++ 2.2.2 (sparc-sun-sunos4.1) generated code prints -// -// A() -// A(const A& a) -// ~A() -// A(const A& a) <---- !!! -// ~A() -// ~A() - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void -die (int x) -{ - if (x != ++count) - { - printf ("FAIL\n"); - exit (1); - } -} - -class A { -public: - A() { die (1); } - A(const A& a) { die (2); } - A(A& a) { die (4); } - ~A() { count++; if (count != 3 && count != 5 && count != 6) die (-1); } -}; - -void foo1(const A& a) { - A b = a; -} - -void foo2( A& a) { - A b = a; -} - -int main() { - A a; - - foo1(a); - foo2(a); - - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy5.C deleted file mode 100755 index 277940b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy5.C +++ /dev/null @@ -1,85 +0,0 @@ -// GROUPS passed copy-ctors -/* -bad: -sibelius402> a.out -a=5 a.virtMember()=30 -BaseClass::Increm --> {i=5, virtMember()=30} -a=7 a.virtMember()=30 -b=7 b.virtMember()=30 -BaseClass::Increm --> {i=7, virtMember()=999} -b=9 b.virtMember()=30 -sibelius403> - - good: - -sibelius406> a.out -a=5 a.virtMember()=30 -BaseClass::Increm --> {i=5, virtMember()=30} -a=7 a.virtMember()=30 -b=7 b.virtMember()=30 -BaseClass::Increm --> {i=7, virtMember()=30} -b=9 b.virtMember()=30 -*/ - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -void die () { printf ("FAIL\n"); exit (1); } - -class BaseClass { - - friend int operator != (const BaseClass irv, int x); - - int i; - -public: - - BaseClass( const BaseClass& ir ) : i(ir.i) {}; - BaseClass() : i(5) {}; - - virtual int virtMember() { return( 999 ); }; - - void Increm( int r ); -}; - -void BaseClass::Increm( int r ) -{ - if ((i == 5 && virtMember () == 30) - || (i == 7 && virtMember () == 30)) - i += r; - else - die (); -}; - -class DerivedClass : public BaseClass { -public: - int virtMember() { return( 30 ); }; -}; - -int operator != (const BaseClass irv, int x) { return irv.i != x; } - -int -main () -{ - DerivedClass a; - - if (a != 5 || a.virtMember () != 30) - die (); - - a.Increm(2); - - if (a != 7 || a.virtMember () != 30) - die (); - - DerivedClass b = a; - - if (b != 7 || a.virtMember () != 30) - die (); - - b.Increm(2); - - if (b != 9 || a.virtMember () != 30) - die (); - - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy6.C deleted file mode 100755 index d15a4be..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy6.C +++ /dev/null @@ -1,55 +0,0 @@ -// GROUPS passed copy-ctors -/* -g++ 2.3.3 will prefer using type conversions over the -implicitly generated copy constructor. This is wrong. -If you explicitly define a copy constructor, it will -use it. However, the implicit copy constructor MUST be -called whenever an explicit one would have been called -also. See below: g++ converts from and back into -unsigned, instead of using the implicit copy constructor: -here is the version: -Reading specs from /usr/lib/gcc-lib/i386-linux/2.3.3/specs -gcc version 2.3.3 - /usr/lib/gcc-lib/i386-linux/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dunix -Di386 -Dlinux -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux bug2.cc /usr/tmp/cca02008.i -GNU CPP version 2.3.3 (80386, BSD syntax) - /usr/lib/gcc-lib/i386-linux/2.3.3/cc1plus /usr/tmp/cca02008.i -quiet -dumpbase bug2.cc -version -o /usr/tmp/cca02008.s -GNU C++ version 2.3.3 (80386, BSD syntax) compiled by GNU C version 2.3.3. - as -o /usr/tmp/cca020081.o /usr/tmp/cca02008.s - ld /usr/lib/crt0.o -nojump -L/usr/lib/gcc-lib/i386-linux/2.3.3 /usr/tmp/cca020081.o -lg++ -lgcc -lc -lgcc - -Ok, and here is the output: -test k: constructing from scratch -test l=k: type conversion into unsigned -constructing from unsigned - -*/ - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void die () { printf ("FAIL\n"); exit (1); } - -struct test { - test() { if (count != 0) die (); } - - test(unsigned) { - die (); - } - operator unsigned() { - die (); - return 0; - } -}; - -int -main() { - test k; - test l=k; - - printf ("PASS\n"); - - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy7.C deleted file mode 100755 index e2f4e7a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy7.C +++ /dev/null @@ -1,30 +0,0 @@ -// GROUPS passed copy-ctors -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -void die () { printf ("FAIL\n"); exit (1); } - -class B { -public: - B() {} - B(const B &) { printf ("PASS\n"); exit (0); }; -private: - int x; -}; - -class A : public B { -public: - A() {} - - A(const B &) { printf ("FAIL\n"); exit (1); } -}; - -int -main() -{ - A a; - A b(a); - - printf ("FAIL\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy8.C deleted file mode 100755 index fe248ba..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy8.C +++ /dev/null @@ -1,67 +0,0 @@ -// GROUPS passed copy-ctors -/* -This report is for GCC 2.3.3 running on a Sun/4. The bug is that when -a class instance is passed-by-value, GCC does not correctly copy the value. -At the end of this report is an example program that demonstrates the bug. -It should print: - - construct A('x') - copy A('x') - destruct A('x') - destruct A('x') - -and in fact does for IBM's xlC C++. However, for GCC 2.3.3, it fails -to print the second line ["copy A('x')"], which indicates that it failed -to call the copy-constructor for class A when it should have. Below is a -typescript that lists the program, shows how I compiled it, and shows the -incorrect output. -*/ - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void -die (int x) -{ - if (x != ++count) - { - printf ("FAIL\n"); - exit (1); - } -} - -class A { // Class with explicit & instrumented copy-constructor and destructor. -public: - const char * id; - A( const char * id1 ) : id(id1) { die (1); } - - // Copy constructor - A( const A& a ) : id(a.id) { die (2); } - - // Destructor - ~A() { count++; if (count != 3 && count != 4) die (-1); } -}; - -class X { // Class without explicit copy-constructor -private: - A a; -public: - X( const char * id ) : a(id) {} -}; - -void Func( X x ) { // Function with call-by-value argument -} - -int -main() { - X x("x"); // Construct instance of x. - - // The next line should call the copy-constructor for X since x is - // being passed by value. For GCC 2.3.3 on a Sun/4, it does not. - Func(x); - - printf ("PASS\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy9.C deleted file mode 100755 index 59fd228..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/copy9.C +++ /dev/null @@ -1,41 +0,0 @@ -// GROUPS passed copy-ctors -#include <iostream.h> - -// token types: from state parser -const int T_EOF = 257; -const int T_ERROR = 258; -const int T_Float = 259; -const int T_Int = 260; -const int T_ID = 261; -const int T_STRING = 262; - -class Complex; -class State; - -// token, from state parser. -class ParseToken { -public: - int tok; - union { - char cval; - const char *sval; - int intval; - double doubleval; - Complex* Complexval; - const State* s; - }; - ParseToken () { tok = 0; intval = 0;} -}; - -int -main () { - ParseToken a; - a.tok = T_Float; - a.doubleval = 23.2; - ParseToken b(a); - - if (b.doubleval == 23.2) - cout << "PASS\n"; - else - cout << "FAIL\n"; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash1.C deleted file mode 100755 index 66de235..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash1.C +++ /dev/null @@ -1,44 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class D_Interval; - -class Date -{ - public: - Date(const D_Interval*,const Date&); -private: - const D_Interval* interval; -}; - -class Time_Interval -{ - public: - Time_Interval(const Date& start,const Date& stop); - const Date& Start() const { return start; } - const Date& Stop() const { return stop; } - private: - Date start; - Date stop; -}; - -class Dated_Data -{ - public: - Dated_Data(const Time_Interval& dates); - virtual ~Dated_Data(); - Time_Interval Dates() const { return dates; } - private: - Time_Interval dates; -}; - -class Raw_Data : public Dated_Data -{ - public: - Raw_Data(const Dated_Data *source,const D_Interval& period); -}; - -Raw_Data::Raw_Data(const Dated_Data *source,const D_Interval& period) - : Dated_Data(Time_Interval(Date(&period,source->Dates().Start()), - Date(&period,source->Dates().Stop()))) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash10.C deleted file mode 100755 index 6680718..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash10.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class word -{ - unsigned char b1, b2; -public: - word (unsigned int i = 0) { b1 = i & 0xff; b2 = (i & 0xff00) >> 8; } - operator unsigned int () { return (b2 << 8) + b1; } -}; - -class just_another -{ - int foo; - char bar[23]; -}; - -int mumble(word w) -{ - just_another *jap; - unsigned bar; - - bar = w; - - jap = new just_another [w]; - - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash11.C deleted file mode 100755 index a6c9226..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash11.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -extern "C" void printf (char *, ...); - -class A { - int i; - int j; - public: - int h; - A() { i=10; j=20; } - virtual void f1() { printf("i=%d j=%d\n",i,j); } - friend virtual void f2() { printf("i=%d j=%d\n",i,j); }// ERROR - virtual.* -}; - -class B : public A { - public: - virtual void f1() { printf("i=%d j=%d\n",i,j); }// ERROR - member.*// ERROR - member.* - friend virtual void f2() { printf("i=%d j=%d\n",i,j); }// ERROR - virtual.*// ERROR - member.*// ERROR - member.* -}; - -int -main() { - A * a = new A; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash12.C deleted file mode 100755 index 0671c7b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash12.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class X -{ - int i; -public: - X(int j); -} - -X *x = new X[10]();// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash13.C deleted file mode 100755 index c375e9b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash13.C +++ /dev/null @@ -1,36 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class gen_op -{ -public: - gen_op ( ); - gen_op (const gen_op &Op1); - ~gen_op ( ); - void operator = (const gen_op &Op1); -}; - - - - -class spin_op -{ -public: - spin_op(); - spin_op(const spin_op& SOp); - ~spin_op(); - void operator= (const spin_op& SOp); - operator gen_op(); -}; - - -spin_op Fe(); - - -gen_op Spul_U_axis() -{ - gen_op U1; - U1 = Fe(); -}; // ERROR - reaches end of non-void function - -int -main () {}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash14.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash14.C deleted file mode 100755 index dc28121..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash14.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -extern "C" void printf (char *, ...); - - -class cl -{ - int i; -public: - cl(int j = 0) {i = j;} - int get_i() {return i;} - }; - -int -main() -{ - cl ob[3] = {1, 2, 3}; - int i; - - for(i=0; i<3; i++) - printf("%d\n", ob[i].get_i()); - - return 0; - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash15.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash15.C deleted file mode 100755 index 56a7e75..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash15.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include <iostream.h> - -class A { - public: - virtual ~A() {cout << "executed ~A()\n";}; -}; - -class B : public A { - public: - virtual ~B() {cout << "executed ~B()\n";}; -}; - -int -main() { - cout << "starting\n"; - B b; - b.~A();// ERROR - destructor - cout << "done\n"; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash16.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash16.C deleted file mode 100755 index 5030b29..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash16.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class Graph { -public: - unsigned char N; - Graph(void) {}; // ERROR - previously defined here -} - -Graph::Graph(void) -{ N = 10;// ERROR - return type.* -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash17.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash17.C deleted file mode 100755 index 7072eab..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash17.C +++ /dev/null @@ -1,35 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// -// This one creates -// -// gcc2: Internal compiler error: program cc1plus got fatal signal 11 -// -// when compiled with g++. -// The error goes away, if -// 1) int ClassInvariant() is not virtual or -// 2) GnObject has a virtual destructor or -// 3) GnWidget has no virtual destructor or -// 4) GnContracts has a virtual destructor -// - - -class GnContracts { - public: - virtual int ClassInvariant(); -// virtual ~GnContracts(); -}; - -class GnObject : public GnContracts { - public: -// virtual ~GnObject(); -}; - -class GnWidget : public GnObject { - public: - virtual ~GnWidget(); -}; - -class GnOptionGroup : public GnObject, public GnWidget { -};// ERROR - warning - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash18.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash18.C deleted file mode 100755 index d4a4c60..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash18.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -typedef int element; -class Pix { -public: - Pix(); - Pix(const Pix&); - - // Friend functions so that v == x works as does x == v works - friend int operator==(void *v, const Pix& x) - { return v == index; }// ERROR - .* - friend int operator==(void *v, const Pix& x) - { return v != index; }// ERROR - .* -private: -// friend class List<T>; - element *index; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash19.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash19.C deleted file mode 100755 index 1b8527d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash19.C +++ /dev/null @@ -1,1704 +0,0 @@ -// Special g++ Options: -// Build don't link: -// GROUPS passed old-abort -typedef unsigned long _G_clock_t; -typedef long _G_dev_t; -typedef long int _G_fpos_t; -typedef long _G_gid_t; -typedef unsigned long _G_ino_t; -typedef unsigned short _G_mode_t; -typedef short _G_nlink_t; -typedef long _G_off_t; -typedef long _G_pid_t; -typedef int _G_ptrdiff_t; -typedef int _G_sigset_t; -typedef unsigned int _G_size_t; -typedef long _G_time_t; -typedef long _G_uid_t; -typedef unsigned int _G_wchar_t; -typedef int _G_ssize_t; -typedef double * _G_va_list; -class ostream; class streambuf; class backupbuf; -extern "C" int __underflow(streambuf*); -extern "C" int __overflow(streambuf*, int); -typedef _G_off_t streamoff; -typedef _G_off_t streampos; -typedef unsigned long __fmtflags; -typedef unsigned char __iostate; -struct _ios_fields { - streambuf *_strbuf; - ostream* _tie; - int _width; - __fmtflags _flags; - _G_wchar_t _fill; - __iostate _state; - __iostate _exceptions; - int _precision; -}; -enum state_value { - _good = 0 , - _eof = 1 , - _fail = 2 , - _bad = 4 }; -enum open_mode { - input = 1 , - output = 2 , - atend = 4 , - append = 8 }; -class ios : public _ios_fields { - public: - typedef __fmtflags fmtflags; - typedef int iostate; - typedef int openmode; - enum io_state { - goodbit = 0 , - eofbit = 1 , - failbit = 2 , - badbit = 4 }; - enum open_mode { - in = 1 , - out = 2 , - ate = 4 , - app = 8 , - trunc = 16 , - nocreate = 32 , - noreplace = 64 , - bin = 128 }; - enum seek_dir { beg, cur, end}; - enum { skipws=01, left=02, right=04, internal=010, - dec=020, oct=040, hex=0100, - showbase=0200, showpoint=0400, uppercase=01000, showpos=02000, - scientific=04000, fixed=010000, unitbuf=020000, stdio=040000, - dont_close=0x80000000 - }; - enum { - basefield=dec+oct+hex, - floatfield = scientific+fixed, - adjustfield = left+right+internal - }; - ostream* tie() const { return _tie; } - ostream* tie(ostream* val) { ostream* save=_tie; _tie=val; return save; } - _G_wchar_t fill() const { return (_G_wchar_t)_fill; } - _G_wchar_t fill(_G_wchar_t newf) - {_G_wchar_t oldf = (_G_wchar_t)_fill; _fill = (char)newf; return oldf;} - fmtflags flags() const { return _flags; } - fmtflags flags(fmtflags new_val) { - fmtflags old_val = _flags; _flags = new_val; return old_val; } - int precision() const { return _precision; } - int precision(int newp) { - unsigned short oldp = _precision; _precision = (unsigned short)newp; - return oldp; } - fmtflags setf(fmtflags val) { - fmtflags oldbits = _flags; - _flags |= val; return oldbits; } - fmtflags setf(fmtflags val, fmtflags mask) { - fmtflags oldbits = _flags; - _flags = (_flags & ~mask) | (val & mask); return oldbits; } - fmtflags unsetf(fmtflags mask) { - fmtflags oldbits = _flags & mask; - _flags &= ~mask; return oldbits; } - int width() const { return _width; } - int width(int val) { int save = _width; _width = val; return save; } - void _throw_failure() { } - streambuf* rdbuf() const { return _strbuf; } - void clear(iostate state = 0) { - _state = _strbuf ? state : state|badbit; - if (_state & _exceptions) _throw_failure(); } - void set(iostate flag) { _state |= flag; - if (_state & _exceptions) _throw_failure(); } - int good() const { return _state == 0; } - int eof() const { return _state & ios::eofbit; } - int fail() const { return _state & (ios::badbit|ios::failbit); } - int bad() const { return _state & ios::badbit; } - iostate rdstate() const { return _state; } - operator void*() const { return fail() ? (void*)0 : (void*)(-1); } - int operator!() const { return fail(); } - iostate exception(iostate enable) { - iostate old = _exceptions; _exceptions = enable; - if (_state & _exceptions) _throw_failure(); - return old; } - static int sync_with_stdio(int on); - static void sync_with_stdio() { sync_with_stdio(1); } - void unset(state_value flag) { _state &= ~flag; } - void close(); - int is_open(); - int readable(); - int writable(); - protected: - ios(streambuf* sb = 0, ostream* tie = 0); - virtual ~ios(); - void init(streambuf* sb) { _state=0; _strbuf=sb; } -}; -typedef ios::seek_dir _seek_dir; -class streammarker { - friend class streambuf; - friend int __underflow(streambuf*); - struct streammarker *_next; - streambuf *_sbuf; - streampos _spos; - void set_streampos(streampos sp) { _spos = sp; } - void set_offset(int offset) { _pos = offset; _spos = (streampos)(-2); } - int _pos; - public: - streammarker(streambuf *sb); - ~streammarker(); - int saving() { return _spos == -2; } - int delta(streammarker&); - int delta(); -}; -struct __streambuf { - int _flags; - char* _gptr; - char* _egptr; - char* _eback; - char* _pbase; - char* _pptr; - char* _epptr; - char* _base; - char* _ebuf; - struct streambuf *_chain; - friend class streammarker; - char *_other_gbase; - char *_aux_limit; - char *_other_egptr; - streammarker *_markers; - unsigned short _cur_column; - char _unused; - char _shortbuf[1]; -}; -extern unsigned __adjust_column(unsigned start, const char *line, int count); -struct streambuf : private __streambuf { - friend class ios; - friend class istream; - friend class ostream; - friend class streammarker; - friend int __underflow(streambuf*); - protected: - static streambuf* _list_all; - streambuf*& xchain() { return _chain; } - void _un_link(); - void _link_in(); - char* gptr() const { return _gptr; } - char* pptr() const { return _pptr; } - char* egptr() const { return _egptr; } - char* epptr() const { return _epptr; } - char* pbase() const { return _pbase; } - char* eback() const { return _eback; } - char* base() const { return _base; } - char* ebuf() const { return _ebuf; } - int blen() const { return _ebuf - _base; } - void xput_char(char c) { *_pptr++ = c; } - int xflags() { return _flags; } - int xflags(int f) { int fl = _flags; _flags = f; return fl; } - void xsetflags(int f) { _flags |= f; } - void xsetflags(int f, int mask) { _flags = (_flags & ~mask) | (f & mask); } - void gbump(int n) { _gptr += n; } - void pbump(int n) { _pptr += n; } - void setb(char* b, char* eb, int a=0); - void setp(char* p, char* ep) { _pbase=_pptr=p; _epptr=ep; } - void setg(char* eb, char* g, char *eg) { _eback=eb; _gptr=g; _egptr=eg; } - char *shortbuf() { return _shortbuf; } - int in_backup() { return _flags & 0x100 ; } - char *Gbase() { return in_backup() ? _other_gbase : _eback; } - char *eGptr() { return in_backup() ? _other_egptr : _egptr; } - char *Bbase() { return in_backup() ? _eback : _other_gbase; } - char *Bptr() { return _aux_limit; } - char *eBptr() { return in_backup() ? _egptr : _other_egptr; } - char *Nbase() { return _other_gbase; } - char *eNptr() { return _other_egptr; } - int have_backup() { return _other_gbase != __null ; } - int have_markers() { return _markers != __null ; } - int _least_marker(); - void switch_to_main_get_area(); - void switch_to_backup_area(); - void free_backup_area(); - void unsave_markers(); - int put_mode() { return _flags & 0x800 ; } - int switch_to_get_mode(); - streambuf(int flags=0); - public: - static int flush_all(); - static void flush_all_linebuffered(); - virtual int underflow() = 0; - virtual int overflow(int c = (-1) ) = 0; - virtual int doallocate(); - virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); - virtual streampos seekpos(streampos pos, int mode = ios::in|ios::out); - int seekmark(streammarker& mark, int delta = 0); - int sputbackc(char c); - int sungetc(); - virtual ~streambuf(); - int unbuffered() { return _flags & 2 ? 1 : 0; } - int linebuffered() { return _flags & 0x200 ? 1 : 0; } - void unbuffered(int i) - { if (i) _flags |= 2 ; else _flags &= ~2 ; } - void linebuffered(int i) - { if (i) _flags |= 0x200 ; else _flags &= ~0x200 ; } - int allocate() { - if (base() || unbuffered()) return 0; - else return doallocate(); } - void allocbuf() { if (base() == __null ) doallocbuf(); } - void doallocbuf(); - virtual int sync(); - virtual int pbackfail(int c); - virtual streambuf* setbuf(char* p, int len); - int in_avail() { return _egptr - _gptr; } - int out_waiting() { return _pptr - _pbase; } - virtual int xsputn(const char* s, int n); - int sputn(const char* s, int n) { return xsputn(s, n); } - int padn(char pad, int n); - virtual int xsgetn(char* s, int n); - int sgetn(char* s, int n) { return xsgetn(s, n); } - int ignore(int); - virtual int get_column(); - virtual int set_column(int); - long sgetline(char* buf, _G_size_t n, char delim, int putback_delim); - int sbumpc() { - if (_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ; - else return *(unsigned char*)_gptr++; } - int sgetc() { - if (_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ; - else return *(unsigned char*)_gptr; } - int snextc() { - if (_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ; - return _gptr++, sgetc(); } - int sputc(int c) { - if (_pptr >= _epptr) return __overflow(this, (unsigned char)c); - else return *_pptr++ = c, (unsigned char)c; } - void stossc() { if (_gptr < _egptr) _gptr++; } - int vscan(char const *fmt0, _G_va_list ap, ios* stream = __null ); - int scan(char const *fmt0 ...); - int vform(char const *fmt0, _G_va_list ap); - int form(char const *fmt0 ...); -}; -class backupbuf : public streambuf { - friend class streammarker; - protected: - backupbuf(int flags=0) : streambuf(flags| 0x4000 ) { } - public: - virtual int pbackfail(int c); - virtual int underflow(); - virtual int overflow(int c = (-1) ); -}; -struct __file_fields { - short _fileno; - int _blksize; - _G_fpos_t _offset; -}; -class filebuf : public backupbuf { - protected: - struct __file_fields _fb; - void init(); - public: - static const int openprot; - filebuf(); - filebuf(int fd); - filebuf(int fd, char* p, int len); - ~filebuf(); - filebuf* attach(int fd); - filebuf* open(const char *filename, const char *mode); - filebuf* open(const char *filename, ios::openmode mode, int prot = 0664); - virtual int underflow(); - virtual int overflow(int c = (-1) ); - int is_open() const { return _fb._fileno >= 0; } - int fd() const { return is_open() ? _fb._fileno : (-1) ; } - filebuf* close(); - virtual int doallocate(); - virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); - virtual streambuf* setbuf(char* p, int len); - int xsputn(const char* s, int n); - int xsgetn(char* s, int n); - virtual int sync(); - protected: - int is_reading() { return eback() != egptr(); } - char* cur_ptr() { return is_reading() ? gptr() : pptr(); } - char* file_ptr() { return eGptr(); } - int do_write(const char *data, int to_do); - int do_flush() { return do_write(_pbase, _pptr-_pbase); }// ERROR - - virtual _G_ssize_t sys_read(char* buf, _G_size_t size); - virtual _G_fpos_t sys_seek(_G_fpos_t, _seek_dir); - virtual _G_ssize_t sys_write(const void*, long); - virtual int sys_stat(void*); - virtual int sys_close(); -}; -inline ios::ios(streambuf* sb , ostream* tie ) { - _state = sb ? ios::goodbit : ios::badbit; _exceptions=0; - _strbuf=sb; _tie = tie; _width=0; _fill=' '; - _flags=ios::skipws|ios::dec; _precision=6; } -inline ios::~ios() { - if (!(_flags & (unsigned int)ios::dont_close)) delete _strbuf; } -class istream; class ostream; -typedef ios& (*__manip)(ios&); -typedef istream& (*__imanip)(istream&); -typedef ostream& (*__omanip)(ostream&); -extern istream& ws(istream& ins); -extern ostream& flush(ostream& outs); -extern ostream& endl(ostream& outs); -extern ostream& ends(ostream& outs); -class ostream : virtual public ios -{ - void do_osfx(); - public: - ostream() { } - ostream(streambuf* sb, ostream* tied=__null ); - int opfx() { - if (!good()) return 0; else { if (_tie) _tie->flush(); return 1;} } - void osfx() { if (flags() & (ios::unitbuf|ios::stdio)) - do_osfx(); } - streambuf* ostreambuf() const { return _strbuf; } - ostream& flush(); - ostream& put(char c) { _strbuf->sputc(c); return *this; } - ostream& put(unsigned char c) { return put((char)c); } - ostream& write(const char *s, int n); - ostream& write(const unsigned char *s, int n) { return write((const char*)s, n);} - ostream& put(signed char c) { return put((char)c); } - ostream& write(const signed char *s, int n) { return write((const char*)s, n);} - ostream& write(const void *s, int n) { return write((const char*)s, n);} - ostream& seekp(streampos); - ostream& seekp(streamoff, _seek_dir); - streampos tellp(); - ostream& form(const char *format ...); - ostream& vform(const char *format, _G_va_list args); - ostream& operator<<(char c); - ostream& operator<<(unsigned char c) { return (*this) << (char)c; } - ostream& operator<<(signed char c) { return (*this) << (char)c; } - ostream& operator<<(const char *s); - ostream& operator<<(const unsigned char *s) - { return (*this) << (const char*)s; } - ostream& operator<<(const signed char *s) - { return (*this) << (const char*)s; } - ostream& operator<<(void *p); - ostream& operator<<(int n); - ostream& operator<<(unsigned int n); - ostream& operator<<(long n); - ostream& operator<<(unsigned long n); - ostream& operator<<(long long n); - ostream& operator<<(unsigned long long n); - ostream& operator<<(short n) {return operator<<((int)n);} - ostream& operator<<(unsigned short n) {return operator<<((unsigned int)n);} - ostream& operator<<(double n); - ostream& operator<<(float n) { return operator<<((double)n); } - ostream& operator<<(__omanip func) { return (*func)(*this); } - ostream& operator<<(__manip func) {(*func)(*this); return *this;} - ostream& operator<<(streambuf*); -}; -class istream : virtual public ios -{ - _G_ssize_t _gcount; - int _skip_ws(); - public: - istream() { _gcount = 0; } - istream(streambuf* sb, ostream*tied=__null ); - streambuf* istreambuf() const { return _strbuf; } - istream& get(char* ptr, int len, char delim = '\n'); - istream& get(unsigned char* ptr, int len, char delim = '\n') - { return get((char*)ptr, len, delim); } - istream& get(char& c); - istream& get(unsigned char& c) { return get((char&)c); } - istream& getline(char* ptr, int len, char delim = '\n'); - istream& getline(unsigned char* ptr, int len, char delim = '\n') - { return getline((char*)ptr, len, delim); } - istream& get(signed char& c) { return get((char&)c); } - istream& get(signed char* ptr, int len, char delim = '\n') - { return get((char*)ptr, len, delim); } - istream& getline(signed char* ptr, int len, char delim = '\n') - { return getline((char*)ptr, len, delim); } - istream& read(char *ptr, int n); - istream& read(unsigned char *ptr, int n) { return read((char*)ptr, n); } - istream& read(signed char *ptr, int n) { return read((char*)ptr, n); } - istream& read(void *ptr, int n) { return read((char*)ptr, n); } - istream& get(streambuf& sb, char delim = '\n'); - istream& gets(char **s, char delim = '\n'); - int ipfx(int need) { - if (!good()) { set(ios::failbit); return 0; } - if (_tie && (need == 0 || rdbuf()->in_avail() < need)) _tie->flush(); - if (!need && (flags() & ios::skipws)) return _skip_ws(); - return 1; - } - int ipfx0() { - if (!good()) { set(ios::failbit); return 0; } - if (_tie) _tie->flush(); - if (flags() & ios::skipws) return _skip_ws(); - return 1; - } - int ipfx1() { - if (!good()) { set(ios::failbit); return 0; } - if (_tie && rdbuf()->in_avail() == 0) _tie->flush(); - return 1; - } - int get() { if (!ipfx1()) return (-1) ; - int ch = _strbuf->sbumpc(); - if (ch == (-1) ) set(ios::eofbit); - return ch; } - int peek() { if (!ipfx1()) return (-1) ; - int ch = _strbuf->sgetc(); - if (ch == (-1) ) set(ios::eofbit); - return ch; } - _G_ssize_t gcount() { return _gcount; } - istream& ignore(int n=1, int delim = (-1) ); - istream& seekg(streampos); - istream& seekg(streamoff, _seek_dir); - streampos tellg(); - istream& putback(char ch) { - if (good() && _strbuf->sputbackc(ch) == (-1) ) clear(ios::badbit); - return *this;} - istream& unget() { - if (good() && _strbuf->sungetc() == (-1) ) clear(ios::badbit); - return *this;} - istream& scan(const char *format ...); - istream& vscan(const char *format, _G_va_list args); - istream& unget(char ch) { return putback(ch); } - int skip(int i); - istream& operator>>(char*); - istream& operator>>(unsigned char* p) { return operator>>((char*)p); } - istream& operator>>(signed char*p) { return operator>>((char*)p); } - istream& operator>>(char& c); - istream& operator>>(unsigned char& c) {return operator>>((char&)c);} - istream& operator>>(signed char& c) {return operator>>((char&)c);} - istream& operator>>(int&); - istream& operator>>(long&); - istream& operator>>(long long&); - istream& operator>>(short&); - istream& operator>>(unsigned int&); - istream& operator>>(unsigned long&); - istream& operator>>(unsigned long long&); - istream& operator>>(unsigned short&); - istream& operator>>(float&); - istream& operator>>(double&); - istream& operator>>( __manip func) {(*func)(*this); return *this;} - istream& operator>>(__imanip func) { return (*func)(*this); } - istream& operator>>(streambuf*); -}; -class iostream : public istream, public ostream -{ - _G_ssize_t _gcount; - public: - iostream() { _gcount = 0; } - iostream(streambuf* sb, ostream*tied=__null ); -}; -extern istream cin; -extern ostream cout, cerr, clog; -struct Iostream_init { } ; -inline ios& dec(ios& i) -{ i.setf(ios::dec, ios::dec|ios::hex|ios::oct); return i; } -inline ios& hex(ios& i) -{ i.setf(ios::hex, ios::dec|ios::hex|ios::oct); return i; } -inline ios& oct(ios& i) -{ i.setf(ios::oct, ios::dec|ios::hex|ios::oct); return i; } -extern char* form(const char*, ...); -extern char* dec(long, int=0); -extern char* dec(int, int=0); -extern char* dec(unsigned long, int=0); -extern char* dec(unsigned int, int=0); -extern char* hex(long, int=0); -extern char* hex(int, int=0); -extern char* hex(unsigned long, int=0); -extern char* hex(unsigned int, int=0); -extern char* oct(long, int=0); -extern char* oct(int, int=0); -extern char* oct(unsigned long, int=0); -extern char* oct(unsigned int, int=0); -inline istream& WS(istream& str) { return ws(str); } -typedef double *__gnuc_va_list; -extern "C" { - typedef struct { - int __cnt; - unsigned char *__ptr; - unsigned char *__base; - unsigned short __flag; - unsigned char __fileL; - unsigned char __fileH; - } FILE; - typedef struct { - int __cnt; - unsigned char *__ptr; - unsigned char *__base; - unsigned short __flag; - unsigned char __fileL; - unsigned char __fileH; - unsigned char *__bufendp; - unsigned char __smbuf[8 ]; - } _FILEX; - typedef unsigned int size_t; - typedef long int fpos_t; - typedef double *__va_list; - extern FILE __iob[]; - extern int remove(const char *); - extern int rename(const char *, const char *); - extern FILE *tmpfile(void); - extern char *tmpnam(char *); - extern int fclose(FILE *); - extern int fflush(FILE *); - extern FILE *fopen(const char *, const char *); - extern FILE *freopen(const char *, const char *, FILE *); - extern void setbuf(FILE *, char *); - extern int setvbuf(FILE *, char *, int, size_t); - extern int fprintf(FILE *, const char *, ...); - extern int fscanf(FILE *, const char *,...); - extern int printf(const char *,...); - extern int scanf(const char *,...); - extern int sprintf(char *, const char *,...); - extern int sscanf(const char *, const char *,...); - extern int vprintf(const char *, __va_list); - extern int vfprintf(FILE *, const char *, __va_list); - extern int vsprintf(char *, const char *, __va_list); - extern int fgetc(FILE *); - extern char *fgets(char *, int, FILE *); - extern int fputc(int, FILE *); - extern int fputs(const char *, FILE *); - extern int getc(FILE *); - extern int getchar(void); - extern char *gets(char *); - extern int putc(int, FILE *); - extern int putchar(int); - extern int puts(const char *); - extern int ungetc(int, FILE *); - extern int fgetpos(FILE *, fpos_t *); - extern int fseek(FILE *, long int, int); - extern int fsetpos(FILE *, const fpos_t *); - extern long int ftell(FILE *); - extern void rewind(FILE *); - extern void clearerr(FILE *); - extern int feof(FILE *); - extern int ferror(FILE *); - extern void perror(const char *); - extern size_t fread(void *, size_t, size_t, FILE *); - extern size_t fwrite(const void *, size_t, size_t, FILE *); - extern int __flsbuf(unsigned char, FILE *); - extern int __filbuf(FILE *); - extern int fileno(FILE *); - extern FILE *fdopen(int, const char *); - extern int getw(FILE *); - extern int putw(int, FILE *); - extern int pclose(FILE *); - extern FILE *popen(const char *, const char *); - extern char *tempnam(const char *, const char *); - extern char *ctermid(char *); - extern char *cuserid(char *); - extern int nl_fprintf(FILE *, const char * ,...); - extern int nl_fscanf(FILE *, const char * ,...); - extern int nl_printf(const char * ,...); - extern int nl_scanf(const char * ,...); - extern int nl_sprintf(char *, const char * ,...); - extern int nl_sscanf(const char *, const char * ,...); - extern unsigned char *__bufendtab[]; -} -extern "C" { - extern int __nl_char_size; - typedef struct { - int quot; - int rem; - } div_t; - typedef struct { - long int quot; - long int rem; - } ldiv_t; - typedef unsigned int wchar_t; - extern double atof(const char *); - extern int atoi(const char *); - extern long int atol(const char *); - extern double strtod(const char *, char **); - extern long int strtol(const char *, char **, int); - extern unsigned long int strtoul(const char *, char **, int); - extern int rand(void); - extern void srand(unsigned int); - extern int atexit(void (*) (void)); - extern void exit(int); - extern char *getenv(const char *); - extern int system(const char *); - inline int abs(int d) { return (d>0)?d:-d; } - extern div_t div(int, int); - extern ldiv_t ldiv(long int, long int); - extern long int labs(long int); - extern int mblen(const char *, size_t); - extern int mbtowc(wchar_t *, const char *, size_t); - extern int wctomb(char *, wchar_t); - extern size_t mbstowcs(wchar_t *, const char *, size_t); - extern size_t wcstombs(char *, const wchar_t *, size_t); - extern void free(void *); - extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); - extern void abort(void); - extern void *bsearch(const void *, const void *, size_t, size_t, int (*) (const void *, const void *)); - extern void *calloc(size_t, size_t); - extern void *malloc(size_t); - extern void *realloc(void *, size_t); - extern void setkey(const char *); - extern void lcong48( unsigned short [] ); - extern double wcstod( const wchar_t *, wchar_t ** ); - extern long wcstol( const wchar_t *, wchar_t **, int ); - extern unsigned long wcstoul( const wchar_t *, wchar_t **, int ); - extern double drand48(void); - extern double erand48(unsigned short []); - extern long jrand48(unsigned short []); - extern long lrand48(void); - extern long mrand48(void); - extern long nrand48(unsigned short []); - extern void srand48(long); - extern unsigned short *seed48(unsigned short []); - extern int putenv(const char *); - extern int clearenv(void); - extern int getopt(int, char * const [], const char *); - extern char *getpass(const char *); - extern char *optarg; - extern int optind; - extern int opterr; - struct mallinfo { - int arena; - int ordblks; - int smblks; - int hblks; - int hblkhd; - int usmblks; - int fsmblks; - int uordblks; - int fordblks; - int keepcost; - }; - typedef struct { - unsigned int word1, word2, word3, word4; - } long_double; -extern "C" { - typedef long gid_t; - typedef long uid_t; - struct passwd { - char *pw_name; - char *pw_passwd; - uid_t pw_uid; - gid_t pw_gid; - char *pw_age; - char *pw_comment; - char *pw_gecos; - char *pw_dir; - char *pw_shell; - long pw_audid; - int pw_audflg; - }; - extern struct passwd *getpwuid(uid_t); - extern struct passwd *getpwnam(const char *); - struct s_passwd { - char *pw_name; - char *pw_passwd; - char *pw_age; - long pw_audid; - int pw_audflg; - }; - struct comment { - char *c_dept; - char *c_name; - char *c_acct; - char *c_bin; - }; - extern void setpwent(void); - extern void endpwent(void); - extern struct passwd *getpwent(void); - extern struct passwd *fgetpwent(FILE *); - extern struct s_passwd *getspwent(void); - extern struct s_passwd *getspwuid(int); - extern struct s_passwd *getspwaid(int); - extern struct s_passwd *getspwnam(char *); - extern struct s_passwd *fgetspwent(FILE *); -} -extern int errno; - extern "C" { - extern int errno; - } -extern "C" { - extern void perror(const char*); - extern int sys_nerr; - extern char *sys_errlist[]; - extern char *strerror (int); -} - extern const char *fcvt(double, size_t, int *, int *); - extern char *gcvt(double, size_t, char *); - extern char *ecvt(double, size_t, int *, int *); - extern char *nl_gcvt(double, size_t, char *, int); - extern char *_ldecvt(long_double, size_t, int *, int *); - extern char *_ldfcvt(long_double, size_t, int *, int *); - extern char *_ldgcvt(long_double, size_t, char *); - extern int getpw(int, char *); - extern long a64l(const char *); - extern char *l64a(long); - extern void l3tol(long *, const char *, int); - extern void ltol3(char *, const long *, int); - extern char *getmsg(int, int, int, char *, int); - extern double nl_atof(const char *, int); - extern double nl_strtod(const char *, char **, int); - extern char *ltostr(long, int); - extern char *ultostr(unsigned long, int); - extern char *ltoa(long); - extern char *ultoa(unsigned long); - extern void memorymap(int); - extern struct mallinfo mallinfo(void); - extern int mallopt(int, int); -} -typedef void * POINTER; -typedef FILE * FILE_PTR; -typedef void (*DISPLAYER) (POINTER obj, FILE_PTR fp, FILE_PTR errorFile) ; -typedef void (*DESTROYER) (POINTER obj, FILE_PTR errorFile) ; -typedef void (*RCOUNT_INC) (POINTER obj, FILE_PTR errorFile) ; -typedef int (*COMPARE) (POINTER obj1, POINTER obj2) ; -typedef unsigned long (*HASH_ADDR) (POINTER obj, FILE_PTR errorFile) ; -typedef unsigned long (*HASH_SKIP) (POINTER obj, FILE_PTR errorFile) ; -typedef POINTER - (*ACCESS_FCT) (POINTER target, POINTER sample, FILE_PTR errorFile) ; -typedef POINTER DATA_PTR; - typedef long dev_t; - typedef unsigned long ino_t; - typedef unsigned short mode_t; - typedef short nlink_t; - typedef long off_t; - typedef long pid_t; - typedef long time_t; - typedef int ssize_t; - typedef unsigned short __site_t; - typedef unsigned short __cnode_t; - typedef unsigned long clock_t; - typedef long key_t; - typedef unsigned short __ushort; - typedef long __daddr_t; - typedef char *__caddr_t; - typedef long __swblk_t; - typedef unsigned char u_char; - typedef unsigned short u_short; - typedef unsigned int u_int; - typedef unsigned long u_long; - typedef unsigned int uint; - typedef unsigned short ushort; - typedef __swblk_t swblk_t; - typedef __daddr_t daddr_t; - typedef __site_t site_t; - typedef __cnode_t cnode_t; - typedef __caddr_t caddr_t; - typedef long paddr_t; - typedef short cnt_t; - typedef unsigned int space_t; - typedef unsigned int prot_t; - typedef unsigned long cdno_t; - typedef unsigned short use_t; - typedef struct _physadr { int r[1]; } *physadr; - typedef struct _quad { long val[2]; } quad; - typedef short cpu_t; - typedef struct label_t { - int lbl_rp; - int lbl_sp; - int lbl_s[17]; - int lbl_ss[1]; - double lbl_sf[4]; - } label_t; - typedef char *dm_message; - typedef long aid_t; - typedef pid_t sid_t; - typedef long fd_mask; - typedef struct fd_set { - fd_mask fds_bits[ ((( 2048 )+(( (sizeof(fd_mask) * 8) )-1))/( (sizeof(fd_mask) * 8) )) ]; - } fd_set; -POINTER malloc (size_t size ) ; -POINTER calloc (size_t n , size_t size ) ; -void free (POINTER c ) ; -void mem_report (void ) ; -typedef int BOOLEAN; -typedef enum -{ - eNoErrors = -1, - eUnknownProcessingError = 0, - eAlgorithmFailure = 100, - eAlreadyLocked = 200, - eAttCount = 300, - eAttRedefinition = 400, - eBasicMatrixError = 500, - eBadAddress = 600, - eBadAttribute = 700, - eBadFileNumber = 800, - eBadMode = 900, - eBadVersion = 1000, - eColumnError = 1100, - eConstraintError = 1200, - eLBConstraintError = 1300, - eUBConstraintError = 1400, - eDatabaseError = 1500, - eDataExists = 1600, - eDataNotFound = 1700, - eDictError = 1800, - eDiffAtt = 1900, - eDomain = 2000, - eDuplicateAtt = 2100, - eDuplicateKey = 2200, - eElementMismatch = 2300, - eEmptyAtt = 2400, - eEmptyDict = 2450, - eEmptyLink = 2500, - eEmptyQueue = 2600, - eEmptyStack = 2700, - eEntityExists = 2800, - eEntityNotFound = 2900, - eEtaComputeError = 3000, - eEtaFileError = 3100, - eEtaInverseConsistency = 3200, - eFileExists = 3300, - eFileNotFound = 3400, - eFunctionMismatch = 3500, - eFunctionNotAvailable = 3600, - eFunctionNotFound = 3700, - eFunctionTypeConflict = 3800, - eGraphError = 3900, - eIllegalBMatrixOp = 4000, - eIllegalData = 4100, - eIllegalDeletion = 4200, - eIllegalDictOp = 4300, - eIllegalEtaFileOp = 4400, - eIllegalFunctionRequest = 4500, - eIllegalFunctionType = 4600, - eIllegalGraphOp = 4700, - eIllegalGraphType = 4800, - eIllegalIndex = 4900, - eIllegalInsertion = 5000, - eIllegalListOp = 5100, - eIllegalLPTokenOp = 5200, - eIllegalLPTokenType = 5300, - eIllegalMatrixOp = 5400, - eIllegalMatrixSize = 5500, - eIllegalMatrixState = 5600, - eIllegalMatrixType = 5700, - eIllegalNBMatrixOp = 5800, - eIllegalOperation = 5900, - eIllegalOption = 6000, - eIllegalOverload = 6100, - eIllegalSeek = 6200, - eIllegalType = 6300, - eIllegalVectorOp = 6400, - eIllegalVectorType = 6500, - eIllFormedADT = 6600, - eInconsistentData = 6700, - eInternalError = 6800, - eInUse = 6900, - eInvalidArgument = 7000, - eInvalidAtt = 7100, - eInvalidData = 7200, - eInvalidIndex = 7300, - eInvalidMatrixOp = 7400, - eInvalidOperation = 7500, - eInvalidOption = 7600, - eInvalidParam = 7700, - eInvalidVectorOp = 7800, - eKeyNotFound = 7900, - eLinkNotEmpty = 8000, - eListError = 8100, - eLockAccess = 8200, - eLockExists = 8300, - eLockNotFound = 8400, - eLockReadOnly = 8500, - eLockTrunc = 8600, - eLPTokenError = 8700, - eLPTokenMisuse = 8800, - eMatrixError = 8900, - eMatrixMismatch = 9000, - eMatrixMultiplicationError = 9100, - eMissingData = 9200, - eMysteryError = 9300, - eNameTooLong = 9400, - eNeverLocked = 9500, - eNoAccess = 9600, - eNoLockReq = 9800, - eNoMoreAtt = 9900, - eNoMoreElements = 10000, - eNonBasicMatrixError = 10100, - eNonInvertibleMatrix = 10200, - eNonsenseData = 10300, - eNoSuchKey = 10400, - eNotEnoughSpace = 10500, - eNotFetched = 10600, - eNotLocked = 10700, - eNotSupported = 10800, - eNullPointer = 10900, - eNullInternalPointer = 11000, - eNullCompare = 11050, - eNullData = 11070, - eNullDestroyer = 11100, - eNullDisplayer = 11200, - eNullFunction = 11300, - eRemove = 11400, - eRoundoff = 11500, - eQueueNotEmpty = 11600, - eSparseGraphError = 11700, - eStackError = 11800, - eStackNotEmpty = 11900, - eTLRSProceduralError = 12000, - eTooManyAtt = 12100, - eTooManyLocks = 12200, - eTypeConflict = 12300, - eUnexpectedType = 12400, - eUnixError = 12500, - eVectorMismatch = 12600, - eProcessingError = 15000, - eActionKludge = 15100, - eNotImplemented = 15200, - eNotStable = 15300, - eNotReleased = 15400, - eBeingWorkedOn = 15500 -} eErrorState; -extern "C" { -extern eErrorState spider_errno; -extern char err_string[]; -POINTER mallocate (size_t n ) ; -size_t pagesize (void ) ; -POINTER page_mallocate (void ) ; -POINTER make_memory_token (int size , int page_cnt, const char *name) ; -POINTER mem_malloc (POINTER mptr ) ; -void mem_free (POINTER mptr , POINTER obj ) ; -const char *get_double_string (char *buffer , double num ) ; -int spider_strcat (const char *proc , char *str1 , const char *str2 , int maxlen ) ; -void init_errors (void ) ; -void append_abort (const char *proc ) ; -void append_message (const char *proc , const char *msg ) ; -void set_errno (eErrorState err ) ; -void spider_perror (const char *proc , FILE_PTR errorFile ) ; -void append_not_implemented (const char *proc , int *target_errno ) ; -const char *GetBooleanString (BOOLEAN bool ) ;// ERROR - use of bool as identifier -double truncate_value (double x , double epsilon ) ; -double log2 (double x ) ; -int ceil_log2 (double x ) ; -int floor_log2 (double x ) ; -} -extern "C" { -extern char char80[], char128[], char160[], char512[]; -extern char char1000[], char2000[]; -extern char char320[]; -BOOLEAN Get_EM_StderrFlag (void ) ; -void Set_EM_StderrFlag (BOOLEAN printToStderr ) ; -void CheckReleaseState (eErrorState releaseState , const char *procName, FILE_PTR errorFile ) ; -void PrintErrorString (const char *errorString , FILE_PTR errorFile ) ; -const char *get_error_header (eErrorState errorState ) ; -void print_error_header (eErrorState errorState , FILE_PTR errorFile ) ; -void PrintErrorMessage (eErrorState errorState , const char *message , FILE_PTR errorFile ) ; -} -extern "C" { -extern short show_increment_rcount; -extern int errno; -extern int bmk_errno; -extern int ck_errno; -extern int db_errno; -extern int dict_errno; -extern int glh_errno; -extern int graph_errno; -extern int hash_errno; -extern int link_errno; -extern int lp_errno; -extern int matrix_errno; -extern int nbmk_errno; -extern int network_errno; -extern int queue_errno; -extern int set_kernel_errno; -extern int stack_errno; -} -extern "C" { -const char *spider_version_string (void ) ; -int spider_version (void ) ; -const char *spider_errstring (void ) ; -void append_perror (const char *s ) ; -void unix_perror (const char *s ) ; -} -typedef struct node a_dict_node, * DICT_NODE; -struct node { - POINTER info; - DICT_NODE left; - DICT_NODE right; - DICT_NODE prev; - DICT_NODE next; -}; -typedef struct tree a_dict, * DICT; -struct tree { - int size; - COMPARE comp; - DICT_NODE header; - DICT_NODE last_accessed; - DICT_NODE list_head; - DICT_NODE list_tail; -}; -typedef enum { PREORDER = -1, INORDER, POSTORDER } traversal_t; -extern "C" { -void dict_set_nopages (int desired_nopages ) ; -void dict_err (void ) ; -const char *traversal_string (traversal_t tr ) ; -DICT make_dictionary (COMPARE cmp ) ; -int dict_insert (POINTER item , DICT dict ) ; -int dict_delete (POINTER item , DICT dict ) ; -POINTER dict_access (POINTER item , DICT dict ) ; -POINTER dict_low (DICT dict ) ; -POINTER dict_nlow (DICT dict ) ; -POINTER dict_big (DICT dict ) ; -POINTER dict_nbig (DICT dict ) ; -POINTER dict_first (DICT dict ) ; -POINTER dict_next (DICT dict ) ; -POINTER dict_last (DICT dict ) ; -POINTER dict_prev (DICT dict ) ; -int clear_dictionary (DICT dict , DESTROYER destroy , FILE *errorFile ) ; -int dict_size (const a_dict *dict ) ; -POINTER dict_elem (int index , DICT dict ) ; -int dict_compare (DICT d1 , DICT d2 ) ; -DICT dict_copy (DICT di , COMPARE cmp ) ; -int dict_change_compare (DICT di , COMPARE cmp ) ; -int dict_height (DICT di ) ; -void dict_print_stats (FILE *fp , DICT di ) ; -void dict_print (FILE *fp , DICT di , traversal_t tr , DISPLAYER display ) ; -const char *dict_version (void ) ; -void init_dict_errors (void ) ; -const char *dict_errstring (void ) ; -void dict_append_perror (const char *s ) ; -void dict_perror (const char *s ) ; -extern int dict_errno; -} -typedef struct q_item { - struct q_item *next; - POINTER data; -} a_q_item, *Q_ITEM; -typedef struct { - int rcount; - Q_ITEM first; - Q_ITEM last; - int count; -} a_queue, *QUEUE; -extern "C" { -void queue_err (void) ; -void queue_set_nopages (int desired_nopages) ; -QUEUE make_queue (void ) ; -POINTER queue_look (const a_queue * Q ) ; -POINTER queue_last (const a_queue * Q ) ; -POINTER queue_remove (QUEUE Q ) ; -int queue_append (QUEUE Q , POINTER data ) ; -int queue_size (const a_queue * Q ) ; -void queue_destroy (POINTER ptr , FILE_PTR errorFile ) ; -void IncrementQRCount (POINTER ptr , FILE_PTR errorFile ) ; -const char *queue_version (void ) ; -void init_queue_errors (void ) ; -const char *queue_errstring (void ) ; -void queue_append_perror (const char *s ) ; -void queue_perror (const char *s ) ; -extern int queue_errno; -} -typedef struct s_item { - struct s_item *next; - POINTER data; -} a_s_item, *S_ITEM; -typedef struct stack { - int rcount; - S_ITEM top; - int count; -} a_stack, *STACK; -extern "C" { -void stack_err (void) ; -void stack_set_nopages (int desired_nopages) ; -STACK make_stack (void ) ; -POINTER stack_look (const a_stack * S ) ; -POINTER stack_pop (STACK S ) ; -int stack_push (STACK S , POINTER data ) ; -int stack_size (const a_stack * S ) ; -void stack_destroy (POINTER ptr , FILE_PTR errorFile ) ; -void IncrementSRCount (POINTER ptr , FILE_PTR errorFile ) ; -const char *stack_version (void ) ; -void init_stack_errors (void ) ; -const char *stack_errstring (void ) ; -void stack_append_perror (const char *s ) ; -void stack_perror (const char *s ) ; -extern int stack_errno; -} -typedef const char *(*STRINGER)(const void *ptr); -int default_compare(const void *p1, const void *p2); -void default_displayer(const void *ptr, FILE *fp, FILE *errorFile); -const char *default_stringer(const void *ptr); -const char *object_stringer(const void *ptr); -class object { - static long current_id; - static long next_id(); -protected: - void display2(ostream &fp = cout) const; - long id; -public: - object() { id = next_id(); } - object(const object &obj) { id = next_id(); } - virtual ~object() - { - if (799 >= 999 ) cout << "~object() executing..." << '\n'; ; - } - object & operator = (const object & obj) - { - return( *this ); - } - virtual int compare(const void *p2) const; - virtual void display(ostream & fp = cout) const - { - display2(fp); - } - operator char *() const; -}; -ostream & operator << (ostream & fp, object & obj); -int operator < (object & obj1, object & obj2); -int operator <= (object & obj1, object & obj2); -int operator > (object & obj1, object & obj2); -int operator >= (object & obj1, object & obj2); -int operator == (object & obj1, object & obj2); -int operator != (object & obj1, object & obj2); -void null_destroy(void *p, FILE *errorFile); -void object_destroy(void *p, FILE *errorFile); -int object_compare(const void *p1, const void *p2); -void object_display(const void *p, FILE *fp, FILE *errorFile); -class dict : public object { - class internal { - public: - DICT di; - int errno; - COMPARE compare_f; - DISPLAYER display_f; - DESTROYER destroy_f; - STRINGER string_f; - int count; - void append_error(int expr, const char *proc) - { - if (expr) dict_append_perror(proc); - errno = dict_errno; - } - void obj_error(int expr, const char *proc, const void *obj) - { - if (expr) { - dict_append_perror((*string_f)(obj)); - dict_append_perror(proc); - } - errno = dict_errno; - } - internal(COMPARE cmp, DESTROYER destroyer, - DISPLAYER displayer, STRINGER str_f) - {// ERROR - candidate for bad call - if (799 >= 800 ) cout << "Creating new dictionary..." << '\n'; ; - if (cmp == __null ) cmp = &default_compare; - if (displayer == __null ) displayer = &default_displayer; - if (str_f == __null ) str_f = &default_stringer; - compare_f = cmp; - display_f = displayer; - destroy_f = destroyer; - string_f = str_f; - di = make_dictionary(compare_f); - append_error(di == __null , "dict internal"); - if (di == __null ) { - dict_perror("build dictionary"); - exit(errno); - } - count = 1; - } - ~internal() - { - if (799 >= 800 ) cout << "dict ~internal executing" << '\n'; ; - int err = clear_dictionary(di, destroy_f, (&__iob[2]) ); - append_error(err, "clear dictionary"); - if (err) dict_perror("dict ~internal"); - free((void *)di); - } - };// ERROR - candidate list for bad call - internal *rep; -protected: - int & errno() { return( rep->errno ); } - COMPARE compare_f() { return( rep->compare_f ); } - DISPLAYER display_f() { return( rep->display_f ); } - DESTROYER destroy_f() { return( rep->destroy_f ); } - STRINGER string_f() { return( rep->string_f ); } - void append_error(int expr, const char *proc) - { - rep->append_error(expr, proc); - } - void obj_error(int expr, const char *proc, const void *obj) - { - rep->obj_error(expr, proc, obj); - } -public: - static int err; - static int val; - static void *p; - dict() - { - if (799 >= 800 ) cout << "Default constructor executing..." << '\n'; ; - rep = new internal( &default_compare, &null_destroy, - &default_displayer, &default_stringer);// ERROR - no matching fn call - } - dict(COMPARE cmp, - DESTROYER destroyer = __null , - DISPLAYER displayer = &default_displayer, - STRINGER str_f = &default_stringer) - {// ERROR - invalid type for default argument -- not expecting const - rep = new internal(cmp, destroyer, displayer, str_f); - } - dict(const dict &di2) - { - rep = di2.rep; - rep->count ++; - if (799 >= 800 ) cout << "Incrementing count to " << rep->count << '\n'; ; - } - dict & operator = (const dict &di2) - { - di2.rep->count ++; - if (799 >= 800 ) cout << "Incrementing di2 count to " << di2.rep->count << '\n'; ; - if (799 >= 800 ) cout << "Decrementing lvalue count to " << rep->count-1 << '\n'; ; - if (--rep->count <= 0) { - delete rep; - } - rep = di2.rep; - return( *this ); - } - ~dict() - { - if (799 >= 800 ) cout << "~dict executing..." << '\n'; ; - if (799 >= 800 ) cout << "Decrementing dict::internal count to " << rep->count-1 << '\n'; ; - if (--rep->count <= 0) delete rep; - } - int insert(POINTER item) - { - err = dict_insert(item, rep->di); - obj_error(err, "insert", item); - return errno(); - } - int remove(POINTER item) - { - err = dict_delete(item, rep->di); - obj_error(err, "remove", item); - return errno(); - } - POINTER access(POINTER item) - { - p = dict_access(item, rep->di); - obj_error(p == __null , "access", item); - return(p); - } - POINTER low() - { - p = dict_low(rep->di); - append_error(p == __null , "low"); - return(p); - } - POINTER nlow() - { - p = dict_nlow(rep->di); - append_error(p == __null , "nlow"); - return(p); - } - POINTER big() - { - p = dict_big(rep->di); - append_error(p == __null , "big"); - return(p); - } - POINTER nbig() - { - p = dict_nbig(rep->di); - append_error(p == __null , "nbig"); - return(p); - } - POINTER first() - { - p = dict_first(rep->di); - append_error(p == __null , "first"); - return(p); - } - POINTER last() - { - p = dict_last(rep->di); - append_error(p == __null , "last"); - return(p); - } - POINTER next() - { - p = dict_next(rep->di); - append_error(p == __null , "next"); - return(p); - } - POINTER prev() - { - p = dict_prev(rep->di); - append_error(p == __null , "prev"); - return(p); - } - int clear(DESTROYER destroy, FILE *fp = (&__iob[2]) ) - { - err = clear_dictionary(rep->di, destroy, fp); - append_error(err, "clear"); - return errno(); - } - int clear(FILE *fp = (&__iob[2]) ) - { - err = clear_dictionary(rep->di, rep->destroy_f, fp); - append_error(err, "clear"); - return errno(); - } - int size() - { - val = dict_size(rep->di); - append_error(val < 0, "size"); - return(val); - } - POINTER elem(int index) - { - p = dict_elem(index, rep->di); - append_error(p == __null , "elem"); - return(p); - } - int compare(dict &di2) - { - val = dict_compare(rep->di, di2.rep->di); - return(val); - } - int height() - { - val = dict_height(rep->di); - append_error(val < 0, "height"); - return(val); - } - const char * version() - { - return( dict_version() ); - } - void display(FILE *fp = (&__iob[1]) ) - { - dict_print_stats(fp, rep->di); - } - void print(FILE *fp = (&__iob[1]) , traversal_t tr = INORDER) - { - fprintf(fp, "====== DICTIONARY (count=%d) ======\n", - rep->count); - dict_print(fp, rep->di, tr, rep->display_f); - } - void print(traversal_t tr, FILE *fp = (&__iob[1]) ) - { - fprintf(fp, "====== DICTIONARY (count=%d) ======\n", - rep->count); - dict_print(fp, rep->di, tr, rep->display_f); - } - void error(const char *s = "class dict") - { - dict_errno = errno(); - dict_perror(s); - errno() = 0; - } - void error_append(const char *s = "class dict") - { - dict_append_perror(s); - } - const char * errstring() - { - return( dict_errstring() ); - } -}; -ostream & operator << (ostream & fp, traversal_t tr); -class queue : public object { - class internal { - public: - QUEUE Q; - QUEUE Q2; - int errno; - DISPLAYER display_f; - DESTROYER destroy_f; - STRINGER string_f; - int count; - int swap() - { - QUEUE tmp = Q; - Q = Q2; - Q2 = tmp; - } - void append_error(int expr, const char *proc) - { - if (expr) queue_append_perror(proc); - errno = queue_errno; - } - void obj_error(int expr, const char *proc, const void *obj) - { - if (expr) { - queue_append_perror((*string_f)(obj)); - queue_append_perror(proc); - } - errno = queue_errno; - } - internal(DESTROYER destroyer, - DISPLAYER displayer, STRINGER str_f) - {// ERROR - candidate for bad call - if (799 >= 800 ) cout << "Creating new queue..." << '\n'; ; - if (displayer == __null ) displayer = &default_displayer; - if (str_f == __null ) str_f = &default_stringer; - display_f = displayer; - destroy_f = destroyer; - string_f = str_f; - Q = make_queue(); - append_error(Q == __null , "queue internal"); - errno = queue_errno; - if (Q == __null ) { - queue_perror("build queue"); - exit(errno); - } - Q2 = make_queue(); - append_error(Q2 == __null , "queue internal"); - if (Q2 == __null ) { - queue_perror("build second queue"); - exit(errno); - } - count = 1; - } - ~internal() - { - if (799 >= 800 ) cout << "queue ~internal executing" << '\n'; ; - while ((p = queue_remove(Q)) != __null ) { - if (destroy_f != __null ) { - (*destroy_f)((POINTER)&p, (&__iob[2]) ); - } - } - queue_errno = 0; - queue_destroy((POINTER)&Q, (&__iob[2]) ); - if (queue_errno) { - append_error(queue_errno, - "queue_destroy(Q)"); - queue_perror("queue ~internal"); - } - queue_errno = 0; - queue_destroy((POINTER)&Q2, (&__iob[2]) ); - if (queue_errno) { - append_error(queue_errno, - "queue_destroy(Q2)"); - queue_perror("queue ~internal"); - } - } - };// ERROR - list of candidates for bad call - internal *rep; -protected: - int & errno() { return( rep->errno ); } - DISPLAYER display_f() { return( rep->display_f ); } - DESTROYER destroy_f() { return( rep->destroy_f ); } - STRINGER string_f() { return( rep->string_f ); } - void append_error(int expr, const char *proc) - { - rep->append_error(expr, proc); - } - void obj_error(int expr, const char *proc, const void *obj) - { - rep->obj_error(expr, proc, obj); - } -public: - static int err; - static int val; - static void *p; - queue() - { - if (799 >= 800 ) cout << "Default constructor executing..." << '\n'; ; - rep = new internal( &null_destroy, - &default_displayer, &default_stringer);// ERROR - no matching fn for call - } - queue(DESTROYER destroyer = __null , - DISPLAYER displayer = &default_displayer, - STRINGER str_f = &default_stringer) - {// ERROR - invalid type for default argument -- not expecting const - rep = new internal(destroyer, displayer, str_f); - } - queue(const queue &Q2) - { - rep = Q2.rep; - rep->count ++; - if (799 >= 800 ) cout << "Incrementing count to " << rep->count << '\n'; ; - } - queue & operator = (const queue &Q2) - { - Q2.rep->count ++; - if (799 >= 800 ) cout << "Incrementing Q2 count to " << Q2.rep->count << '\n'; ; - if (799 >= 800 ) cout << "Decrementing lvalue count to " << rep->count-1 << '\n'; ; - if (--rep->count <= 0) { - delete rep; - } - rep = Q2.rep; - return( *this ); - } - ~queue() - { - if (799 >= 800 ) cout << "~queue executing..." << '\n'; ; - if (799 >= 800 ) cout << "Decrementing queue::internal count to " << rep->count-1 << '\n'; ; - if (--rep->count <= 0) delete rep; - } - void error(const char *s = "class queue") - { - queue_errno = errno(); - queue_perror(s); - errno() = 0; - } - void error_append(const char *s = "class queue") - { - queue_append_perror(s); - } - const char * errstring() - { - return( queue_errstring() ); - } - int append(POINTER item) - { - err = queue_append(rep->Q, (POINTER)item); - obj_error(err, "append", item); - return errno(); - } - POINTER remove() - { - p = queue_remove(rep->Q); - append_error(p == __null , "remove"); - return(p); - } - POINTER look(POINTER item) - { - p = queue_look(rep->Q); - append_error(p == __null , "look"); - return(p); - } - POINTER last(POINTER item) - { - p = queue_last(rep->Q); - append_error(p == __null , "last"); - return(p); - } - int size() - { - val = queue_size(rep->Q); - append_error(val < 0, "size"); - return(val); - } - const char * version() - { - return( queue_version() ); - } - void display(FILE *fp = (&__iob[1]) ) - { - int i = 1; - POINTER ptr; - fprintf(fp, "====== QUEUE DISPLAY (size %d) ======\n", - size()); - while (ptr = remove()) { - err = queue_append(rep->Q2, ptr); - if (err) { - obj_error(err, "append", ptr); - error("queue_append(rep->Q2)"); - } - fprintf(fp, "[%d] ", i++); - (*rep->display_f)(ptr, fp, (&__iob[2]) ); - } - rep->swap(); - } -}; -long object::current_id = 0; -long object::next_id() -{ - return( ++current_id ); -} -void object::display2(ostream & fp) const -{ - fp << "object #" << id; -} -ostream & operator << (ostream & fp, object & obj) -{ - obj.display(fp); - return(fp); -} -int object::compare(const void *p2) const -{ - const object & z2 = *(const object *) p2; - if (799 >= 1000 ) cout << "*** object::compare " << *this << " with " << z2 << '\n'; ; - return( id - z2.id ); -} -int operator < (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) < 0) return(1); - else return(0); -} -int operator <= (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) <= 0) return(1); - else return(0); -} -int operator > (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) > 0) return(1); - else return(0); -} -int operator >= (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) >= 0) return(1); - else return(0); -} -int operator == (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) == 0) return(1); - else return(0); -} -int operator != (object & obj1, object & obj2) -{ - if (obj1.compare( &obj2 ) != 0) return(1); - else return(0); -} -void null_destroy(void *p, FILE *errorFile) -{ -} -int object_compare(const void *p1, const void *p2) -{ - const object *obj1 = (const object *) p1; - if (799 >= 1000 ) cout << "*** Comparing " << *obj1 << " to address " << long(p2) << '\n'; ; - return( obj1->compare(p2) ); -} -void object_display(const void *p, FILE *fp, FILE *errorFile) -{ - cout << *(object *)p << '\n'; -} -void object_destroy(void *p, FILE *errorFile) -{ - object **pObj = (object **)p; - object *obj = *pObj; - if (obj == __null ) { - if (799 >= 10 ) cout << "+ object_destroy: NIL object passed in" << '\n'; ; - return; - } - if (799 >= 998 ) cout << "+ object_destroy: delete obj:" << '\n'; ; - if (799 >= 998 ) cout << *obj << '\n'; ; - if (799 >= 998 ) cout << "====================================================" << '\n'; ; - delete obj; - *pObj = __null ; -} -int default_compare(const void *p1, const void *p2) -{ - long L1 = long(p1); - long L2 = long(p2); - if (799 >= 1000 ) cout << "+ default_compare " << long(p1) << ',' << long(p2) << '\n'; ; - if (L1 < L2) return(-1); - else if (L1 > L2) return(1); - else return(0); -} -const char * default_stringer(const void *ptr) -{ - static char buf[100]; - sprintf(buf, "ADDRESS %lu", (unsigned long)ptr); - return(buf); -} -void default_displayer(const void *ptr, FILE *fp, FILE *errorFile) -{ - fprintf(fp, "%s\n", default_stringer(ptr)); -} -object::operator char *() const -{ - const int max = 10; - const int maxChar = 16; - static char buf[max][maxChar]; - static int index = 0; - char *s = buf[index++ % max]; - sprintf(s, "object #%d", id); - return(s); -} -const char * object_stringer(const void *ptr) -{ - object & obj = *(object *)ptr; - return((char *)obj); -} -int dict::err; -int dict::val; -POINTER dict::p; -ostream & operator << (ostream & fp, traversal_t tr) -{ - fp << traversal_string(tr); - return(fp); -} -int queue::err; -int queue::val; -POINTER queue::p; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash2.C deleted file mode 100755 index ad6e040..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// The compiler used to crash on this example. - -class x { -public: - x(); - static const x y[23]; -}; -const x x::y[23]; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash20.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash20.C deleted file mode 100755 index 7704b98..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash20.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include <complex> -typedef complex<double> Complex; - -Complex ComputeVVself() -{ -Complex temp1; -Complex self[3][3]; - - self[1][2] = 100.0; - return self[1][2]; - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash22.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash22.C deleted file mode 100755 index f7db97d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash22.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -struct A { - void a1(); - void a2(); -}; - -struct B { - void A::a1(); // this used to die in chainon(), now grokdeclarator should// ERROR - cannot declare.* - void A::a2(); // should be fixed by the 930629 change.// ERROR - cannot declare.* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash23.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash23.C deleted file mode 100755 index 03ffee6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash23.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// This used to die in chainon; it shouldn't any more. - -class A -{ -public: - class B { - public: - void f (); - void g (int); - }; - void B::f () {}// ERROR - .* - void B::g (int val) {}// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash24.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash24.C deleted file mode 100755 index af1c301..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash24.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// Special g++ Options: -O -// GROUPS passed old-abort -// gcc puts the array into a register, and then the store_bit_field () code -// in expmed.c gets confused when it tries to store zero past the end of the -// register (because the index is past the array bounds). It ends up calling -// store_split_bit_field, which then aborts, because we don't have a split bit -// field. -// -// Seems easiest to detect this case in the front end, i.e. access outside the -// array bounds, and then force the array to be allocated on the stack instead -// of a register. - -main() -{ - char i[1]; - - i[1] = 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash25.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash25.C deleted file mode 100755 index 625eaf8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash25.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class memo{ -public: - static int rep; -}; - -class port_head : public memo { -public: - static int rep; - unsigned cap(); -}; - -class buff_head : private port_head { -public: - static int rep; - port_head::cap; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash26.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash26.C deleted file mode 100755 index 9b6643d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash26.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -struct B { - B(); -}; - -class C : virtual public B -{ - public: - C() { } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash27.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash27.C deleted file mode 100755 index 62acbe0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash27.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class First { -public: - First(const First& a); -}; - -class Second { - int i; - First f; -public: - ~Second() {} - Second func(); -}; - -void foo() -{ - extern Second x; - x = x.func(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash28.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash28.C deleted file mode 100755 index 08adee9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash28.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort - class abc - { - public: - void F() { return; } - - private: - typedef int myint; - typedef struct { int b; } mystruct; - typedef union { int c; } myunion; - }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash29.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash29.C deleted file mode 100755 index 72bbdc7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash29.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort - -union Value -{ - Value(){} -}; - -struct GlobalAddress -{ - GlobalAddress(Value *nvar){}// ERROR - .* -};// ERROR - candidates .* - -int -main() -{ - new GlobalAddress(Value()); // internal error occured here// ERROR - no matching function .* - //new GlobalAddress(new Value()); // This line is correct code -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash3.C deleted file mode 100755 index b3b8354..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -int strcmp(); - -extern "C" { - // dies in common_type, cuz the TREE_TYPE of t2 is 0, so it can't get its - // TYPE_MAIN_VARIANT value. - // <void_type 184510 void permanent VOID - // size <integer_cst 1844e0 type <integer_type 182548 int> constant permanent 0 - // align 1 symtab 0 - // pointer_to_this <pointer_type 1845e0> - -int strcmp(const char*, const char*); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash30.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash30.C deleted file mode 100755 index 707e898..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash30.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include <string> - -int -main(void) { - - string a[] = {"Hello"}; - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash31.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash31.C deleted file mode 100755 index d5b7e54..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash31.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -struct mbuf { - struct mbuf *next; -}; - -void* malloc(int); -struct mbuf * -mbuf_allocate(int size) -{ - struct mbuf *bp; - - bp = (struct mbuf *) malloc( 10 /*(unsigned) (size + sizeof(struct mbuf))*/); - return bp; - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash32.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash32.C deleted file mode 100755 index ebca5a4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash32.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// Special g++ Options: -fshort-enums -// GROUPS passed old-abort -enum Bool { FALSE, TRUE }; -Bool foo () { return TRUE; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash33.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash33.C deleted file mode 100755 index d89fa7b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash33.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -extern void foo(void *); -int -main() { - foo((struct bar *)0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash34.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash34.C deleted file mode 100755 index a147b62..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash34.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -operator int () {}// ERROR - .*// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash35.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash35.C deleted file mode 100755 index e32b7c1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash35.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -const unsigned int ENET_INTERRUPT_MID = 5; - -extern "C" void ENET_RxP(); - -class EnetReceiver - { - public: - friend void ENET_RxP(); - void receiveMessage(); - int *messagePointer; - }; - -void EnetReceiver::receiveMessage() - { - if (*((unsigned int*) messagePointer) == ENET_INTERRUPT_MID) - { - } - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash36.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash36.C deleted file mode 100755 index 1053453..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash36.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -struct wait { int w_status; }; -int wait(); -extern "C" int wait(int*); - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash37.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash37.C deleted file mode 100755 index 18eb64a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash37.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -typedef int _sigset_t; -extern "C" { - extern int sigaction(int signo, const struct sigaction *action_spec_p, struct sigaction *old_action_p); -} -extern "C" { - extern void foo(); -}; -class SS { - friend void foo(); -protected: - void goo(); -}; -inline void -SS::goo() { } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash38.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash38.C deleted file mode 100755 index eeb70e1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash38.C +++ /dev/null @@ -1,43 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -/* - I received the following message when using g++ (version 2.3.3): - - main.cc: In method 'Implicit<implicit<INTEGER,2>,3>::Implicit()': - main.cc: Internal compiler error 241. - main.cc: Please report this to 'bug-g++@prep.ai.mit.edu' - */ - -#include <stream.h> - -class INTEGER { -int x; -public: - typedef int BASE; - INTEGER(int y) : x(y) {} - INTEGER() {} - void encode() { cout << "Integer encoder";} - int operator=(int y) { x=y; return x; } - operator int() {return x; } -}; - -template< class T, int n> class Implicit : public T { - public: - typedef typename T::BASE BASE; - Implicit(BASE value ): T(value) {}; - Implicit() : T() {}; - int myTag() { return n; } - void encode() { T::encode(); } - BASE operator=(BASE t) { return T::operator=(t); } -}; - -int -main() -{ - Implicit<Implicit<INTEGER, 2> , 3> y; - - y = 10; -}; - - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash39.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash39.C deleted file mode 100755 index a191872..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash39.C +++ /dev/null @@ -1,33 +0,0 @@ -// Build don't link: -// Special g++ Options: -w -// GROUPS passed old-abort -//#include <GetOpt.h> -#include <stdio.h> - -class GetOpt -{ -private: - static char *nextchar; - enum OrderingEnum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; - OrderingEnum ordering; - static int first_nonopt; - static int last_nonopt; - void exchange (char **argv); -public: - char *optarg; - int optind; - int opterr; - - int nargc; - char **nargv; - const char *noptstring; - - GetOpt (int argc, char **argv, const char *optstring); - int operator () (void); -}; -//end <GetOpt.h> -#include <string> - -class foo {public: foo () {}}; -class bar {public: bar (const foo& dflt);}; -class baz: public bar {public: baz (): bar (foo ()) {}}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash4.C deleted file mode 100755 index 1f8a3ff..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash4.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -typedef struct Thing { - Thing(); - int x; -} Thing; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash40.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash40.C deleted file mode 100755 index dcebfbe..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash40.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class foo { - -public: - - virtual foo &operator <<(foo &(foo::*)(foo &)); -}; - - -foo &foo::operator<<(foo &(foo::*manip)(foo &)) -{ - - (this->*manip)(*this); - - return *this; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash41.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash41.C deleted file mode 100755 index 5d533b8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash41.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -typedef void (**ppfn)(void); - -int main() { - ppfn fn; - - fn = new (void(*)(void)); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash42.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash42.C deleted file mode 100755 index 1b92f5d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash42.C +++ /dev/null @@ -1,6 +0,0 @@ -// GROUPS passed old-abort -// Build don't link: -int fn();// ERROR - ambiguates.* -int x; -int& fn() {// ERROR - new decl.* -return x;} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash43.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash43.C deleted file mode 100755 index 5fe5423..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash43.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// Special g++ Options: -g -fno-strict-prototype -// GROUPS passed old-abort -// excess errors test - XFAIL sparc64-*-elf -extern "C" { typedef int jmp_buf[12]; } - -enum Error { NO_ERROR }; -class ErrorHandler -{ - ErrorHandler *previous; - static ErrorHandler *error_stack; - jmp_buf error_buffer; -protected: - static void pop() - { - error_stack = error_stack->previous; - } -public: - jmp_buf *push() - { - previous = error_stack; - error_stack = this; - return &error_buffer; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash44.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash44.C deleted file mode 100755 index 00a4df4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash44.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -template <class T> class bug { - -public: - void Foo(const int = 0); - void NotRedeclared(const int); - -private: - T TheItem; -}; - -template <class T> void bug<T>::NotRedeclared(const int) -{ -} - -template <class T> void bug<T>::Foo(const int) -{ -} - -int -main() -{ - bug<char> InstantiatedBug; - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash45.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash45.C deleted file mode 100755 index 269a519..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash45.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -void foo() { static const char *const v[] = { 0 }; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash46.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash46.C deleted file mode 100755 index 64d8d59..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash46.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class Rational { -public: - Rational(int v): value(v) - { } - - int value; -}; -typedef Rational __Rational; - -extern int operator>(const Rational&, const Rational&); - -class V { -public: - class Rational { - public: - static int x(const __Rational& value); - }; -}; - -int -V::Rational::x(const __Rational& value) -{ - return value > 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash47.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash47.C deleted file mode 100755 index 9bdbb11..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash47.C +++ /dev/null @@ -1,94 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -const int TRUE = 1; -const int FALSE = 0; - -class Rep { -protected: - Rep(): count(0) - { } - Rep(const Rep& other): count(0) - { } - - Rep& operator=(const Rep& other) - { /* DO NOT copy over other.count */ - return *this; } - -public: // TODO - for now - // Because it is to hard to restrict these operations to the descendants - // of Rep<REP> that we haven't named yet. So we just make them public. - void inc() - { count++; } - void dec() - { if (0 == --count) delete this; } -private: - unsigned count; -}; - -template<class REP> -class Ref { -public: - Ref(): rep(0) - { } - Ref(const Ref<REP>& other): rep(other.rep) - { if (rep) rep->inc(); } - ~Ref() - { if (rep) rep->dec(); - rep = 0; } - - Ref<REP>& operator=(const Ref<REP>& other) - { if (rep != other.rep) { - if (rep) rep->dec(); - rep = other.rep; - if (rep) rep->inc(); } - return *this; } - - bool null() const - { return 0 == rep ? TRUE: FALSE; } - bool valid() const - { return 0 != rep ? TRUE: FALSE; } - - REP* operator->() const // should be a valid() reference - { return rep; } - operator REP*() const; // should be a valid() reference - -protected: - REP *rep; - - Ref(REP *r): rep(r) - { if (rep) rep->inc(); } - - Ref<REP>& operator=(REP *r) - { if (rep != r) { - if (rep) rep->dec(); - rep = r; - if (rep) rep->inc(); } - return *this; } -}; - -template<class REP> -Ref<REP>::operator REP*() const // should be a valid() reference -{ return rep; } - -template<class REP> -inline int -operator==(const Ref<REP>& a, const Ref<REP>& b) -{ return (REP *) a == (REP *) b; } - -template<class REP> -inline int -operator!=(const Ref<REP>& a, const Ref<REP>& b) -{ return (REP *) a != (REP *) b; } - -class XRep: public Rep { -public: - int i; -}; - -int -main() -{ - Ref<XRep> y; - - return y != y; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash48.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash48.C deleted file mode 100755 index 6dc9da0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash48.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class internal { - int field; - int anotherfield; -}; // ERROR - candidates are - -class bug { - internal* numbers; - bug(int size); -}; // ERROR - several errors - -bug::bug(int size) -{ // ERROR - candidates - numbers = new internal(size * size);// ERROR - no match.* -} - -int -main() -{ - bug test;// ERROR - no match -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash49.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash49.C deleted file mode 100755 index 98a580d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash49.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include<iostream.h> - -const int keys = 10; -const int key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]}; - -void main() -{ // ERROR - return type for main - for(int i = 0; i < keys;) cout << key[i++] << " "; - endl(cout); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash5.C deleted file mode 100755 index 0e82e16..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash5.C +++ /dev/null @@ -1,107 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// Should have been fixed by: -// -// Sun Jun 13 12:55:22 1993 Brendan Kehoe (brendan@lisa.cygnus.com) -// -// * cp-cvt.c (build_default_binary_type_conversion): Look deeper into -// what ARG1 and ARG2 are if they're POINTER_TYPEs. - -volatile void exit(int); - -class CountableSet -{ - public: - virtual ~CountableSet() { } -}; - -template<class T> -class FixedSet : virtual public CountableSet -{ - public: - virtual int Get(int, T&) = 0; - virtual ~FixedSet() { } -}; - -class ShrinkableSet -{ - public: - virtual int Remove(int) = 0; -}; - -template<class T> -class PVSet : virtual public FixedSet<T>, virtual public ShrinkableSet -{ - public: - virtual void Append(const T&) = 0; - virtual void operator+=(const T& a) { Append(a); } - virtual ~PVSet() { } -}; - -template<class T> -class MutSet : virtual public FixedSet<T>, virtual public FixedSet<T *> -{ - protected: - typedef T *Tp; - - public: - void Append(const Tp& tp) { Append(*tp); } - - T& Access(int p) - { - Tp tp; - Get(p, tp); - return *tp; - } - virtual ~MutSet() { } -}; - -template <class T> -class SimpleSet : virtual public MutSet<T> -{ - protected: - T *array; - int size; - - virtual void Allocate(int s) - { - array = new T[s]; - } - public: - SimpleSet() - { - size = 0; - array = ((void*)0) ; // ERROR - implicit conversion - } - int Get(int p, T& t) - { - t = array[p-1]; - return 1; - } - int Get(int p, T *& t) - { - t = &array[p-1]; - return 1; - } - inline void Append(const T& a) - { - array[size-1] = a; - } - inline int Remove(int n) { return 0; } -}; - -class Dummy -{ - public: - Dummy() {} -}; - -int -main() -{ - SimpleSet<Dummy *> bs1; - int i, j; - Dummy foo; - - bs1+=&foo;// ERROR - no .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash50.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash50.C deleted file mode 100755 index fd87d75..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash50.C +++ /dev/null @@ -1,29 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class B - { -public: - int i; - }; -int operator & (const B &s) { return ( s.i );}; - - - - - -class C - { -public: - C &operator = (const C &x) - { - return *this; - }; - }; - -C &(C::*DD)(const C &x) = &C::operator=; - -int main() -{ - ⅅ - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash51.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash51.C deleted file mode 100755 index 3586eb4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash51.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class obj; - -typedef obj *obj_t; - -class obj { -public: - obj( const obj& o ); -}; - -extern obj nowhere; - -class set: public obj { - unsigned bit_vector; -public: - set( const obj& o ); - set& operator|=( const int q ); -}; - -enum pin_enum { E_F, O_C, O_D, O_S, P_D, P_U, R, T, A, C }; - -set t_q = ( ( ( ( ( ( set( nowhere ) |= E_F ) |= O_C ) |= O_D ) |= O_S ) - |= P_U ) |= P_D ) |= T; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash52.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash52.C deleted file mode 100755 index d10afdc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash52.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include <iostream.h> - -class A { -public: - friend A f(A &a);// ERROR - ambiguates.* -}; - -A &f(A &a) {// ERROR - new decl.* - cout << "Blah\n"; -} // ERROR - non-void function - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash53.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash53.C deleted file mode 100755 index 163f8e6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash53.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class A -{ - public: - class B - { - public: - virtual ~B(); - }; -}; - -template<int I> -class C -{ - public: - class B - : public A::B - { - }; // bug2.cc:18: Internal compiler error 233. - // bug2.cc:18: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'. -}; - -C<0> c; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash54.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash54.C deleted file mode 100755 index 7d2a8a0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash54.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -int main() -{ - int a[100], **p; - - p = &a[50];// ERROR - assignment to.* - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash55.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash55.C deleted file mode 100755 index 47a7424..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash55.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort - extern f(int);// ERROR - ambiguates.* - - int& f(int x) - {// ERROR - new declaration.* - int local;// ERROR - warning - - local = x+2; - - return local; - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash56.C deleted file mode 100755 index b5e997c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash56.C +++ /dev/null @@ -1,385 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// Special g++ Options: - -const bool FALSE = 0; -const bool TRUE = 1; -class ListDProto { -public: - ListDProto(); - ListDProto(const ListDProto&); - virtual ~ListDProto(); - void operator=(const ListDProto&); - unsigned length() const; - bool empty() const; - void clear(); - void remove_head(); - void remove_tail(); - class link; - class Vix { - public: - Vix(); - friend int operator==(void *v, const Vix& x) - { return v == x.item; }// ERROR - list of candidates - friend int operator==(const Vix& x, void *v) - { return v == x.item; }// ERROR - candidate for call - friend int operator!=(void *v, const Vix& x) - { return v != x.item; } - friend int operator!=(const Vix& x, void *v) - { return v != x.item; } - friend int operator==(const Vix& x1, const Vix& x2) - { return x1.owner == x2.owner && x1.item == x2.item; }// ERROR - candidate for call - friend int operator!=(const Vix& x1, const Vix& x2) - { return x1.owner != x2.owner || x1.item != x2.item; } - bool first; - bool last; - protected: - friend class ListDProto; - Vix(const ListDProto *o, link *i); - const ListDProto *owner; - private: - link *item; - }; - enum Action { NORMAL, REMOVE_CURRENT }; - Vix first() const; - void first(Vix& x) const; - void next(Vix& x) const; - void next(Vix& x, Action a = NORMAL); - Vix last() const; - void last(Vix& x) const; - void prev(Vix& x) const; - void prev(Vix& x, Action a = NORMAL); -protected: - struct link { - link *next; - link *prev; - link(link *n = 0, link *p = 0); - virtual ~link(); - private: - link(const link&); - void operator=(const link&); - }; - unsigned count; - link *list_head; - link *list_tail; - virtual link *copy_item(link *old_item) const = 0; - void prepend(link *item); - void append(link *item); - void prepend(const ListDProto& proto); - void append(const ListDProto& proto); - void remove(link *item); - link *ref(const Vix&) const; -}; -template<class T> -class ListD: public ListDProto { -public: - void prepend(const T& item); - void append(const T& item); - const T& head() const; - T& head(); - void head(T& fill) const; - void remove_head() - { ListDProto::remove_head(); } - void remove_head(T& fill); - const T& tail() const; - T& tail(); - void tail(T& fill) const; - void remove_tail() - { ListDProto::remove_tail(); } - void remove_tail(T& fill); - class Vix: public ListDProto::Vix { - public: - Vix(): ListDProto::Vix() - { } - protected: - friend class ListD<T>; - Vix(const ListDProto::Vix& x): ListDProto::Vix(x) - { } - }; - Vix first() const - { return ListDProto::first(); }; - void first(Vix& x) const - { ListDProto::first(x); }; - void next(Vix& x, ListDProto::Action a = NORMAL) const - { ListDProto::next(x, a); }// ERROR - .*// ERROR - .* - Vix last() const - { return ListDProto::last(); } - void last(Vix& x) const - { return ListDProto::last(x); } - void prev(Vix& x, ListDProto::Action a = NORMAL) const - { return ListDProto::prev(x, a); } -protected: - struct link_item: public ListDProto::link { - T item; - link_item(const T& i): link(0, 0), item(i) - { } - private: - link_item(const link_item&); - void operator=(const link_item&); - }; -public: - T& operator()(const Vix& x) - { link_item *li = (link_item *) ref(x); - return li->item; } - const T& operator()(const Vix& x) const - { link_item *li = (link_item *) ref(x); - return li->item; } -private: - ListDProto::link *copy_item(ListDProto::link *old_item) const; -}; -template<class T> -class SetLD: private ListD<T> { -public: - SetLD(); - SetLD(const ListD<T>&); - void add(const T& item); - void add(const ListD<T>& other); - void add(const SetLD<T>& other); - void remove(const T& item); - bool contains(const T& item) const; - ListD<T>::length; - ListD<T>::empty; - ListD<T>::clear; - typedef ListD<T>::Vix Vix; - ListD<T>::first; - ListD<T>::next; - ListD<T>::operator(); -}; -extern "C" { -extern void __eprintf (const char *, const char *, unsigned, const char *); -} -extern "C" { -extern void __eprintf (const char *, const char *, unsigned, const char *); -} -template<class T> -void -ListD<T>::prepend(const T& item) -{ - link *newl = new link_item(item); - ListDProto::prepend(newl); -} -template<class T> -void -ListD<T>::append(const T& item) -{ - link *newl = new link_item(item); - ListDProto::append(newl); -} -template<class T> -const T& -ListD<T>::head() const -{ - ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 50 , "0 != list_head" ), 0) )) ; - link_item *h = (link_item *) list_head; - return h->item; -} -template<class T> -T& -ListD<T>::head() -{ - ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 59 , "0 != list_head" ), 0) )) ; - link_item *h = (link_item *) list_head; - return h->item; -} -template<class T> -void -ListD<T>::head(T& fill) const -{ - ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 68 , "0 != list_head" ), 0) )) ; - link_item *h = (link_item *) list_head; - fill = h->item; -} -template<class T> -void -ListD<T>::remove_head(T& fill) -{ - head(fill); - remove_head(); -} -template<class T> -const T& -ListD<T>::tail() const -{ - ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 85 , "0 != list_tail" ), 0) )) ; - link_item *h = (link_item *) list_tail; - return h->item; -} -template<class T> -T& -ListD<T>::tail() -{ - ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 94 , "0 != list_tail" ), 0) )) ; - link_item *h = (link_item *) list_tail; - return h->item; -} -template<class T> -void -ListD<T>::tail(T& fill) const -{ - ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 103 , "0 != list_tail" ), 0) )) ; - link_item *h = (link_item *) list_tail; - fill = h->item; -} -template<class T> -void -ListD<T>::remove_tail(T& fill) -{ - ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 112 , "0 != list_tail" ), 0) )) ; - link_item *h = (link_item *) list_tail; - fill = h->item; -} -template<class T> -ListDProto::link * -ListD<T>::copy_item(ListDProto::link *old) const -{ - link_item *old_item = (link_item *) old; - link_item *new_item = new link_item(old_item->item); - return new_item; -} -template<class T> -SetLD<T>::SetLD(): -ListD<T>() -{ } -template<class T> -SetLD<T>::SetLD(const ListD<T>& other): -ListD<T>(other) -{ } -template<class T> -void -SetLD<T>::add(const T& item) -{ - if ( ! contains(item) ) - append(item); -} -template<class T> -void -SetLD<T>::add(const ListD<T>& other) -{ - ListD<T>::Vix x; - for (first(x); 0 != x; next(x)) - add(other(x)); -} -template<class T> -void -SetLD<T>::add(const SetLD<T>& other) -{ - const ListD<T>& lother = other; - add(lother); -} -template<class T> -void -SetLD<T>::remove(const T& item) -{ - Action a = NORMAL; - Vix x; - for (first(x); 0 != x && REMOVE_CURRENT != a; next(x, a)) - a = operator()(x) == item ? REMOVE_CURRENT: NORMAL;// ERROR - .* -} -template<class T> -bool -SetLD<T>::contains(const T& item) const -{ - Vix x; - for (first(x); 0 != x; next(x)) { - if (operator()(x) == item)// ERROR - .* - return TRUE; - } - return FALSE; -} -template<class T> -int -operator==(const SetLD<T>& a, const SetLD<T>& b) -{ - if (a.length() != b.length()) - return FALSE; - SetLD<T>::Vix x; - for (a.first(x); 0 != x; a.next(x)) { - if ( ! b.contains(a(x)) ) - return FALSE; - } - for (b.first(x); 0 != x; b.next(x)) { - if ( ! a.contains(b(x)) ) - return FALSE; - } - return TRUE; -} -template<class T> -int -operator!=(const SetLD<T>& a, const SetLD<T>& b) -{ return ! (a == b); } -template<class T> -int -operator<=(const SetLD<T>& a, const SetLD<T>& b) -{ - if (a.length() > b.length()) - return FALSE; - SetLD<T>::Vix x; - for (x=a.first(); 0 != x; a.next(x)) { - if ( ! b.contains(a(x)) ) - return FALSE; - } - return TRUE; -} -template<class T> -int -operator<(const SetLD<T>& a, const SetLD<T>& b) -{ - if (a.length() >= b.length()) - return FALSE; - return a <= b; -} -template<class T> -int -operator>(const SetLD<T>& a, const SetLD<T>& b) -{ return ! (a <= b); } -template<class T> -int -operator>=(const SetLD<T>& a, const SetLD<T>& b) -{ return ! (a < b); } -class String { }; -class IcaseString: public String { }; -class SetLD< IcaseString >: public SetLD< String > { public: SetLD (): SetLD< String >() { }; SetLD (const ListD< IcaseString >& other): SetLD< String >() { ListD< IcaseString >::Vix x; for (other.first(x); 0 != x; other.next(x)) add(other(x)); }; SetLD (const SetLD & other): SetLD< String >(other) { }; const IcaseString & operator()(const Vix& x) const { return ( IcaseString &) SetLD< String >::operator()(x); } }; typedef SetLD< String > SetLD_String_IcaseString_old_tmp99; typedef SetLD< IcaseString > SetLD_String_IcaseString_new_tmp99; -inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{// ERROR - candidate for call -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator== (oa, ob); } -inline int operator!= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{ -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator!= (oa, ob); } -inline int operator< (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{ -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator< (oa, ob); } -inline int operator<= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{ -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator<= (oa, ob); } -inline int operator> (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{ -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator> (oa, ob); } -inline int operator>= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) -{ -const SetLD_String_IcaseString_old_tmp99& oa = a; -const SetLD_String_IcaseString_old_tmp99& ob = b; -return operator>= (oa, ob); } ; -typedef SetLD<IcaseString> SLDiS; -static void -nop(int i) -{ - SetLD<IcaseString> x, y; - nop(x == y); - nop(x != y); -nop(x < y); -nop(x <= y); -nop(x > y); -nop(x >= y); -} - -template class SetLD<String>; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash57.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash57.C deleted file mode 100755 index 5032b3f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash57.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class foo { -private: - char buffer[1024]; -public: - foo(); -}; - -int main() -{ - static foo& a = *(new foo); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash58.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash58.C deleted file mode 100755 index 922290f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash58.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class X { -public: -void doit(); -}; - -X::::doit()// ERROR - (syntax|parse) error.* -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash59.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash59.C deleted file mode 100755 index ab6e559..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash59.C +++ /dev/null @@ -1,1374 +0,0 @@ -// Build don't link: -// Special g++ Options: -w -// GROUPS passed old-abort -typedef char * __gnuc_va_list; -void va_end (__gnuc_va_list); -enum __va_type_classes { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; -typedef __gnuc_va_list va_list; -typedef int jmp_buf[9 ]; -typedef int sigjmp_buf[9 +1]; -int setjmp (jmp_buf) ; -int _setjmp (jmp_buf) ; -int sigsetjmp (sigjmp_buf, int) ; -void longjmp (jmp_buf, int) ; -void _longjmp (jmp_buf, int) ; -void siglongjmp (sigjmp_buf, int) ; -const int BOR_C_DIR = 0; -const int BOR_C_REV = 1; -const int BOR_C = 0x1; -const int BOR_BD_DIR = (0<<1); -const int BOR_BD_REV = (1<<1); -const int BOR_BD = 0x2; -const int SERVICE_DATA = (1<<( 0 )) ; -const int SERVICE_CLASS1 = (1<<( 1 )) ; -const int SERVICE_CLASS2 = (1<<( 2 )) ; -const int SERVICE_CLASS20 = (1<<( 3 )) ; -const int SERVICE_VOICE = (1<<( 8 )) ; -const int SERVICE_ALL = (1<<( 9 )) -1; -const int VR_NORMAL = 0; -const int VR_FINE = 1; -const int VR_ALL = (1<<( VR_FINE+1 )) -1; -const int BR_2400 = 0; -const int BR_4800 = 1; -const int BR_7200 = 2; -const int BR_9600 = 3; -const int BR_12000 = 4; -const int BR_14400 = 5; -const int BR_ALL = (1<<( BR_14400+1 )) -1; -const int WD_1728 = 0; -const int WD_2048 = 1; -const int WD_2432 = 2; -const int WD_1216 = 3; -const int WD_864 = 4; -const int WD_ALL = (1<<( WD_864+1 )) -1; -const int LN_A4 = 0; -const int LN_B4 = 1; -const int LN_INF = 2; -const int LN_ALL = (1<<( LN_INF+1 )) -1; -const int DF_1DMR = 0; -const int DF_2DMR = 1; -const int DF_2DMRUNCOMP = 2; -const int DF_2DMMR = 3; -const int DF_ALL = (1<<( DF_2DMMR+1 )) -1; -const int EC_DISABLE = 0; -const int EC_ENABLE = 1; -const int EC_ALL = 0x3; -const int BF_DISABLE = 0; -const int BF_ENABLE = 1; -const int BF_ALL = 0x3; -const int ST_0MS = 0; -const int ST_5MS = 1; -const int ST_10MS2 = 2; -const int ST_10MS = 3; -const int ST_20MS2 = 4; -const int ST_20MS = 5; -const int ST_40MS2 = 6; -const int ST_40MS = 7; -const int ST_ALL = (1<<( ST_40MS+1 )) -1; -const int PPM_MPS = 0; -const int PPM_EOM = 1; -const int PPM_EOP = 2; -const int PPM_PRI_MPS = 4; -const int PPM_PRI_EOM = 5; -const int PPM_PRI_EOP = 6; -const int PPR_MCF = 1; -const int PPR_RTN = 2; -const int PPR_RTP = 3; -const int PPR_PIN = 4; -const int PPR_PIP = 5; -const int DLE = 16; -const int SUB = 26; -const int ETX = 3; -const int DC1 = 17; -const int DC2 = 18; -const int CAN = 24; -typedef int sigset_t; -typedef unsigned int speed_t; -typedef unsigned long tcflag_t; -typedef unsigned char cc_t; -typedef int pid_t; -typedef unsigned short mode_t; -typedef short nlink_t; -typedef long clock_t; -typedef long time_t; -typedef __SIZE_TYPE__ size_t; -typedef int ptrdiff_t; -typedef __wchar_t wchar_t; -extern unsigned int _mb_cur_max; -extern void abort( ); -extern int abs (int) ; -extern double atof (const char *) ; -extern int atoi (const char *) ; -extern long int atol (const char *) ; -extern char * bsearch (const void *, const void *, long unsigned int , long unsigned int , int (*) (const void *, const void *)) ; -extern void * calloc (long unsigned int , long unsigned int ) ; -extern void exit (int) ; -extern void free (void *) ; -extern char * getenv (const char *) ; -extern void * malloc (long unsigned int ) ; -extern int qsort (void *, long unsigned int , long unsigned int , int (*) (const void *, const void *)) ; -extern int rand( ); -extern void * realloc (void *, long unsigned int ) ; -extern int srand (unsigned int) ; -extern int mbtowc (__wchar_t *, const char *, long unsigned int ) ; -extern int wctomb (char *, __wchar_t ) ; -extern size_t mbstowcs (__wchar_t *, const char *, long unsigned int ) ; -extern size_t wcstombs (char *, const __wchar_t *, long unsigned int ) ; -extern int atexit (void (*) (void)); -extern long int labs (long int); -extern int putenv (char *); -extern double strtod (const char *, char **); -extern long int strtol (const char *, char **, int); -extern long unsigned int strtoul (const char *, char **, int); -extern int system (const char *); -extern char * strcat (char *, const char *) ; -extern char * strchr (const char *, int) ; -extern int strcmp (const char *, const char *) ; -extern char * strcpy (char *, const char *) ; -extern size_t strcspn (const char *, const char *) ; -extern char * strdup (const char *) ; -extern size_t strlen (const char *) ; -extern char * strncat (char *, const char *, long unsigned int ) ; -extern int strncmp (const char *, const char *, long unsigned int ) ; -extern char * strncpy (char *, const char *, long unsigned int ) ; -extern char * strpbrk (const char *, const char *) ; -extern char * strrchr (const char *, int) ; -extern size_t strspn (const char *, const char *) ; -extern char * strstr (const char *, const char *) ; -extern char * strtok (char *, const char *) ; -extern void * memchr (const void *, int, long unsigned int ); -extern int memcmp (const void *, const void *, long unsigned int ); -extern void * memcpy (void *, const void *, long unsigned int ); -extern void * memmove (void *, const void *, long unsigned int ); -extern void * memset (void *, int, long unsigned int ); -extern int strcoll (const char *, const char *); -extern char * strerror (int); -extern long unsigned int strxfrm (char *, const char *, long unsigned int ); -extern "C" { -extern void __eprintf (const char *, const char *, unsigned, const char *); -} -extern struct _iobuf { - int _cnt; - unsigned char *_ptr; - unsigned char *_base; - int _bufsiz; - short _flag; - char _file; -} _iob[]; -extern struct _iobuf *fopen (const char *, const char *) ; -extern struct _iobuf *fdopen (int, const char *) ; -extern struct _iobuf *freopen (const char *, const char *, struct _iobuf *) ; -extern struct _iobuf *popen (const char *, const char *) ; -extern struct _iobuf *tmpfile(); -extern long ftell (struct _iobuf *) ; -extern char *fgets (char *, int, struct _iobuf *) ; -extern char *gets (char *) ; -extern char *sprintf (char *, const char *, ...) ; -extern char *ctermid (char *) ; -extern char *cuserid (char *) ; -extern char *tempnam (const char *, const char *) ; -extern char *tmpnam (char *) ; -extern int fclose (struct _iobuf *); -extern int fflush (struct _iobuf *); -extern int fgetc (struct _iobuf *); -extern int fgetpos (struct _iobuf *, long *); -extern int fprintf (struct _iobuf *, const char *, ...); -extern int fputc (int, struct _iobuf *); -extern int fputs (const char *, struct _iobuf *); -extern long unsigned int fread (void *, long unsigned int , long unsigned int , struct _iobuf *); -extern int fscanf (struct _iobuf *, const char *, ...); -extern int fseek (struct _iobuf *, long int, int); -extern int fsetpos (struct _iobuf *, const long *); -extern long unsigned int fwrite (const void *, long unsigned int , long unsigned int , struct _iobuf *); -extern int pclose (struct _iobuf *); -extern void perror (const char *); -extern int printf (const char *, ...); -extern int puts (const char *); -extern int remove (const char *); -extern int rename (const char *, const char *); -extern void rewind (struct _iobuf *); -extern int scanf (const char *, ...); -extern void setbuf (struct _iobuf *, char *); -extern int setvbuf (struct _iobuf *, char *, int, long unsigned int ); -extern int sscanf (const char *, const char *, ...); -extern int vprintf (const char *, __gnuc_va_list); -extern int vsprintf (char *, const char *, __gnuc_va_list); -extern int vfprintf (struct _iobuf *, const char *, __gnuc_va_list); -extern int ungetc (int, struct _iobuf *); -extern int _flsbuf (unsigned int, struct _iobuf *); -extern int _filbuf (struct _iobuf *); -typedef long _G_clock_t; -typedef short _G_dev_t; -typedef long _G_fpos_t; -typedef unsigned short _G_gid_t; -typedef unsigned long _G_ino_t; -typedef unsigned short _G_mode_t; -typedef short _G_nlink_t; -typedef long _G_off_t; -typedef int _G_pid_t; -typedef int _G_ptrdiff_t; -typedef int _G_sigset_t; -typedef long unsigned int _G_size_t; -typedef long _G_time_t; -typedef unsigned short _G_uid_t; -typedef __wchar_t _G_wchar_t; -typedef int _G_ssize_t; -typedef int _G_wint_t; -typedef char * _G_va_list; -typedef signed char _G_int8_t; -typedef unsigned char _G_uint8_t; -typedef short _G_int16_t; -typedef unsigned short _G_uint16_t; -typedef long _G_int32_t; -typedef unsigned long _G_uint32_t; -const size_t NPOS = (size_t)(-1); -typedef void fvoid_t(); -typedef _G_wint_t wint_t; -enum capacity { default_size, reserve }; -extern "C" fvoid_t *set_new_handler(fvoid_t *); -extern fvoid_t *__new_handler; -extern "C" void __default_new_handler(); -inline void *operator new(size_t, void *place) { return place; } -inline void *operator new[](size_t, void *place) { return place; } -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; -typedef unsigned short ushort; -typedef unsigned int uint; -typedef struct _physadr_t { int r[1]; } *physadr_t; -typedef struct label_t { - int val[2]; -} label_t; -typedef struct _quad_t { long val[2]; } quad_t; -typedef long daddr_t; -typedef char * caddr_t; -typedef unsigned long ino_t; -typedef short dev_t; -typedef long off_t; -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef long key_t; -typedef char * addr_t; -typedef long fd_mask; -typedef struct fd_set { - fd_mask fds_bits[((( 256 )+(( (sizeof (fd_mask) * 8 ) )-1))/( (sizeof (fd_mask) * 8 ) )) ]; -} fd_set; -extern "C" { -extern int mkstemp(char *); -extern int strncasecmp(const char*, const char*, size_t); -extern int strcasecmp(const char*, const char*); -extern long random(void); -extern int seteuid(uid_t); -extern int setegid(gid_t); -extern int ftruncate(int, off_t); -extern int getdtablesize(void); -struct fd_set; -struct timeval; -extern int select(int,struct fd_set*,struct fd_set*,struct fd_set*,struct timeval*); -extern int ioctl(int, int, ...); -extern int fchown(int, uid_t, gid_t); -extern int gethostname(char*, int); -extern char* optarg; -extern int opterr; -extern int optind; -extern char* mktemp(char*); -extern void syslog(int, const char*, ...); -extern void vsyslog(int, const char*, va_list); -extern void closelog(void); -extern void openlog(const char*, int, int); -extern int fchmod(int, mode_t); -struct timezone; -struct timeval; -extern int gettimeofday(struct timeval*, struct timezone*); -extern void endpwent(void); -extern int getpeername(int,void*,int*); -extern int getsockname(int,void*,int*); -extern int socket(int, int, int); -extern int connect(int, const void*, int); -extern int flock(int, int); -} -typedef unsigned char fxBool; -inline int fxmin(int a, int b) { return (a < b) ? a : b; } -inline u_long fxmin(u_long a, u_long b) { return (a < b) ? a : b; } -inline u_int fxmin(u_int a, u_int b) { return (a < b) ? a : b; } -inline int fxmax(int a, int b) { return (a > b) ? a : b; } -inline u_long fxmax(u_long a, u_long b) { return (a > b) ? a : b; } -inline u_int fxmax(u_int a, u_int b) { return (a > b) ? a : b; } -extern "C" void _fxassert(const char*, const char*, int); -class fxObj { -public: - fxObj(); - virtual ~fxObj(); - void inc(); - void dec(); - u_long getReferenceCount(); - virtual const char* className() const; - int compare(const fxObj *) const; - virtual void subClassMustDefine(const char* method) const; -protected: - u_long referenceCount; -}; -inline fxObj::fxObj() { referenceCount = 0; } -inline void fxObj::inc() { ++referenceCount; } -inline void fxObj::dec() { - if ( referenceCount>0 ); else _fxassert( "Bogus object reference count" ,"../util/Obj.h",54); ; - if (0 >= --referenceCount) delete this; -} -inline u_long fxObj::getReferenceCount() { return referenceCount; } -class fxStr; -class fxTempStr { -public: - fxTempStr(fxTempStr const &other); - ~fxTempStr(); - friend fxTempStr operator|(fxStr const&, fxStr const&); - friend fxTempStr operator|(fxStr const&, char const*); - friend fxTempStr operator|(char const*, fxStr const&); - friend fxTempStr& operator|(const fxTempStr&, fxStr const& b); - friend fxTempStr& operator|(const fxTempStr&, char const* b); - operator char*() const; - operator int() const; - operator float() const; - operator double() const; - u_int length() const; -protected: - char indata[100]; - char* data; - u_int slength; - friend class fxStr; - fxTempStr(char const *, u_int, char const *, u_int); - fxTempStr& concat(char const* b, u_int bl); -}; -inline fxTempStr::operator char*() const { return data; } -inline fxTempStr::operator int() const { return atoi(data); } -inline fxTempStr::operator float() const { return float(atof(data)); } -inline fxTempStr::operator double() const { return double(atof(data)); } -inline u_int fxTempStr::length() const { return slength - 1; } -class fxStr { - friend class fxTempStr; -public: - fxStr(u_int l=0); - fxStr(char const *s); - fxStr(char const *s, u_int len); - fxStr(fxStr const&); - fxStr(int, char const* format); - fxStr(long, char const* format); - fxStr(float, char const* format); - fxStr(double, char const* format); - fxStr(const fxTempStr&); - ~fxStr(); - u_long hash() const; - operator char*() const - { return data; } - operator int() const - { return atoi(data); } - operator float() const - { return float(atof(data)); } - operator double() const - { return double(atof(data)); } - u_int length() const { return slength-1; } - char& operator[](u_int i) const - { if ( i<slength-1 ); else _fxassert( "Invalid Str[] index" ,"../util/Str.h",109); ; - return data[i]; } - void operator=(const fxTempStr& s); - void operator=(fxStr const& s); - void operator=(char const *s); - friend fxBool operator==(fxStr const&, fxStr const&); - friend fxBool operator==(fxStr const&, char const*); - friend fxBool operator==(fxStr const&, char *); - friend fxBool operator==(char const*, fxStr const&); - friend fxBool operator!=(fxStr const&, fxStr const&); - friend fxBool operator!=(fxStr const&, char const*); - friend fxBool operator!=(char const*, fxStr const&); - friend fxBool operator>=(fxStr const&, fxStr const&); - friend fxBool operator>=(fxStr const&, char const*); - friend fxBool operator>=(char const*, fxStr const&); - friend fxBool operator<=(fxStr const&, fxStr const&); - friend fxBool operator<=(fxStr const&, char const*); - friend fxBool operator<=(char const*, fxStr const&); - friend fxBool operator>(fxStr const&, fxStr const&); - friend fxBool operator>(fxStr const&, char const*); - friend fxBool operator>(char const*, fxStr const&); - friend fxBool operator<(fxStr const&, fxStr const&); - friend fxBool operator<(fxStr const&, char const*); - friend fxBool operator<(char const*, fxStr const&); - int compare(fxStr const *a) const { return ::compare(*this, *a); } - friend int compare(fxStr const&, fxStr const&); - friend int compare(fxStr const&, char const*); - friend int compare(char const*, fxStr const&); - friend fxTempStr& operator|(const fxTempStr&, fxStr const&); - friend fxTempStr& operator|(const fxTempStr&, char const*); - friend fxTempStr operator|(fxStr const&, fxStr const&); - friend fxTempStr operator|(fxStr const&, char const*); - friend fxTempStr operator|(char const*, fxStr const&); - fxStr copy() const; - fxStr extract(u_int start,u_int len) const; - fxStr cut(u_int start,u_int len); - fxStr head(u_int) const; - fxStr tail(u_int) const; - void lowercase(u_int posn=0, u_int len=0); - void raisecase(u_int posn=0, u_int len=0); - void remove(u_int posn,u_int len=1); - void resize(u_int len, fxBool reallocate = ((fxBool)0) ); - void setMaxLength(u_int maxlen); - void append(char a); - void append(char const *s, u_int len=0); - void append(const fxTempStr& s) - { append((char*)s, s.slength-1); } - void append(fxStr const& s) - { append((char*)s, s.slength-1); } - void insert(char a, u_int posn=0); - void insert(char const *, u_int posn=0, u_int len=0); - void insert(const fxTempStr& s, u_int posn=0) - { insert((char*)s, posn, s.slength-1); } - void insert(fxStr const& s, u_int posn=0) - { insert((char*)s, posn, s.slength-1); } - u_int next(u_int posn, char delimiter) const; - u_int next(u_int posn, char const *delimiters, u_int len=0) const; - u_int next(u_int posn, fxStr const& delimiters) const - { return next(posn, (char*)delimiters, delimiters.slength-1); } - u_int nextR(u_int posn, char delimiter) const; - u_int nextR(u_int posn, char const*, u_int len=0) const; - u_int nextR(u_int posn, fxStr const& delimiters) const - { return nextR(posn, (char*)delimiters, delimiters.slength-1); } - u_int skip(u_int posn, char a) const; - u_int skip(u_int posn, char const *, u_int len=0) const; - u_int skip(u_int posn, fxStr const& delimiters) const - { return skip(posn, (char*)delimiters, delimiters.slength-1); } - u_int skipR(u_int posn, char a) const; - u_int skipR(u_int posn, char const *, u_int len=0) const; - u_int skipR(u_int posn, fxStr const& delimiters) const - { return skipR(posn, (char*)delimiters, delimiters.slength-1); } - fxStr token(u_int & posn, char delimiter) const; - fxStr token(u_int & posn, char const * delimiters, - u_int delimiters_len = 0) const; - fxStr token(u_int & posn, fxStr const & delimiters) const - { return token(posn, delimiters.data, delimiters.slength-1); } - fxStr tokenR(u_int & posn, char delimiter) const; - fxStr tokenR(u_int & posn, char const * delimiters, - u_int delimiters_len = 0) const; - fxStr tokenR(u_int & posn, fxStr const & delimiters) const - { return tokenR(posn, delimiters.data, delimiters.slength-1); } -protected: - u_int slength; - char * data; - static char emptyString; - void fxStr::resizeInternal(u_int); - int findEndBuffer(const char *, u_int buflen) const; - int findBuffer(const char *buf, u_int buflen) const; - void bracketBuffer(const char *, u_int buflen, int &, int &) const; -}; -struct Class2Params { - u_int vr; - u_int br; - u_int wd; - u_int ln; - u_int df; - u_int ec; - u_int bf; - u_int st; - static u_int vrDISTab[2]; - static u_int dfDISTab[4]; - static u_int wdDISTab[8]; - static u_int lnDISTab[3]; - static u_int stDISTab[8]; - static u_int stDCSTab[8]; - static u_int brDISTab[8]; - static u_int brDCSTab[8]; - static u_int DISvrTab[2]; - static u_int DISdfTab[2]; - static u_int DISwdTab[4]; - static u_int DISlnTab[4]; - static u_int DISstTab[8]; - static u_int DISbrTab[16]; - static u_int DCSbrTab[16]; - static const char* bitRateNames[8]; - static const char* dataFormatNames[4]; - static const char* vresNames[2]; - static const char* pageWidthNames[8]; - static const char* pageLengthNames[4]; - static const char* scanlineTimeNames[8]; - Class2Params(); - int operator==(const Class2Params&) const; - int operator!=(const Class2Params&) const; - fxStr cmd() const; - void setFromDIS(u_int dis, u_int xinfo = 0); - void setFromDCS(u_int dcs, u_int xinfo = 0); - u_int getDCS() const; - fxBool is2D() const; - u_int pageWidth() const; - u_int transferSize(u_int ms) const; - u_int minScanlineSize() const; - fxStr encode() const; - void decode(const fxStr&); -}; -typedef struct { - unsigned short tiff_magic; - unsigned short tiff_version; - unsigned long tiff_diroff; -} TIFFHeader; -typedef struct { - unsigned short tdir_tag; - unsigned short tdir_type; - unsigned long tdir_count; - unsigned long tdir_offset; -} TIFFDirEntry; -typedef enum { - TIFF_NOTYPE = 0, - TIFF_BYTE = 1, - TIFF_ASCII = 2, - TIFF_SHORT = 3, - TIFF_LONG = 4, - TIFF_RATIONAL = 5, - TIFF_SBYTE = 6, - TIFF_UNDEFINED = 7, - TIFF_SSHORT = 8, - TIFF_SLONG = 9, - TIFF_SRATIONAL = 10, - TIFF_FLOAT = 11, - TIFF_DOUBLE = 12 -} TIFFDataType; -typedef struct tiff TIFF; -extern int fclose (struct _iobuf *); -extern int fflush (struct _iobuf *); -extern int fgetc (struct _iobuf *); -extern int fgetpos (struct _iobuf *, long *); -extern int fprintf (struct _iobuf *, const char *, ...); -extern int fputc (int, struct _iobuf *); -extern int fputs (const char *, struct _iobuf *); -extern long unsigned int fread (void *, long unsigned int , long unsigned int , struct _iobuf *); -extern int fscanf (struct _iobuf *, const char *, ...); -extern int fseek (struct _iobuf *, long int, int); -extern int fsetpos (struct _iobuf *, const long *); -extern long unsigned int fwrite (const void *, long unsigned int , long unsigned int , struct _iobuf *); -extern int pclose (struct _iobuf *); -extern void perror (const char *); -extern int printf (const char *, ...); -extern int puts (const char *); -extern int remove (const char *); -extern int rename (const char *, const char *); -extern void rewind (struct _iobuf *); -extern int scanf (const char *, ...); -extern void setbuf (struct _iobuf *, char *); -extern int setvbuf (struct _iobuf *, char *, int, long unsigned int ); -extern int sscanf (const char *, const char *, ...); -extern int vprintf (const char *, __gnuc_va_list); -extern int vsprintf (char *, const char *, __gnuc_va_list); -extern int vfprintf (struct _iobuf *, const char *, __gnuc_va_list); -extern int ungetc (int, struct _iobuf *); -extern int _flsbuf (unsigned int, struct _iobuf *); -extern int _filbuf (struct _iobuf *); -typedef void (*TIFFErrorHandler)(const char* module, const char* fmt, va_list); -typedef int (*TIFFReadWriteProc)(void*, char*, unsigned long); -typedef long (*TIFFSeekProc)(void*, long, int); -typedef int (*TIFFCloseProc)(void*); -typedef long (*TIFFSizeProc)(void*); -typedef int (*TIFFMapFileProc)(void*, char**, long*); -typedef void (*TIFFUnmapFileProc)(void*, char*, long); -extern "C" { -extern const char* TIFFGetVersion(); -extern void TIFFClose(TIFF*); -extern int TIFFFlush(TIFF*); -extern int TIFFFlushData(TIFF*); -extern int TIFFGetField(TIFF*, unsigned int, ...); -extern int TIFFVGetField(TIFF*, unsigned int, va_list); -extern int TIFFGetFieldDefaulted(TIFF*, unsigned int, ...); -extern int TIFFVGetFieldDefaulted(TIFF*, unsigned int, va_list); -extern int TIFFReadDirectory(TIFF*); -extern unsigned long TIFFScanlineSize(TIFF*); -extern unsigned long TIFFStripSize(TIFF*); -extern unsigned long TIFFVStripSize(TIFF*, unsigned long); -extern unsigned long TIFFTileRowSize(TIFF*); -extern unsigned long TIFFTileSize(TIFF*); -extern unsigned long TIFFVTileSize(TIFF*, unsigned long); -extern int TIFFFileno(TIFF*); -extern int TIFFGetMode(TIFF*); -extern int TIFFIsTiled(TIFF*); -extern long TIFFCurrentRow(TIFF*); -extern int TIFFCurrentDirectory(TIFF*); -extern int TIFFCurrentStrip(TIFF*); -extern int TIFFCurrentTile(TIFF*); -extern int TIFFReadBufferSetup(TIFF*, char*, unsigned long); -extern int TIFFLastDirectory(TIFF*); -extern int TIFFSetDirectory(TIFF*, int); -extern int TIFFSetField(TIFF*, unsigned int, ...); -extern int TIFFVSetField(TIFF*, unsigned int, va_list); -extern int TIFFWriteDirectory(TIFF *); -extern void TIFFPrintDirectory(TIFF*, struct _iobuf *, long = 0); -extern int TIFFReadScanline(TIFF*, unsigned char*, unsigned, unsigned = 0); -extern int TIFFWriteScanline(TIFF*, unsigned char*, unsigned, unsigned = 0); -extern int TIFFReadRGBAImage(TIFF*, - unsigned long, unsigned long, unsigned long*, int stop = 0); -extern TIFF* TIFFOpen(const char*, const char*); -extern TIFF* TIFFFdOpen(int, const char*, const char*); -extern TIFF* TIFFClientOpen(const char* name, const char* mode, - void* clientdata, - TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, - TIFFSeekProc seekproc, TIFFCloseProc closeproc, - TIFFSizeProc sizeproc, - TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc); -extern const char* TIFFFileName(TIFF*); -extern void TIFFError(const char*, const char*, ...); -extern void TIFFWarning(const char*, const char*, ...); -extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler); -extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler handler); -extern unsigned int TIFFComputeTile(TIFF*, - unsigned long, unsigned long, unsigned long, unsigned int); -extern int TIFFCheckTile(TIFF*, - unsigned long, unsigned long, unsigned long, unsigned); -extern unsigned int TIFFNumberOfTiles(TIFF*); -extern int TIFFReadTile(TIFF*, - unsigned char*, - unsigned long, unsigned long, unsigned long, - unsigned int); -extern int TIFFWriteTile(TIFF*, - unsigned char*, - unsigned long, unsigned long, unsigned long, - unsigned int); -extern unsigned int TIFFComputeStrip(TIFF*, unsigned long, unsigned int); -extern unsigned int TIFFNumberOfStrips(TIFF*); -extern int TIFFReadEncodedStrip(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFReadRawStrip(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFReadEncodedTile(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFReadRawTile(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFWriteEncodedStrip(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFWriteRawStrip(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFWriteEncodedTile(TIFF*, unsigned, unsigned char*, unsigned long); -extern int TIFFWriteRawTile(TIFF*, unsigned, unsigned char*, unsigned long); -extern void TIFFSetWriteOffset(TIFF*, unsigned long); -extern void TIFFSwabShort(unsigned short *); -extern void TIFFSwabLong(unsigned long *); -extern void TIFFSwabArrayOfShort(unsigned short *, unsigned long); -extern void TIFFSwabArrayOfLong(unsigned long *, unsigned long); -extern void TIFFReverseBits(unsigned char *, unsigned long); -extern const unsigned char* TIFFGetBitRevTable(int); -} -struct G3Base { - short data; - short bit; - fxBool is2D; - enum { G3_1D, G3_2D } tag; - const u_char* bitmap; - static const u_char zeroruns[256]; - static const u_char oneruns[256]; - static int findspan(const u_char**, int, int, const u_char*); - static int finddiff(const u_char*, int, int); - static void fillspan(u_char* cp, int x, int count); - void setup(const u_char*, fxBool is2d); -}; -class fxStackBuffer; -class G3Decoder : private G3Base { -private: - short bytePending; - short prevByte; - u_char* refline; - fxStackBuffer* recvBuf; - fxBool decode1DRow(u_char*, u_int); - fxBool decode2DRow(u_char*, u_int); - int nextBit(); - void ungetBit(); - int nextByte(); - int decodeWhiteRun(); - int decodeBlackRun(); - int decodeUncompCode(); - void skipToEOL(int len); -protected: - G3Decoder(); - void raiseEOF(); - void raiseRTC(); - void setPendingByte(u_char); - virtual int decodeNextByte() = 0; - void setRefLine(u_char*); - u_char* getRefLine(); - virtual void invalidCode(const char* type, int x); - virtual void prematureEOL(const char* type, int x); - virtual void badPixelCount(const char* type, int x); - virtual void badDecodingState(const char* type, int x); -public: - sigjmp_buf jmpEOF; - sigjmp_buf jmpRTC; - virtual ~G3Decoder(); - void setupDecoder(u_int, fxBool is2D); - void decode(void* raster, u_int w, u_int h); - void skip(u_int h); - void skipLeader(); - fxBool decodeRow(void* scanline, u_int w); - void skipRow(); - fxBool isLastRow1D(); - fxBool isNextRow1D(); - fxBool isByteAligned(); - void setRecvBuf(fxStackBuffer&); - fxStackBuffer* getRecvBuf(); - void flushRecvBuf(); -}; -inline void G3Decoder::setRecvBuf(fxStackBuffer& b){ recvBuf = &b; } -inline fxStackBuffer* G3Decoder::getRecvBuf() { return recvBuf; } -inline void G3Decoder::setRefLine(u_char* b) { refline = b; } -inline u_char* G3Decoder::getRefLine() { return refline; } -inline fxBool G3Decoder::isLastRow1D() { return tag == G3_1D; } -enum FaxSendStatus { - send_retry, - send_failed, - send_done, - send_reformat, -}; -class FaxServer; -class FaxMachineInfo; -class ModemConfig; -class fxStackBuffer; -class FaxFont; -class FaxRequest; -typedef unsigned int CallStatus; -typedef unsigned int CallType; -typedef unsigned int AnswerType; -typedef unsigned int SpeakerVolume; -typedef unsigned int ATResponse; -typedef unsigned int BaudRate; -typedef unsigned int FlowControl; -typedef unsigned int SetAction; -typedef struct { - const char* msg; - u_short len; - ATResponse expect; - CallStatus status; - CallType type; -} AnswerMsg; -class FaxModem : public G3Decoder { -public: - static FaxModem* deduceModem(FaxServer&, const ModemConfig& config); - enum { - OK = 0, - BUSY = 1, - NOCARRIER = 2, - NOANSWER = 3, - NODIALTONE = 4, - ERROR = 5, - FAILURE = 6, - NOFCON = 7, - DATACONN = 8, - }; - enum { - CALLTYPE_ERROR = 0, - CALLTYPE_DATA = 1, - CALLTYPE_FAX = 2, - CALLTYPE_VOICE = 3, - CALLTYPE_UNKNOWN = 4, - }; - enum { - OFF = 0, - QUIET = 1, - LOW = 2, - MEDIUM = 3, - HIGH = 4, - }; - enum { - BR0 = 0, - BR300 = 1, - BR1200 = 2, - BR2400 = 3, - BR4800 = 4, - BR9600 = 5, - BR19200 = 6, - BR38400 = 7, - BR57600 = 8, - BR76800 = 9, - }; - enum { - FLOW_NONE = 0, - FLOW_XONXOFF = 1, - FLOW_RTSCTS = 2 - }; - enum { - ACT_NOW = 0, - ACT_DRAIN = 1, - ACT_FLUSH = 2, - }; - enum { - ANSTYPE_ANY = 0, - ANSTYPE_DATA = 1, - ANSTYPE_FAX = 2, - ANSTYPE_VOICE = 3, - }; - enum { - AT_NOTHING = 0, - AT_OK = 1, - AT_CONNECT = 2, - AT_NOANSWER = 3, - AT_NOCARRIER = 4, - AT_NODIALTONE = 5, - AT_BUSY = 6, - AT_OFFHOOK = 7, - AT_RING = 8, - AT_ERROR = 9, - AT_EMPTYLINE = 10, - AT_TIMEOUT = 11, - AT_OTHER = 12, - }; -private: - FaxServer& server; - fxStr resetCmds; - long dataTimeout; - BaudRate rate; - FlowControl iFlow; - FlowControl oFlow; - u_int pageNumber; - FaxFont* tagLineFont; - u_int tagLineSlop; - fxStr tagLine; - u_int tagLineFields; - void setupTagLine(const FaxRequest&); - u_int cblc; - fxBool lastRowBad; - u_long recvEOLCount; - u_long recvBadLineCount; - u_long recvConsecutiveBadLineCount; - u_int recvCC; - fxStackBuffer* recvBuf; - u_long savedWriteOff; - void recvRow(TIFF* tif, fxStackBuffer& row, u_char* buf); - void invalidCode(const char* type, int x); - void prematureEOL(const char* type, int x); - void badPixelCount(const char* type, int x); - void badDecodingState(const char* type, int x); -protected: - const ModemConfig& conf; - FlowControl flowControl; - u_int modemServices; - fxStr modemMfr; - fxStr modemModel; - fxStr modemRevision; - Class2Params modemParams; - char rbuf[1024]; - ATResponse lastResponse; - fxStr mfrQueryCmd; - fxStr modelQueryCmd; - fxStr revQueryCmd; - static const char* serviceNames[9]; - static const u_char digitMap[12*2+1]; - static const char* callStatus[9]; - FaxModem(FaxServer&, const ModemConfig&); - virtual fxBool selectBaudRate(BaudRate max, FlowControl i, FlowControl o); - virtual fxBool setupModem() = 0; - virtual fxBool setupManufacturer(fxStr& mfr); - virtual fxBool setupModel(fxStr& model); - virtual fxBool setupRevision(fxStr& rev); - fxBool doQuery(const fxStr& queryCmd, fxStr& result, long ms = 30*1000); - virtual const AnswerMsg* findAnswer(const char* s); - virtual CallType answerResponse(fxStr& emsg); - virtual CallStatus dialResponse(fxStr& emsg) = 0; - void setDataTimeout(long secs, u_int br); - long getDataTimeout() const; - void pause(u_int ms); - void countPage(); - void modemTrace(const char* fmt, ...); - void modemSupports(const char* fmt, ...); - void modemCapability(const char* fmt, ...); - void protoTrace(const char* fmt, ...); - void recvTrace(const char* fmt, ...); - void copyQualityTrace(const char* fmt, ...); - void serverTrace(const char* fmt, ...); - void traceBits(u_int bits, const char* bitNames[]); - void traceModemParams(); - void tracePPR(const char* dir, u_int ppr); - void tracePPM(const char* dir, u_int ppm); - void trimModemLine(char buf[], int& cc); - int getModemLine(char buf[], u_int bufSize, long ms = 0); - void beginTimedTransfer(); - void endTimedTransfer(); - fxBool wasTimeout(); - void setTimeout(fxBool); - void flushModemInput(); - fxBool putModem(void* data, int n, long ms = 0); - fxBool putModemData(void* data, int n); - fxBool putModemDLEData(const u_char* data, u_int, - const u_char* brev, long ms); - fxBool putModemLine(const char* cp); - int getModemChar(long ms = 0); - int getModemDataChar(); - void startTimeout(long ms); - void stopTimeout(const char* whichdir); - static const char* ATresponses[13]; - virtual ATResponse atResponse(char* buf, long ms = 30*1000); - virtual fxBool waitFor(ATResponse wanted, long ms = 30*1000); - fxBool atCmd(const fxStr& cmd, ATResponse = AT_OK, long ms = 30*1000); - fxBool atQuery(const char* what, u_int& v, long ms = 30*1000); - fxBool atQuery(const char* what, fxStr& v, long ms = 30*1000); - u_int fromHex(const char*, int = -1); - fxStr toHex(int, int ndigits); - fxBool parseRange(const char*, u_int&); - fxBool vparseRange(const char*, int nargs ...); - fxBool vatFaxCmd(ATResponse resp, const char* cmd ... ); - fxBool sendBreak(fxBool pause); - fxBool setBaudRate(BaudRate rate); - fxBool setBaudRate(BaudRate rate, FlowControl i, FlowControl o); - fxBool setXONXOFF(FlowControl i, FlowControl o, SetAction); - fxBool setDTR(fxBool on); - fxBool setInputBuffering(fxBool on); - fxBool modemStopOutput(); - FlowControl getInputFlow(); - FlowControl getOutputFlow(); - fxBool getProtocolTracing(); - fxBool getHDLCTracing(); - FaxSendStatus sendSetupParams(TIFF*, Class2Params&, - FaxMachineInfo&, fxStr&); - fxBool recvCheckTSI(const fxStr&); - void recvCSI(fxStr&); - void recvDCS(Class2Params&); - void recvNSF(u_int nsf); - void recvSetupPage(TIFF* tif, long group3opts, int fillOrder); - void recvResetPage(TIFF* tif); - fxBool abortRequested(); - fxBool decodePPM(const fxStr& pph, u_int& ppm, fxStr& emsg); - fxBool recvPageDLEData(TIFF* tif, fxBool checkQuality, - const Class2Params& params, fxStr& emsg); - virtual void abortPageRecv() = 0; - virtual int decodeNextByte(); - fxBool checkQuality(); - fxBool isQualityOK(const Class2Params&); - u_long getRecvEOLCount() const; - u_long getRecvBadLineCount() const; - u_long getRecvConsecutiveBadLineCount() const; - fxBool setupTagLineSlop(const Class2Params&); - u_int getTagLineSlop() const; - u_char* imageTagLine(u_char* buf, u_int fillorder, const Class2Params&); -public: - virtual ~FaxModem(); - virtual fxBool dataService(); - virtual fxBool voiceService(); - virtual fxBool sync(long ms = 0); - virtual fxBool reset(long ms = 5*1000); - virtual void hangup(); - virtual void setSpeakerVolume(SpeakerVolume); - virtual void setLID(const fxStr& number) = 0; - const fxStr& getModel() const; - const fxStr& getManufacturer() const; - const fxStr& getRevision() const; - virtual fxBool supports2D() const; - virtual fxBool supportsEOLPadding() const; - virtual fxBool supportsVRes(float res) const; - virtual fxBool supportsPageWidth(u_int w) const; - virtual fxBool supportsPageLength(u_int l) const; - virtual fxBool supportsPolling() const; - virtual int selectSignallingRate(int br) const; - u_int getBestSignallingRate() const; - u_int getBestScanlineTime() const; - virtual int selectScanlineTime(int st) const; - u_int getBestVRes() const; - u_int getBestDataFormat() const; - u_int getBestPageWidth() const; - u_int getBestPageLength() const; - u_int modemDIS() const; - virtual CallStatus dial(const char* number, - const Class2Params& dis, fxStr& emsg); - virtual void sendBegin(const FaxRequest&); - virtual fxBool getPrologue(Class2Params&, - u_int& nsf, fxStr& csi, fxBool& hasDoc) = 0; - virtual void sendSetupPhaseB(); - virtual FaxSendStatus sendPhaseB(TIFF*, Class2Params&, FaxMachineInfo&, - fxStr& pph, fxStr& emsg) = 0; - virtual void sendEnd(); - virtual void sendAbort() = 0; - virtual fxBool waitForRings(u_int rings); - virtual CallType answerCall(AnswerType, fxStr& emsg); - virtual fxBool recvBegin(fxStr& emsg) = 0; - virtual fxBool recvPage(TIFF*, int& ppm, fxStr& em) = 0; - virtual fxBool recvEnd(fxStr& emsg) = 0; - virtual void recvAbort() = 0; - virtual fxBool requestToPoll() = 0; - virtual fxBool pollBegin(const fxStr& pollID, fxStr& emsg) = 0; -}; -inline long FaxModem::getDataTimeout() const { return dataTimeout; } -inline const fxStr& FaxModem::getModel() const { return modemModel; } -inline const fxStr& FaxModem::getManufacturer() const { return modemMfr; } -inline const fxStr& FaxModem::getRevision() const { return modemRevision; } -inline FlowControl FaxModem::getInputFlow() { return iFlow; } -inline FlowControl FaxModem::getOutputFlow() { return oFlow; } -inline u_int FaxModem::getTagLineSlop() const { return tagLineSlop; } -struct ModemConfig { - fxStr type; - fxStr resetCmds; - fxStr dialCmd; - fxStr answerAnyCmd; - fxStr answerDataCmd; - fxStr answerFaxCmd; - fxStr answerVoiceCmd; - fxStr flowControlCmd; - fxStr setupDTRCmd; - fxStr setupDCDCmd; - fxStr setupAACmd; - fxStr noAutoAnswerCmd; - fxStr setVolumeCmd[5]; - fxStr echoOffCmd; - fxStr verboseResultsCmd; - fxStr resultCodesCmd; - fxStr onHookCmd; - fxStr softResetCmd; - fxStr waitTimeCmd; - fxStr pauseTimeCmd; - fxStr mfrQueryCmd; - fxStr modelQueryCmd; - fxStr revQueryCmd; - fxStr answerAnyBeginCmd; - fxStr answerDataBeginCmd; - fxStr answerFaxBeginCmd; - fxStr answerVoiceBeginCmd; - fxStr sendBeginCmd; - u_int t1Timer; - u_int t2Timer; - u_int t4Timer; - u_int dialResponseTimeout; - u_int answerResponseTimeout; - u_int pageStartTimeout; - u_int pageDoneTimeout; - fxStr class1Cmd; - u_int class1TCFResponseDelay; - u_int class1SendPPMDelay; - u_int class1SendTCFDelay; - u_int class1TrainingRecovery; - u_int class1RecvAbortOK; - u_int class1FrameOverhead; - u_int class1RecvIdentTimer; - u_int class1TCFMaxNonZero; - u_int class1TCFMinRun; - fxStr class2Cmd; - fxStr class2DCCQueryCmd; - fxStr class2CQQueryCmd; - fxStr class2BORCmd; - fxStr class2RELCmd; - fxStr class2CQCmd; - fxStr class2AbortCmd; - fxStr class2TBCCmd; - fxStr class2CRCmd; - fxStr class2PHCTOCmd; - fxStr class2BUGCmd; - fxStr class2LIDCmd; - fxStr class2DCCCmd; - fxStr class2DISCmd; - fxStr class2DDISCmd; - fxStr class2CIGCmd; - fxStr class2SPLCmd; - fxStr class2PTSCmd; - fxStr class2RecvDataTrigger; - fxBool class2XmitWaitForXON; - fxStr class2PIECmd; - fxStr class2NRCmd; - FlowControl flowControl; - BaudRate maxRate; - u_int recvFillOrder; - u_int sendFillOrder; - u_int frameFillOrder; - u_int resetDelay; - u_int baudRateDelay; - u_int maxPacketSize; - u_int interPacketDelay; - u_int percentGoodLines; - u_int maxConsecutiveBadLines; - fxBool waitForConnect; - fxStr tagLineFmt; - fxStr tagLineFontFile; - ModemConfig(); - ~ModemConfig(); - fxBool parseItem(const char* tag, const char* value); - void setVolumeCmds(const fxStr& value); - fxStr parseATCmd(const char*); -}; -ModemConfig::ModemConfig() - : type("unknown") - , dialCmd("DT%s") - , noAutoAnswerCmd("S0=0") - , echoOffCmd("E0") - , verboseResultsCmd("V1") - , resultCodesCmd("Q0") - , onHookCmd("H0") - , softResetCmd("Z") - , waitTimeCmd("S7=30") - , pauseTimeCmd("S8=2") - , class1Cmd("+FCLASS=1") - , class2CQQueryCmd("+FCQ=?") - , tagLineFmt("From %%n|%c|Page %%p of %%t") -{ - class2XmitWaitForXON = ((fxBool)1) ; - setVolumeCmds("M0 L0M1 L1M1 L2M1 L3M1"); - answerAnyCmd = "A"; - flowControl = FaxModem::FLOW_NONE; - maxRate = FaxModem::BR19200; - sendFillOrder = 2 ; - recvFillOrder = 2 ; - frameFillOrder = 2 ; - resetDelay = 2600; - baudRateDelay = 0; - t1Timer = ((35+5)*1000) ; - t2Timer = ((6+1)*1000) ; - t4Timer = 3100 ; - dialResponseTimeout = 3*60*1000; - answerResponseTimeout = 3*60*1000; - pageStartTimeout = 3*60*1000; - pageDoneTimeout = 3*60*1000; - class1TCFResponseDelay = 75; - class1SendPPMDelay = 75; - class1SendTCFDelay = 75; - class1TrainingRecovery = 1500; - class1RecvAbortOK = 200; - class1FrameOverhead = 4; - class1RecvIdentTimer = t1Timer; - class1TCFMinRun = (2*1500 )/3; - class1TCFMaxNonZero = 10; - maxPacketSize = 16*1024; - interPacketDelay = 0; - waitForConnect = ((fxBool)0) ; - percentGoodLines = 95; - maxConsecutiveBadLines = 5; -} -ModemConfig::~ModemConfig() -{ -} -static fxBool getBoolean(const char* cp) - { return ((strcasecmp( cp , "on" )==0) || (strcasecmp( cp , "yes" )==0) ); } -static BaudRate -findRate(const char* cp) -{ - static const struct { - const char* name; - BaudRate br; - } rates[] = { - { "300", FaxModem::BR300 }, - { "1200", FaxModem::BR1200 }, - { "2400", FaxModem::BR2400 }, - { "4800", FaxModem::BR4800 }, - { "9600", FaxModem::BR9600 }, - { "19200", FaxModem::BR19200 }, - { "38400", FaxModem::BR38400 }, - { "57600", FaxModem::BR57600 }, - { "76800", FaxModem::BR76800 }, - }; - for (int i = (sizeof ( rates ) / sizeof ( rates [0])) -1; i >= 0; i--) - if ((strcasecmp( cp , rates[i].name )==0) ) - return (rates[i].br); - return (FaxModem::BR0); -} -static BaudRate -getRate(const char* cp) -{ - BaudRate br = findRate(cp); - if (br == FaxModem::BR0) { - syslog(3 , "Unknown baud rate \"%s\", using 19200", cp); - br = FaxModem::BR19200; - } - return (br); -} -static u_int -getFill(const char* cp) -{ - if ((strcasecmp( cp , "LSB2MSB" )==0) ) - return (2 ); - else if ((strcasecmp( cp , "MSB2LSB" )==0) ) - return (1 ); - else { - syslog(3 , "Unknown fill order \"%s\"", cp); - return ((u_int) -1); - } -} -static FlowControl -getFlow(const char* cp) -{ - if ((strcasecmp( cp , "xonxoff" )==0) ) - return (FaxModem::FLOW_XONXOFF); - else if ((strcasecmp( cp , "rtscts" )==0) ) - return (FaxModem::FLOW_RTSCTS); - else if ((strcasecmp( cp , "none" )==0) ) - return (FaxModem::FLOW_NONE); - else { - syslog(3 , "Unknown flow control \"%s\", using xonxoff", cp); - return (FaxModem::FLOW_XONXOFF); - } -} -void -ModemConfig::setVolumeCmds(const fxStr& tag) -{ - u_int l = 0; - for (int i = FaxModem::OFF; i <= FaxModem::HIGH; i++) { - fxStr tmp = tag.token(l, " \t"); - setVolumeCmd[i] = parseATCmd(tmp); - } -} -fxStr -ModemConfig::parseATCmd(const char* cp) -{ - fxStr cmd(cp); - u_int pos = 0; - while ((pos = cmd.next(pos, '<')) != cmd.length()) { - u_int epos = pos+1; - fxStr esc = cmd.token(epos, '>'); - esc.lowercase(); - char ecode; - if (esc == "xon") - ecode = (0x80|0xf) ; - else if (esc == "rts") - ecode = (0x80|0xe) ; - else if (esc == "none") - ecode = (0x80|0xd) ; - else if (esc == "") - ecode = '<'; - else { - BaudRate br = findRate(esc); - if (br == FaxModem::BR0) { - syslog(3 , "Unknown AT escape code \"%s\"", (char*) esc); - pos = epos; - continue; - } - ecode = 0x80| ((int)( br )) ; - } - cmd.remove(pos, epos-pos); - cmd.insert(ecode, pos); - } - return (cmd); -} -static const struct { - const char* name; - fxStr ModemConfig::* p; -} atcmds[] = { - { "ModemAnswerCmd", &ModemConfig::answerAnyCmd }, - { "ModemAnswerAnyCmd", &ModemConfig::answerAnyCmd }, - { "ModemAnswerFaxCmd", &ModemConfig::answerFaxCmd }, - { "ModemAnswerDataCmd", &ModemConfig::answerDataCmd }, - { "ModemAnswerVoiceCmd", &ModemConfig::answerVoiceCmd }, - { "ModemAnswerFaxBeginCmd", &ModemConfig::answerFaxBeginCmd }, - { "ModemAnswerDataBeginCmd", &ModemConfig::answerDataBeginCmd }, - { "ModemAnswerVoiceBeginCmd", &ModemConfig::answerVoiceBeginCmd }, - { "ModemResetCmds", &ModemConfig::resetCmds }, - { "ModemResetCmd", &ModemConfig::resetCmds }, - { "ModemDialCmd", &ModemConfig::dialCmd }, - { "ModemFlowControlCmd", &ModemConfig::flowControlCmd }, - { "ModemSetupAACmd", &ModemConfig::setupAACmd }, - { "ModemSetupDTRCmd", &ModemConfig::setupDTRCmd }, - { "ModemSetupDCDCmd", &ModemConfig::setupDCDCmd }, - { "ModemNoAutoAnswerCmd", &ModemConfig::noAutoAnswerCmd }, - { "ModemEchoOffCmd", &ModemConfig::echoOffCmd }, - { "ModemVerboseResultsCmd", &ModemConfig::verboseResultsCmd }, - { "ModemResultCodesCmd", &ModemConfig::resultCodesCmd }, - { "ModemOnHookCmd", &ModemConfig::onHookCmd }, - { "ModemSoftResetCmd", &ModemConfig::softResetCmd }, - { "ModemWaitTimeCmd", &ModemConfig::waitTimeCmd }, - { "ModemCommaPauseTimeCmd", &ModemConfig::pauseTimeCmd }, - { "ModemMfrQueryCmd", &ModemConfig::mfrQueryCmd }, - { "ModemModelQueryCmd", &ModemConfig::modelQueryCmd }, - { "ModemRevQueryCmd", &ModemConfig::revQueryCmd }, - { "ModemSendBeginCmd", &ModemConfig::sendBeginCmd }, - { "Class1Cmd", &ModemConfig::class1Cmd }, - { "Class2Cmd", &ModemConfig::class2Cmd }, - { "Class2BORCmd", &ModemConfig::class2BORCmd }, - { "Class2RELCmd", &ModemConfig::class2RELCmd }, - { "Class2CQCmd", &ModemConfig::class2CQCmd }, - { "Class2AbortCmd", &ModemConfig::class2AbortCmd }, - { "Class2CQQueryCmd", &ModemConfig::class2CQQueryCmd }, - { "Class2DCCQueryCmd", &ModemConfig::class2DCCQueryCmd }, - { "Class2TBCCmd", &ModemConfig::class2TBCCmd }, - { "Class2CRCmd", &ModemConfig::class2CRCmd }, - { "Class2PHCTOCmd", &ModemConfig::class2PHCTOCmd }, - { "Class2BUGCmd", &ModemConfig::class2BUGCmd }, - { "Class2LIDCmd", &ModemConfig::class2LIDCmd }, - { "Class2DCCCmd", &ModemConfig::class2DCCCmd }, - { "Class2DISCmd", &ModemConfig::class2DISCmd }, - { "Class2DDISCmd", &ModemConfig::class2DDISCmd }, - { "Class2CIGCmd", &ModemConfig::class2CIGCmd }, - { "Class2PTSCmd", &ModemConfig::class2PTSCmd }, - { "Class2SPLCmd", &ModemConfig::class2SPLCmd }, - { "Class2PIECmd", &ModemConfig::class2PIECmd }, - { "Class2NRCmd", &ModemConfig::class2NRCmd }, - { "TagLineFont", &ModemConfig::tagLineFontFile }, - { "TagLineFormat", &ModemConfig::tagLineFmt }, -}; -static const struct { - const char* name; - u_int ModemConfig::* p; -} fillorders[] = { - { "ModemRecvFillOrder", &ModemConfig::recvFillOrder }, - { "ModemSendFillOrder", &ModemConfig::sendFillOrder }, - { "ModemFrameFillOrder", &ModemConfig::frameFillOrder }, -}; -static const struct { - const char* name; - u_int ModemConfig::* p; -} numbers[] = { - { "ModemResetDelay", &ModemConfig::resetDelay }, - { "ModemBaudRateDelay", &ModemConfig::baudRateDelay }, - { "ModemMaxPacketSize", &ModemConfig::maxPacketSize }, - { "ModemInterPacketDelay", &ModemConfig::interPacketDelay }, - { "FaxT1Timer", &ModemConfig::t1Timer }, - { "FaxT2Timer", &ModemConfig::t2Timer }, - { "FaxT4Timer", &ModemConfig::t4Timer }, - { "ModemDialResponseTimeout", &ModemConfig::dialResponseTimeout }, - { "ModemAnswerResponseTimeout", &ModemConfig::answerResponseTimeout }, - { "ModemPageStartTimeout", &ModemConfig::pageStartTimeout }, - { "ModemPageDoneTimeout", &ModemConfig::pageDoneTimeout }, - { "Class1TCFResponseDelay", &ModemConfig::class1TCFResponseDelay }, - { "Class1SendPPMDelay", &ModemConfig::class1SendPPMDelay }, - { "Class1SendTCFDelay", &ModemConfig::class1SendTCFDelay }, - { "Class1TrainingRecovery", &ModemConfig::class1TrainingRecovery }, - { "Class1RecvAbortOK", &ModemConfig::class1RecvAbortOK }, - { "Class1FrameOverhead", &ModemConfig::class1FrameOverhead }, - { "Class1RecvIdentTimer", &ModemConfig::class1RecvIdentTimer }, - { "Class1TCFMaxNonZero", &ModemConfig::class1TCFMaxNonZero }, - { "Class1TCFMinRun", &ModemConfig::class1TCFMinRun }, - { "PercentGoodLines", &ModemConfig::percentGoodLines }, - { "MaxConsecutiveBadLines", &ModemConfig::maxConsecutiveBadLines }, -}; -fxBool -ModemConfig::parseItem(const char* tag, const char* value) -{ - int i; - for (i = (sizeof ( atcmds ) / sizeof ( atcmds [0])) -1; i >= 0; i--) - if ((strcasecmp( tag , atcmds[i].name )==0) ) { - (*this).*atcmds[i].p = parseATCmd(value); - return (((fxBool)1) ); - } - for (i = (sizeof ( fillorders ) / sizeof ( fillorders [0])) -1; i >= 0 ; i--) - if ((strcasecmp( tag , fillorders[i].name )==0) ) { - (*this).*fillorders[i].p = getFill(value); - return (((fxBool)1) ); - } - for (i = (sizeof ( numbers ) / sizeof ( numbers [0])) -1; i >= 0 ; i--) - if ((strcasecmp( tag , numbers[i].name )==0) ) { - (*this).*numbers[i].p = atoi(value); - return (((fxBool)1) ); - } - fxBool recognized = ((fxBool)1) ; - if ((strcasecmp( tag , "ModemType" )==0) ) - type = value; - else if ((strcasecmp( tag , "ModemSetVolumeCmd" )==0) ) - setVolumeCmds(value); - else if ((strcasecmp( tag , "ModemFlowControl" )==0) ) - flowControl = getFlow(value); - else if ((strcasecmp( tag , "ModemMaxRate" )==0) || (strcasecmp( tag , "ModemRate" )==0) ) - maxRate = getRate(value); - else if ((strcasecmp( tag , "ModemWaitForConnect" )==0) ) - waitForConnect = getBoolean(value); - else if ((strcasecmp( tag , "Class2RecvDataTrigger" )==0) ) - class2RecvDataTrigger = value; - else if ((strcasecmp( tag , "Class2XmitWaitForXON" )==0) ) - class2XmitWaitForXON = getBoolean(value); - else - recognized = ((fxBool)0) ; - return (recognized); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash6.C deleted file mode 100755 index a6527a5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash6.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -// Should be fixed by: -// Sun Jun 13 12:55:22 1993 Brendan Kehoe (brendan@lisa.cygnus.com) -// -// * cp-decl.c (start_function): Avoid a null-reference on CTYPE. - -template<int> -class Program { -} ; - -class Program<0> { -public: - inline friend float EvalNextArg() - { return 1.0 ; } -} ; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash60.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash60.C deleted file mode 100755 index b2af431..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash60.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class X -{ -public: - X (); - int f[4]; -}; - -// Note that we mistakenly initialize the array data member as if it -// was scalar -X::X () : f (0) {}// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash61.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash61.C deleted file mode 100755 index 4d3bbc4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash61.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort - template <class TP> class sapp { }; - class foo {}; - extern foo& __iomanip_setw (foo&, TP);// ERROR - type spec.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash62.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash62.C deleted file mode 100755 index 77b9fc8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash62.C +++ /dev/null @@ -1,32 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#include <iostream.h> - - void - fubar(ostream* out, const char* string) - { - (*out) << string << endl; - return; - } - - int - main() - { - // Declare a ref and a pointer to the same ostream. - // - ostream* out = &cerr; - ostream& die = cerr; - - // Valid call to fubar. - // - fubar(out, "First line."); - - // Invalid call to fubar. (1st arg is an ostream&. fubar expects - // ostream*.)This should be a syntax error, but g++ does not catch it. - // Call to this function results in a bus error in fubar when the 1st - // arg is dereferenced. - // - fubar(die, "Second line.");// ERROR - cannot convert .die.* - - return 1; - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash63.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash63.C deleted file mode 100755 index 84f8fc5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash63.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class String - { - public: - String (const char *str); - }; - -class UnitList - { - public: - UnitList (...); - }; - -UnitList unit_list (String("keV")); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash64.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash64.C deleted file mode 100755 index 3102418..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash64.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -typedef long unsigned int size_t; -typedef void (*RF_Ptr)(void *); - -struct _im_pers_mem_spec { - inline _im_pers_mem_spec(void ); - inline _im_pers_mem_spec(auto int of, auto int n); -}; - -struct _type_desc { - _type_desc(char *, int , RF_Ptr , int , int ,...); -}; - -struct metatype { int base_list; }; - -static _type_desc _type_metatype("metatype", sizeof(metatype), - (RF_Ptr)0, 0, 1, 1, - _im_pers_mem_spec( ((size_t)&((( metatype *)0)-> base_list )) , 1)); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash65.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash65.C deleted file mode 100755 index 132651e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash65.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class X { -public: - virtual const char* XY(const void* val) const = 0; -}; - - -class Y : public X { -public: - using X::xy;// ERROR - no memb.* - - using X::z;// ERROR - no memb.* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash66.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash66.C deleted file mode 100755 index 878957b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash66.C +++ /dev/null @@ -1,137 +0,0 @@ -// Build don't link: -// Special g++ Options: -O -// GROUPS passed old-abort -typedef unsigned char uchar; -typedef unsigned short ushort; -typedef unsigned long ulong; -extern int swap_endian; -inline ushort -swapshort(ushort value) -{ - value &= 0xffff; - return ((value << 8) | (value >> 8)); -} -struct eshort -{ - ushort data; - operator ushort() { return swap_endian ? swapshort(data) : data;} - eshort(ushort t) { data = swap_endian ? swapshort(t) : t;} - eshort() {} -}; -inline ulong -swaplong(ulong value) -{ - ulong v = (value << 16) | (value >> 16); - return ((v >> 8) & 0x00ff00ff) | ((v << 8) & 0xff00ff00); -}; -struct elong -{ - ulong data; - operator ulong() { return swap_endian ? swaplong(data) : data;} - elong(ulong t) { data = swap_endian ? swaplong(t) : t; } - elong() {} -}; -struct digiheader -{ - uchar type[2]; - eshort soft_version; - eshort lo_boot_rev; - eshort hi_boot_rev; - eshort load_segment; - eshort length; - eshort exec_start; - eshort image_offset; - elong startup_code[2]; - elong checksum; -}; -extern void uncompress(uchar* buf, ulong len); -extern ulong compress(char* filename, uchar* buffer, ulong); -struct filehdr -{ - eshort f_magic; - eshort f_nscns; - elong f_timdat; - elong f_symptr; - elong f_nsyms; - eshort f_opthdr; - eshort f_flags; -}; -struct aouthdr -{ - eshort magic; - eshort vstamp; - elong tsize; - elong dsize; - elong bsize; - elong entry; - elong text_start; - elong data_start; - elong bss_start; - elong gprmask; - elong cprmask[4]; - elong gp_value; -}; -struct scnhdr -{ - char s_name[8]; - elong s_paddr; - elong s_vaddr; - elong s_size; - elong s_scnptr; - elong s_relptr; - elong s_lnnoptr; - eshort s_nreloc; - eshort s_nlnno; - elong s_flags; -}; -int file_little_endian; -int host_little_endian; -int swap_endian; -int docheck; -int expand; -ulong memsize; -ulong compression_quality; -char *compressfile; -int debug_level; -extern "C" int getopt (int, char**, char*); -int -main(int argc, char** argv) -{ - uchar checksum; - uchar docrc; - ulong len; - ulong maxlen; - int i; - int c; - int magic; - int tsize; - int dsize; - int quality; - char dummy; - uchar* code; - uchar* buf; - char* ap; - digiheader *dh; - compression_quality = 10000; - docheck = 0; - while ((c = getopt(argc, argv, "Ccdf:k:q:x:")) != -1) - { - switch (c) - { - default: - goto usage; - } - } - if ((expand && (docheck || compressfile || quality)) || - (quality && !compressfile)) - { - usage: - return(2); - } - if (compressfile) - { - dh->image_offset = len; - - len += compress(compressfile, code + len, maxlen - len); - } -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash67.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash67.C deleted file mode 100755 index f63ba5d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash67.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -#pragma comment(exestr, "@(#) errno.h 10.2 92/03/26 ") diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash68.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash68.C deleted file mode 100755 index b209bd8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash68.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// Special g++ Options: -w -O -// GROUPS passed old-abort -class RWDlist -{ -public: - RWDlist& operator=(const RWDlist&); -}; -class DataItemRWGDlist : public RWDlist {}; - -class Base {}; -class DataItemList : public Base -{ - private: - DataItemRWGDlist m_diList; -}; - -class StatementGroup -{ - public: - DataItemList dataItemList; - StatementGroup(const StatementGroup&); -}; - -StatementGroup::StatementGroup(const StatementGroup& sg) -{ - dataItemList = sg.dataItemList; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash7.C deleted file mode 100755 index 19476fc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash7.C +++ /dev/null @@ -1,48 +0,0 @@ -// Build don't link: -// GROUPS passed templates - -template<class T> -class Vector -{ - int sz; - T *v; -public: - Vector (int s) : sz (s) { v = new T[sz]; } - ~Vector () { delete[] v; } - T &operator[] (int i) { return v[i]; } - int size () { return sz; } -}; - -template<class T>// ERROR - previous definition of T -struct Comparator -{ - typedef T T;// ERROR - use of template type T in typedef to T - static int lessthan (T &a, T &b) { return a < b; } -}; - -template<class Comp> -struct Sort -{ - static void sort (Vector<Comp::T> &);// ERROR - use of bad T -}; - -template<class Comp> -void Sort<Comp>::sort (Vector<Comp::T> &v)// ERROR - use of bad T -{ - int n = v.size (); - - for (int i = 0; i < n - 1; i++) - for (int j = n - 1; i < j; j--) - if (Comp::lessthan (v[j], v[j - 1])) - { - typename Comp::T temp = v[j]; - v[j] = v[j - 1]; - v[j - 1] = temp; - } -} - -void -f (Vector<int> &vi) -{ - Sort<Comparator<int> >::sort (vi); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash8.C deleted file mode 100755 index 8990c46..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash8.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -template<int a, int b> -class Elvis -{// ERROR - in template.* -} ; - -template<int a> -class Elvis<0> -{ // ERROR - incorrect number of parameters - int geta() { return a ; } -} ; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash9.C deleted file mode 100755 index a4155ef..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/crash9.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -class A {}; - -class SimQuery -{ -public: - SimQuery(); - ~SimQuery(); - int SetMeshFile(char name[]); -protected: - A& scaling; - A* mesh; -}; - -SimQuery::SimQuery():scaling(A) {}// ERROR - .* - -SimQuery::~SimQuery() {}// ERROR - - -int SimQuery::SetMeshFile(char name[]) -{// ERROR - - mesh = new C;// ERROR - .* - return 0; // needed to avoid warning of reaching end of non-void fn -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors1.C deleted file mode 100755 index eaf4871..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors1.C +++ /dev/null @@ -1,27 +0,0 @@ -// GROUPS passed constructors -// Check that global level object constructors get called. - -extern "C" void printf (char *, ...); - -struct base { - int f1; - int f2; - base (int arg1, int arg2); -}; - - -base global_base(0x55, 0xff); - -int main () -{ - if ((global_base.f1 != 0x55) || (global_base.f2 != 0xff)) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} - -base::base(int arg1, int arg2) -{ - f1 = arg1; - f2 = arg2; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors2.C deleted file mode 100755 index 2f83ce1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors2.C +++ /dev/null @@ -1,28 +0,0 @@ -// GROUPS passed constructors -// Check that sub-words sized class members are correctly set -// by constructors. - -extern "C" void printf (char *, ...); - -struct base { - int f1 : 8; - int f2 : 8; - base (int arg1, int arg2); -}; - - -base global_base(0x55, 0x7e); - -int main () -{ - if ((global_base.f1 != 0x55) || (global_base.f2 != 0x7e)) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} - -base::base(int arg1, int arg2) -{ - f1 = arg1; - f2 = arg2; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors3.C deleted file mode 100755 index 755d547..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ctors3.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed constructors -class A; - -class B { -public: - B(); -static A sa; -}; - -class A { -public: - A(int i); -}; - -A B::sa(1); - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt1.C deleted file mode 100755 index 57f3b42..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt1.C +++ /dev/null @@ -1,44 +0,0 @@ -// Build don't link: -// GROUPS passed conversions -#include <iostream.h> - -class Thing -{ -public: - typedef enum { GOOD_THING, BAD_THING, } ThingType ; // ERROR - comma - Thing (ThingType type) : thingType (type) { } - ~Thing () { } -private: - ThingType thingType ; -} ; - -class Group -{ -public: - typedef enum { THIS_GROUP, THAT_GROUP, } GroupType ; // ERROR - comma - Group (GroupType type) : groupType (type), groupCount (0) { } - ~Group () { } - void append (Thing* const &entry) { groupCount ++ ; } - operator GroupType () const { return groupType ; } - operator int () const { return groupCount ; } // remove this and problem gone - -private: - int groupCount ; - GroupType groupType ; -} ; - -inline Group& operator += (Group& g, Thing* const t) -{ - g.append (t) ; - return g ; // complaint is here -} - -int -main (int argc, char** argv) -{ - Group g (Group::THIS_GROUP) ; - - g += new Thing (Thing::GOOD_THING) ; - cout << "Group type is " << (Group::GroupType) g << endl ; - return 0 ; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt2.C deleted file mode 100755 index 76ae156..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt2.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed conversions -void f(const short & s) { } - - int -main() { - f(0); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt3.C deleted file mode 100755 index 6ab8465..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt3.C +++ /dev/null @@ -1,48 +0,0 @@ -// Build don't link: -// GROUPS passed conversions -class GttObject {}; -class GctObject: virtual public GttObject {}; -class NDAMObject: virtual public GttObject, virtual public GctObject {}; -class GctHashObject: virtual public GctObject {}; - -class GctRef: virtual public GctHashObject -{ public: operator void*() const; }; - -class NDAMAssemblerObject: virtual public NDAMObject {}; -class GctReferenceObject: virtual public GctHashObject {}; -class NDAMValue: virtual public NDAMAssemblerObject, public GctReferenceObject {}; - -class nnyacc; -class NDAMValueRef : virtual public NDAMObject, public GctRef -{ - NDAMValue *operator->() const; - operator NDAMValue *() const; -friend class nnyacc; -}; - -typedef void* Pix; -class NDAMValueRefSLList -{ -public: - NDAMValueRefSLList(); - NDAMValueRefSLList(const NDAMValueRefSLList& a); - ~NDAMValueRefSLList(); - NDAMValueRef& operator () (Pix p) const; -}; - -struct bar -{ - NDAMValueRefSLList *valueList; -}; - -class nnyacc -{ -public: - static void assign(void*& lval, void*& rval); // ERROR - candidates -}; - -void -foo (bar yylval, bar *yyvsp) -{ - nnyacc::assign(yylval.valueList, yyvsp[0].valueList);// ERROR - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt4.C deleted file mode 100755 index 3d9f475..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt4.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// GROUPS passed conversions -class A {}; - -template <class TP> -class B -{ - A &(*_f) (A &, TP); - TP _a; -public: - B (A &(*f) (A &, TP), TP a) : _f (f), _a (a) {} - friend A &operator<< (A &o, const B<TP> &m) - { (*m._f) (o, m._a); return o; } -}; - -A &setw (A &, int); -B<int> setw (int n) -{ - return B<int> (setw, n); -} - -A x; - -void f () -{ - x << setw (2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt5.C deleted file mode 100755 index 5eeea6e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/cvt5.C +++ /dev/null @@ -1,27 +0,0 @@ -// GROUPS passed conversions -// Build don't link: -typedef unsigned long Array[3]; - -void sample(const unsigned long (&an_array)[3]); - -class Sample - { - public: - void simple(const Array &an_array); - static void sample(const Array &an_array); - }; - -class A - { - public: - Array array; - }; - - Sample s; - - void simple(const A &a) - { - s.simple(a.array); - sample(a.array); - Sample::sample(a.array); - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-args1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-args1.C deleted file mode 100755 index 55efc52..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-args1.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// PRMS Id: 10860 -class Beige -{ -public: - static int yellow(); - void white(int green = yellow()); - void aqua(int green = Beige::yellow()); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-fns1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-fns1.C deleted file mode 100755 index af97526..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/def-fns1.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: -// GROUPS passed default-functions -class dictionary { -public: - dictionary (int); -}; - -class symbol { -public: - symbol (); -}; - -// a default ctor should not be generated for hyphenation_language, -// since a ctor has already been declared; if one is generated, there -// will be an error about not enough args to the ctor for dictionary, -// since dictionary only defines a ctor taking an int (it ALSO should -// not get a default ctor) -struct hyphenation_language { - symbol name; - dictionary exceptions; - hyphenation_language(symbol nm) : name(nm), exceptions(501) {} -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete1.C deleted file mode 100755 index 816c300..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed operator-delete -/* ARM $5.3.4 */ -void f(char *p, char *q[], const char *r, const char *s[]) -{ - delete 0; /* illegal: non-pointer */// ERROR - .*expected pointer.* - delete (char*)0; /* no effect */ - delete p; - delete[] q; - delete[4] q; /* ANSI forbids size arg */// ERROR - anachronistic .* - delete r; /* no longer illegal: const */ - delete[] s; - delete[4] s; /* ANSI forbids size arg */// ERROR - anachronistic.* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete2.C deleted file mode 100755 index f2bacde..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/delete2.C +++ /dev/null @@ -1,25 +0,0 @@ -// GROUPS passed operator-delete -// Check that using the delete operator with a null pointer -// is allowed (as called for by The Book, pg. 259) - -extern "C" void printf (char *, ...); - -struct base { - int member; -}; - -base* bp; - -void test () -{ - delete bp; -} - -int main () -{ - bp = (base *) 0; - test (); - - printf ("PASS\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors1.C deleted file mode 100755 index dbbfa80..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors1.C +++ /dev/null @@ -1,56 +0,0 @@ -// GROUPS passed destructors -// Check that when an object of a derived class is (implicitly) -// destructed (on exit from the block in which it is declared) -// that the destructor for the base class also gets executed. -// -// (also check that this execution doesn't seg-fault) - -extern "C" void printf (char *, ...); - -int derived_destructed; -int base_destructed; - -struct base { - int base_data_member; - - base() - { - base_data_member = 0x5e5e; - } - ~base() - { - base_destructed = 0x781f; - } -}; - -struct derived : public base { - int derived_data_member; - - derived() - { - derived_data_member = 0xe5e5; - } - ~derived() - { - derived_destructed = 0xf178; - } -}; - - -void test2 (); - -int main () -{ - test2 (); - if ((base_destructed != 0x781f) || (derived_destructed != 0xf178)) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} - -void test2 () -{ - derived derived_object; - - derived_object.derived_data_member = 99; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors2.C deleted file mode 100755 index 511ab7f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors2.C +++ /dev/null @@ -1,74 +0,0 @@ -// GROUPS passed destructors -// Check that virtual destructors work correctly. Specifically, -// check that when you destruct an object of a derived class for -// which the base class had an explicitly declared virtual destructor -// no infinite recursion occurs. -// -// Bug description: -// The generated g++ code apparently calls the base class destructor via -// the virtual table, rather than directly. This, of course, results in the -// infinite recursion. - -extern "C" void printf (char *, ...); - -int errors = 0; - -struct base { - int member; - base(); - virtual ~base(); -}; - -base::base() -{ -} - -base::~base() -{ -} - -struct derived : public base -{ - int member; - derived(); - ~derived(); -}; - -derived::derived() : base() -{ -} - -int derived_destructor_calls = 0; - -extern void exit (int); - -derived::~derived() -{ - if (++derived_destructor_calls > 2) - errors++; -} - -void test (); - -int main () -{ - test (); - - if (errors) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -base* bp; - -void test() -{ - derived a; - - a.member = 99; - bp = new derived; - delete bp; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors3.C deleted file mode 100755 index a1ca853..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/dtors3.C +++ /dev/null @@ -1,66 +0,0 @@ -// GROUPS passed destructors -// Check that member and base classes get properly destructed -// when an object of a derived class is destructed via a pointer -// to it which only has a "compile-time" type of "pointer-to-base". -// -// Note that in order for this test to work properly, the destructor -// for the base class should be explicitly declared to be virtual. - -extern "C" void printf (char *, ...); - -int member_destructor_calls = 0; -int middle_destructor_calls = 0; - -struct member_type { - int data_member; - member_type () {} - ~member_type (); -}; - -struct base { - int data_member; - base () {} - virtual ~base (); -}; - -struct middle : public base { - member_type member1; - member_type member2; - middle () {} - ~middle (); // should be implicitly virtual -}; - -struct derived : public middle { - member_type member1; - member_type member2; - //~derived () {} -}; - -int main () -{ - base* bp = new derived; - delete bp; - derived *dp = new derived; - delete dp; - - if ((member_destructor_calls != 8) || (middle_destructor_calls != 2)) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -member_type::~member_type () -{ - member_destructor_calls++; -} - -base::~base () -{ -} - -middle::~middle () -{ - middle_destructor_calls++; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/eh1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/eh1.C deleted file mode 100755 index a668306..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/eh1.C +++ /dev/null @@ -1,62 +0,0 @@ -// Special g++ Options: -O -// PRMS Id: 10776 - -extern "C" void printf (char *, ...); - -class Foo -{ - public: - Foo(int n) : n_(n) { } - int f() { return n_; } - - int badTest(); - int goodTest(); - - private: - - int n_; -}; - -int Foo::badTest() -{ - try { - throw int(99); - } - - catch (int &i) { - n_ = 16; - } - - return n_; - // On the sparc, the return will use a ld [%l0],%i0 instruction. - // However %l0 was clobbered at the end of the catch block. It was - // used to do an indirect call. -} - - -int Foo::goodTest() -{ - int n; - - try { - throw int(99); - } - - catch (int &i) { - n = 16; - } - - return n_; - // The return will use a ld [%l2],%i0 instruction. Since %l2 - // contains the "this" pointer this works. -} - -int main() -{ - Foo foo(5); - foo.goodTest(); - foo.badTest(); - - // the badTest will have failed - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum-clash.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum-clash.C deleted file mode 100755 index 68639a1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum-clash.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed arm -enum color {red, yellow, green=20, blue}; -color c = 1; // this should be an error// ERROR - .* -int i = yellow; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum1.C deleted file mode 100755 index 9cc3ed8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class foo { -public: - enum bar { baz = 1, bat = 7 }; -}; - -class derv : public foo { }; - -int main() -{ - foo::bar x = foo::baz; - derv::bar y = derv::bat; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum10.C deleted file mode 100755 index 5c955d3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum10.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class Type -{ - public: - - enum name - { - A - }; -}; - -class A -{ -}; - -class B: public A -{ - public: - B(); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum11.C deleted file mode 100755 index 7705aa3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum11.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class X -{ - enum - { - oneMask = 0x0000FFFF, - twoMask = 0x000F0000, - thiMask = 0xFFF00000, - }; // ERROR - comma - unsigned int foo; - -public: - X (int) : foo (oneMask | twoMask ) {} // No warning - X () : foo (oneMask | twoMask | thiMask) {} // Warning -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum12.C deleted file mode 100755 index 7d4eb7d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum12.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed enums -enum Bool { False, True }; - -enum Bool object; - -struct S -{ - Bool field:1; - - void copy_enum_bit_field () const { object = field; } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum13.C deleted file mode 100755 index ea6dfa7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum13.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed enums -enum COLOR { red, green, blue }; - -struct S { - COLOR color:2; -}; - -COLOR color; -S object; - -void fubar () -{ - color = object.color; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum14.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum14.C deleted file mode 100755 index 192a2b4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum14.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// Special g++ Options: -fshort-enums -// GROUPS passed enums - enum E { A = 0x80000000 }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum2.C deleted file mode 100755 index 1c5c50b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class foo { -public: - enum bar { baz = 1, bat = 7 }; -}; - -class foo2 { -public: - enum bar2 { baz2 = 1, bat2 = 7 }; -}; - -class derv : public foo, public foo2 { }; - -int main() -{ - foo::bar x = foo::baz; - derv::bar2 y = derv::bat2; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum3.C deleted file mode 100755 index 38b7d3c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum3.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed enums -enum foo -{ - x = 0 -}; - -enum bar -{ - // this used to say `x' wasn't a constant, because build_enumerator - // was getting the value of x wrapped around a NOP_EXPR. It now - // strips them off before working on it, so we shouldn't get any - // errors for this. - y = (x + 0x0000) -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum4.C deleted file mode 100755 index 826ccd3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class X { -public: - enum { a }; -}; - -enum { b = 1 }; -enum ok { y = b }; -enum notok { z = X::a }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum5.C deleted file mode 100755 index 32134ef..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed enums -enum Thing { FIRST, SECOND } ; - -int main() -{ - Thing x = FIRST ; - x = 27 ; // this line should be a type error.// ERROR - .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum6.C deleted file mode 100755 index de82148..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum6.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class X { - private: - enum E1 {a1, b1}; - public: - enum E2 {a2, b2}; - }; - -void h(X* p) { - X::E2 e2; - int x2 = X::a2; - - X::E1 e1; - int x1 = X::a1; // Should be rejected, and is.// ERROR - .* - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum7.C deleted file mode 100755 index 5a397d7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum7.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed enums -enum color { red, green, blue, orange, brown }; - -struct s { - enum color field:2; // ERROR - too small -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum8.C deleted file mode 100755 index d9380ad..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum8.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// GROUPS passed enums -class foo1 -{ - public: - enum foo1_enum - { - ENUM1, - ENUM2, - }; // ERROR - comma -}; - - -class foo2 -{ - private: - enum foo1::foo1_enum Enum; -}; - - -class foo3 -{ - private: - foo1::foo1_enum Enum; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum9.C deleted file mode 100755 index f04deb1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/enum9.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed enums -enum fig { - figgy, - pudding, -}; // ERROR - comma - -class X { -public: - static fig (*open)(void *thing, const char *filename); - static fig (*parse)(void *thing); -}; - -enum fig (*X::open)(void *thing, const char *filename) = 0; -fig (*X::parse)(void *thing) = 0; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg1.C deleted file mode 100755 index 9450d76..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class A { }; - -int i = A::_ter;// ERROR - ._ter.* -int j = A::term;// ERROR - .term.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg10.C deleted file mode 100755 index 24ddcaa..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg10.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo { -public: - virtual static int f () = 0;// ERROR - member `f' cannot be declared both virtual and static.* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg11.C deleted file mode 100755 index de5ed8a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg11.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -void foo (mutable int x);// ERROR - non-member `x' cannot be declared `mutable'.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg12.C deleted file mode 100755 index 0b59ba0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg12.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo { -public: - friend mutable int x ();// ERROR - non-object member `x' cannot be declared `mutable' -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg2.C deleted file mode 100755 index 0bfb4c2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg2.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -typedef void (*pfv)(double, double); -extern "C" typedef void (*pfv)(double, double);// ERROR - multiple.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg3.C deleted file mode 100755 index 1d115e6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg3.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -#include <fstream.h> -#include <iomanip.h> - -// This error should not appear: -// bug.C: In method `test::test(const class test &)': -// bug.C:8: field `' not in immediate context - -class test{ -public: - int flags; - test() {}; - }; - -int main() - -{ -return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg4.C deleted file mode 100755 index 72f6150..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class X { -public: - static int x;// ERROR - previous.* - static int y;// ERROR - previous.* -}; - -unsigned X::x;// ERROR - conflict.* -unsigned X::y;// ERROR - conflict.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg5.C deleted file mode 100755 index 37b956c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg5.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo {}; -~foo () {}// ERROR - destructors must be member functions.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg6.C deleted file mode 100755 index ce60f0d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg6.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo { -public: - ~bar () {}// ERROR - destructor `bar' must match class name `foo'.* -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg7.C deleted file mode 100755 index 5971806..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg7.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo { -public: - volatile int () {}// ERROR - -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg8.C deleted file mode 100755 index a2ad4df..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg8.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -operator int ;// ERROR - declaration of `operator int' as non-function.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg9.C deleted file mode 100755 index 0714de6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/err-msg9.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -class foo { -public: - int ~foo ();// ERROR - return type specification for destructor invalid.* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/explicit1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/explicit1.C deleted file mode 100755 index 148155e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/explicit1.C +++ /dev/null @@ -1,4 +0,0 @@ -// $7.1.2 disallows explicit on anything but declarations of -// constructors ... including friends. -class foo { public: foo(); }; -class bar { public: friend explicit foo::foo(); }; // ERROR - explicit friend diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend1.C deleted file mode 100755 index 9aea460..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend1.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed friends -class A -{ -private: - A () {} - -friend struct B; -}; - -class B -{ -public: - A a; -}; - -B b; - -int main () {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend2.C deleted file mode 100755 index 5b1333f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed friends -class X { - int a; -friend void friend_set (X*, int); -}; - -void friend_set (X *p, int i) { p->a = i; } - -void f() -{ - X obj; - friend_set (&obj, 10); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend3.C deleted file mode 100755 index 1fa48a8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend3.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// GROUPS passed friends -class B { - - friend class A; - - enum { - bEnum = 1, - }; // ERROR - comma - - int bArray[ bEnum ]; - -public: - void bFunction(int arg[ bEnum ]); -}; - - -class A { - int aMember; - -public: - void aFunction(int a[B::bEnum]) - { - B b; - b.bArray[ B::bEnum ] = aMember; - } -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend4.C deleted file mode 100755 index f19d81a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/friend4.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed friends -// do_friend should complain that foo was declared as a friend of -// A before A was defined -struct A; -struct B { friend A::foo (); };// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/groff1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/groff1.C deleted file mode 100755 index 179ef30..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/groff1.C +++ /dev/null @@ -1,33 +0,0 @@ -// GROUPS passed groff -/* This should compile properly with the new overloading scheme. */ - -extern "C" void printf (const char *, ...); -extern "C" void exit (int); - -int win = 0; - -class symbol -{ -public: - symbol(const char *p, int how = 0) {} - symbol() {} -}; - -class dictionary -{ -public: - void *lookup(symbol s, void *v=0) { win = 1; } - void *lookup(const char *) {} -}; - -int main() -{ - char buf[2048]; - dictionary exceptions; - unsigned char *tem = new unsigned char[19 + 1]; - - exceptions.lookup (symbol (buf), tem); - - printf (win ? "PASS\n" : "FAIL\n"); - exit (! win); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init1.C deleted file mode 100755 index 4396906..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init1.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed initialization - class Thing{ - private: - int x,y; - public: - Thing (int v, int q) { x = v; q = y; } - void doit(int); - }; - - Thing t(18,19); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init10.C deleted file mode 100755 index 45b2985..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init10.C +++ /dev/null @@ -1,3 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -struct { int :0; } a; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init11.C deleted file mode 100755 index 69fd77c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init11.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -struct String { - char * string; - String(const char* st); -}; - -extern char array []; -static String sub = array; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init12.C deleted file mode 100755 index 7d7c13a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init12.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed array-bindings -char * bob(); - -int main() -{ - char a[1][2]; - a[0] = bob();// ERROR - .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init13.C deleted file mode 100755 index 41f0fcf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init13.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -struct A { - operator int (); -}; - -int i = A(); diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init2.C deleted file mode 100755 index a9ec6f3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init2.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -// this should give an error in require_instantiated_type about not -// being allowed to have an initializer list in an argument list. -int f(int a = {1});// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init3.C deleted file mode 100755 index b86c2c7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init3.C +++ /dev/null @@ -1,38 +0,0 @@ -// GROUPS passed initialization -// p2766: Make sure that members are initialized in order of declaration -// in the class, not in order of specification in the mem-initializer list. - -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void die () { printf ("FAIL\n"); exit (1); } - -class bar1 { -public: - bar1 (int) { if (count != 0) die (); count = 1; } -}; - -class bar2 -{ -public: - bar2 (int) { if (count != 1) die (); count = 2; } -}; - -class foo -{ -public: - bar1 a; - bar2 b; - foo (int, int); -}; - -// bar1 should get built before bar2 -foo::foo (int x, int y) : b(x), a(y) {} - -int main() -{ - foo f (1, 2); - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init4.C deleted file mode 100755 index c1d3592..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init4.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -struct CharList { int i; }; - -const CharList& terminals = { 1 };// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init5.C deleted file mode 100755 index 112dcac..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init5.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -int main( int argc, char**argv, char** envp ){ - char* domain = argv[1]; - domain = domain? (char*)"component" : domain; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init6.C deleted file mode 100755 index e49758a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init6.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -class Tag { -public: - Tag(int i):value(i){} - int value; -}; - -extern const Tag myTag; -extern const Tag myTag=9; - -// The compiler should not issue an error on this line; expand_static_init -// should be checking that there's no initializer for this line, and thus -// doesn't need to produce an error. -extern const Tag myTag; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init7.C deleted file mode 100755 index 033da8f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init7.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -struct myChoiceList -{ - int bla; - int blubb; - int brummbrumm; -}; - -extern const myChoiceList foo; - -extern const myChoiceList foo = {1,1,1}; - -// finish_decl should have an exclusion so an error is not produced -// for this line. -extern const myChoiceList foo; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init8.C deleted file mode 100755 index 4818a41..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init8.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -class A -{ -public: - A(const A & a) : i_member(a.i_member) - { - } - A(const int & i) : i_member(i) - { - } - union - { - int i_member; - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/init9.C deleted file mode 100755 index bad6416..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/init9.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -int FALSE = 0; -class X { -public: - static int FALSE; -}; - -// The compiler should NOT complain about redeclaration of the global -// `FALSE' with this declaration...grokvardecl shouldn't be doing that. -int X::FALSE = 0; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/label1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/label1.C deleted file mode 100755 index ff0b87c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/label1.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed labels -// it should only give 1 error, about using an undefined label -int main(void) { goto dummy; }// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/label2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/label2.C deleted file mode 100755 index bce2112..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/label2.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed labels -class X { -public: - X(); -}; -void foo () -{ -X: ::abort(); - goto X; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/line1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/line1.C deleted file mode 100755 index d76832e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/line1.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed error-messages -typedef struct s S;// ERROR - previous.* -struct S { int member:1; }; // the lineno for this should be 2, not 0// ERROR - conflicting types.* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc1.C deleted file mode 100755 index 666ec25..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -int main( int argc, char**argv, char** envp ){ - char* domain = argv[1]; - domain = domain? (char*)"component" : domain; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc10.C deleted file mode 100755 index 4d96926..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc10.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -// The compiler shouldn't give a `invalid operands to binary +' for this -// case. -enum flag { OFF, ON }; -enum BOOL { FALSE = (enum flag) 0, TRUE }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc11.C deleted file mode 100755 index 043f6a5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc11.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -// This should not complain about A::f being abstract. -struct A -{ - virtual int f() = 0; -}; - -struct B : virtual A -{ - virtual int f() { return 1; } - virtual int g() = 0; -}; - -struct C: B -{ - int g() { return 2; } -}; - -C c; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc12.C deleted file mode 100755 index 73db9bf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc12.C +++ /dev/null @@ -1,16 +0,0 @@ -// GROUPS passed miscellaneous -extern "C" void exit (int); -extern "C" int printf (char *, ...); - -/* Make sure cp-lex.c handles these properly--if this links, that means - it emitted the strings instead of __FUNCTION__.0, etc. */ - -int -main() -{ - char *a = __FUNCTION__; - char *b = __PRETTY_FUNCTION__; - - printf ("PASS\n"); - exit (0); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc13.C deleted file mode 100755 index 57292a2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc13.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -// This should only give warnings from duplicate_decls; it should not get -// errors from push_overloaded_decl as well. - -extern "C" -{ - long unsigned int strlen(char*);// ERROR - warning// ERROR - warning.* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc14.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc14.C deleted file mode 100755 index 024566f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc14.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -class X { -public: - enum e { - New,// ERROR - conflicts with other.* - }; // ERROR - comma - - static int New(int);// ERROR - declaration.* -}; - -int main() {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc15.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc15.C deleted file mode 100755 index e4dd53e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc15.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -// we shouldn't get any warnings or errors for this code -struct A { - int aa; -}; -struct B : public A { -}; -struct C : public A { -}; -struct D : public C, public B { - void fun() { C::aa = 10; } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc16.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc16.C deleted file mode 100755 index 15e3946..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc16.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -// Using a typedef causes a compiler error -typedef unsigned int Uint32; - -// Using a define so that there isn't a typedef works OK. -//#define Uint32 unsigned int - -Uint32 func0(Uint32, Uint32) -{ - return 0; -} - -Uint32 func1(Uint32, Uint32) -{ - return 1; -} - -Uint32 (*mf[])(Uint32, Uint32) = {func0, func1}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc17.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc17.C deleted file mode 100755 index 987618f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc17.C +++ /dev/null @@ -1,36 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -typedef int va_list; -class ostream; -class String { -public: -operator const char *() const; -}; -class FwtErrorManager { -public: - FwtErrorManager(ostream& err, const char *program); -public: - void form(const char *format, ...); -protected: - const String _program; -private: - FwtErrorManager(const FwtErrorManager&); - void operator=(const FwtErrorManager&); -}; -class FwtProgram: public FwtErrorManager { -public: - FwtProgram(); -}; -class FwtArgOptions { }; -class FwtStdProgram: public FwtProgram, public FwtArgOptions { -public: - FwtStdProgram(); - void usage_if_not_complete(); -}; -void -FwtStdProgram::usage_if_not_complete() -{ - FwtStdProgram& thisp = *this; - thisp.form("%s: error, there were unrecognized options", - (char *) FwtErrorManager::_program);// ERROR - .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc2.C deleted file mode 100755 index d9aa99b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc2.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -// Should be fixed by: -// Sun Jun 13 12:55:22 1993 Brendan Kehoe (brendan@lisa.cygnus.com) -// -// * cp-decl.c (grokvardecl): Don't complain about duplicate -// definitions of `extern "C"' declarations (parallelize it with how -// regular `extern' decls are handled). - -extern "C" double _MaXdOuB, _MiNdOuB; -extern "C" double _MaXdOuB, _MiNdOuB; // no error should be emitted for this diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc3.C deleted file mode 100755 index d632cb7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous-bugs -// The compiler should not error about taking the addr of main in this example. -class fred { -private: - void main () { - } -public: - fred ( ) { - &fred::main; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc4.C deleted file mode 100755 index 93aea92..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -// This should not emit an error about A::~A() being redefined; we -// should check that it is a pure virtual. -class A { -public: - virtual ~A() = 0; -}; - -A::~A() {} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc5.C deleted file mode 100755 index 05eeed6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc5.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -class A { - static A aa[2]; -}; - -A A::aa[2]; // should be completely legal diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc6.C deleted file mode 100755 index b05c1f1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc6.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -// test that use of `inline' is forbidden when it should be -inline int i;// ERROR - .* -struct c { inline int i; };// ERROR - .* -int foo (inline int i);// ERROR - .* -inline class c; // ERROR - inline -inline typedef int t; // ERROR - inline -class d { inline friend class c; }; // ERROR - inline diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc7.C deleted file mode 100755 index af07d6f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc7.C +++ /dev/null @@ -1,15 +0,0 @@ -// GROUPS passed miscellaneous -extern "C" void printf (char *, ...); - -int main() -{ - int i = 0; - // Make sure build_unary_op correctly computes this. - int *pi = &(++i); - *pi = 4; - - if (i != 4) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc8.C deleted file mode 100755 index b2aa92f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc8.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -// used to say invalid lvalue in `&\' -class foo { - int a; - public: - foo(int a); -}; - -foo::foo(int a) -{ - foo::a=a; -} - -int main() -{ -foo obj(4); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc9.C deleted file mode 100755 index 88071c6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/misc9.C +++ /dev/null @@ -1,28 +0,0 @@ -// Build don't link: -// GROUPS passed miscellaneous -//The program listed below produces the following error during compilation: -// % g++ bug17.cc -// bug17.cc: In method `class Y& Y::operator = (const class Y&)': -// bug17.cc:18: invalid use of non-lvalue array - -class X { -public: - X& operator=(const X&) { return *this; } -}; - -struct S { - char c[10]; - X x; -}; - -class Y { - S s; -public: - const S& f() const { return s; } - - Y& operator=(const Y& _Y) { - s = _Y.s; // this line compiles - s = _Y.f(); // this line does not compile - return *this; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/mutable1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/mutable1.C deleted file mode 100755 index 79157b7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/mutable1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed mutable -class foo; -class bar { - mutable foo const *foobar; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest1.C deleted file mode 100755 index 32aab3e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -int x; -class enclose { -public: - int x; - - class inner { - public: - void f (int i) { - x = i;// ERROR - .* - } - }; -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest10.C deleted file mode 100755 index d22e307..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest10.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class A - { - public: - class B - { - public: - int f (); - void g (int); - private: - int b; - }; - }; - -int A::B::f () - { - int val=b; - return val; - } - -void A::B::g (int val) - { - b = val; - } - - -int main () - { - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest11.C deleted file mode 100755 index 4a57b38..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest11.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class A { - int x; - - struct B { - int x; - }; - struct C { - int bug (A::B &y); - }; -}; - -int -A::C::bug (A::B &y) -{ - return y.x; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest12.C deleted file mode 100755 index 19286db..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest12.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -struct enclose { - class nested; - nested *nptr; - class nested { - int x; - }; - void f(); -}; - -void enclose::f() -{ - nptr = new enclose::nested; -} - -void g() -{ - enclose obj; - obj.nptr = new enclose::nested; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest13.C deleted file mode 100755 index 354e7bc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest13.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -// The bug here is that wer'e getting a message about inner not -// being a basetype itself. I think it's because it's being -// compared as the "inner" we knew about when it was forward-declared, -// versus the "inner" we know about when it *has* been defined. - -class temp -{ -public: - struct inner; - inner *trump() - { - return (tt); - } - struct inner - { - int ll; - }*tt; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest15.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest15.C deleted file mode 100755 index 4a696af..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest15.C +++ /dev/null @@ -1,37 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class BDDHeap { -public: - BDDHeap(); - BDDHeap(const BDDHeap&); - - class Page { - public: - int i; - }; - struct Pointer { - Page *page; - unsigned index; - - Pointer(); - Pointer(const BDDHeap& heap); - }; - - struct Half { - struct { - Page *top; - Page **tail; - } inuse; - - Half(); - }; - - Half half[2]; - unsigned halfspace; -}; - -inline -BDDHeap::Pointer::Pointer(const BDDHeap& heap): -page(heap.half[heap.halfspace].inuse.top), -index(0) -{ } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest16.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest16.C deleted file mode 100755 index 920ea0b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest16.C +++ /dev/null @@ -1,41 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class BDDHeap { -public: - BDDHeap(); - BDDHeap(const BDDHeap&); - - class Page { - public: - int i; - }; - struct Pointer { - Page *page; - unsigned index; - - Pointer(); - Pointer(const BDDHeap& heap); - }; - - struct Half { - struct { - Page *top; - Page **tail; - } inuse; - - Half(); - }; - - Half half[2]; - unsigned halfspace; -}; - -inline -BDDHeap::Pointer::Pointer(const BDDHeap& heap): -page(0), -index(0) -{ - Page *x = heap.half[heap.halfspace].inuse.top; - page = x; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest17.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest17.C deleted file mode 100755 index f61c49e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest17.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class T { -public: - typedef int I; - class Y {int y;}; - typedef Y Z; -}; - -T::I i; -T::Y y; -T::Z z; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest18.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest18.C deleted file mode 100755 index e41def4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest18.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -// This is the first line of file ||t2.C||. - -// This code demonstrates what appears to be a bug with nested types. -// In C++, nested typedefs are not supposed to be visible outside -// their class scopes but they apparently are in gcc 2.4.5. This code -// compiles fine in AT&T cfront 3.0.1, but will not compile with gcc. - -// If this class does not precede String, then the code will compile. - -class Another { -public: - typedef int Length; -}; - -// If String does not define typedef int Length, then the code will -// compile. - -class String { -public: - typedef int Length; // remove this and it will compile fine - - int foo(Length length) const; -}; - -int String::foo(Length length) const { - return length; -} - -// File ||t2.C|| ends here. diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest19.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest19.C deleted file mode 100755 index efa7ac5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest19.C +++ /dev/null @@ -1,40 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -// This is the first line of file ||t3.C||. - -// This code demonstrates a variation of the same problem with nested -// types. In C++, nested typedefs are not supposed to be visible -// outside their class scopes but they apparently are in gcc 2.4.5. -// This code compiles fine in AT&T cfront 3.0.1, but gcc rejects it -// with the messages given below. - -// If this class does not precede Expr, then the code will compile. - -class Another { -public: - typedef int Boolean; - enum { FALSE, TRUE }; -}; - -// If Expr does not define typedef int Boolean, then the code will -// compile. - -class Expr { -public: - typedef int Boolean; - enum { FALSE, TRUE }; - void foo(); - void call_something_with(Boolean); -}; - -// t3.C: In method `void Expr::foo ()': -// t3.C:36: uninitialized const `Boolean' -// t3.C:36: parse error before `=' -// t3.C:37: `argument' undeclared (first use this function) -// t3.C:37: (Each undeclared identifier is reported only once -// t3.C:37: for each function it appears in.) - -void Expr::foo() { - const Boolean argument = TRUE; - call_something_with(argument); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest2.C deleted file mode 100755 index 4b55245..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest2.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class A { -protected: - class B { - public: - ~B(); - private: - float _datum; - }; -private: - B *_b; -}; - -A::B::~B() -{ - _datum = 8.0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest20.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest20.C deleted file mode 100755 index 297b08a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest20.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -// This is the first line of file ||t5.C||. - -// This code initializing an unnamed union inside a class appears to -// be legal C++ input and compiles fine with AT&T cfront 3.0.1, but -// gcc 2.4.5 complains about multiple initializations of the same -// member. - -class Expr { -public: - enum Type { undefined, slong, ulong, ldouble }; - Expr(); - Expr(Type type, const Expr* initializer); -private: - Type type_; - union { - long slong_; - unsigned long ulong_; - long double ldouble_; - }; -}; - -// Construct an undefined expression. - -Expr::Expr() - : - type_(undefined), - slong_(-1) -{} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest21.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest21.C deleted file mode 100755 index f32166d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest21.C +++ /dev/null @@ -1,95 +0,0 @@ -// GROUPS passed nested-classes -#include <iostream.h> -#include <stdio.h> - -static char output[1024]; - -class BDDRetrace { -public: - class Dump { - public: - virtual Dump& operator<<(char c) = 0; - virtual Dump& operator<<(int i) = 0; - virtual Dump& operator<<(double r) = 0; - }; - - class Dump1: public Dump { - public: - Dump& operator<<(char c); - Dump& operator<<(int i); - Dump& operator<<(double r); - }; -}; - -class Dump2: public BDDRetrace::Dump { -public: - BDDRetrace::Dump& operator<<(char c); - BDDRetrace::Dump& operator<<(int i); - BDDRetrace::Dump& operator<<(double r); -}; - -BDDRetrace::Dump& -BDDRetrace::Dump1::operator<<(char c) -{ char tempout[1024]; - sprintf (tempout, "%s%s%c", output, "1-", c); - strcpy (output, tempout); - return *this; -} - -BDDRetrace::Dump& -BDDRetrace::Dump1::operator<<(int i) -{ char tempout[1024]; - sprintf (tempout, "%s%s%d", output, "1-", i); - strcpy (output, tempout); - return *this; } - -BDDRetrace::Dump& -BDDRetrace::Dump1::operator<<(double r) -{ char tempout[1024]; - sprintf (tempout, "%s%s%1.0f", output, "1-", r); - strcpy (output, tempout); - return *this; } - -BDDRetrace::Dump& -Dump2::operator<<(char c) -{ char tempout[1024]; - sprintf (tempout, "%s%s%c", output, "2-", c); - strcpy (output, tempout); - return *this; } - -BDDRetrace::Dump& -Dump2::operator<<(int i) -{ char tempout[1024]; - sprintf (tempout, "%s%s%d", output, "2-", i); - strcpy (output, tempout); - return *this; } - -BDDRetrace::Dump& -Dump2::operator<<(double r) -{ char tempout[1024]; - sprintf (tempout, "%s%s%1.0f", output, "2-", r); - strcpy (output, tempout); - return *this; } - -int main() -{ - BDDRetrace::Dump1 d1; - Dump2 d2; - - sprintf (output, " "); - - d1 << 'a'; - d1 << 1; - d1 << 1.0; - - d2 << 'a'; - d2 << 1; - d2 << 1.0; - - if (strcmp (output, " 1-a1-11-12-a2-12-1") == 0) - printf ("PASS\n"); - else - printf ("FAIL\n"); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest22.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest22.C deleted file mode 100755 index cd26c34..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest22.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class foo { -public: - typedef int bar; - foo::bar fb; // this line causes a syntax error! -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest23.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest23.C deleted file mode 100755 index e18398b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest23.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class CS { -public: - class PS { - }; -}; - -class NCS: public CS { -public: - class S: public PS { - }; -}; - -int i; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest24.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest24.C deleted file mode 100755 index 4fcc02c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest24.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -struct A { - A (){} -}; - -void foo () -{ - struct B {}; - - struct S : B { - A a; - }; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest3.C deleted file mode 100755 index bedd519..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest3.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed nested-classes -class X { -public: - struct M2 { int m; }; - M2 g(int); -}; - - -X::M2 X::g(int i) { X::M2 m2; return m2; } - -int main() { } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest4.C deleted file mode 100755 index 34631f4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/nest4.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed nested-classes -class vec { - class blah { }; - - ::vec::blah satan( 0);// ERROR - .* - blah herman( 0);// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new-array.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/new-array.C deleted file mode 100755 index 3080a58..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new-array.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed operator-new -typedef struct { - int a; -} AStruct; - -void MakeBug() { - AStruct *job; - - // This used to crash, it should now give error(s). - job = new AStruct[];// ERROR - .* - - job = new AStruct; -} - -int main () { - MakeBug(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/new1.C deleted file mode 100755 index 09326d2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new1.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed operator-new -typedef __SIZE_TYPE__ size_t; -struct x { int a; void * operator new (size_t, void *); }; -struct x * f(void *p) { return new (p) x; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/new2.C deleted file mode 100755 index 64b3d51..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new2.C +++ /dev/null @@ -1,67 +0,0 @@ -// GROUPS passed operator-new -// Check that if there is a user defined class-specific operator -// new for a given class, that operator is invoked when a new -// object of the class is requested, regardless of whether or not -// there is also a constructor for the given class, and regardless -// of whether or not the constructor for the given class is defined -// before or after the new operator is even declared. - -extern "C" void printf (char *, ...); - -typedef __SIZE_TYPE__ size_t; - -struct base { - int i; - - base () - { - i = 7; - } - - void * operator new (size_t size); - void operator delete (void*); -}; - -class derived : public base { - int j; -}; - -int new_call_count = 0; -int expected_size = 0; -int errors = 0; - -int main () -{ - base* base_ptr; - derived* derived_ptr; - - expected_size = 4; - base_ptr = new base; - expected_size = 8; - derived_ptr = new derived (); - - if ((new_call_count != 2) || (errors != 0)) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -char allocation_space[1000]; -char* allocation_ptr = allocation_space; - -void base::operator delete (void* p) -{ -} - -void *base::operator new (size_t size) -{ - char* return_value = allocation_ptr; - - new_call_count++; - if (size != expected_size) - errors++; - allocation_ptr = allocation_ptr + size; - return (void*) return_value; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/new3.C deleted file mode 100755 index 5f5c988..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/new3.C +++ /dev/null @@ -1,36 +0,0 @@ -// GROUPS passed operator-new -#include <stdio.h> -#include <stdlib.h> -#include <new> - -int pass = 0; - -void *operator new(size_t sz) throw (std::bad_alloc) { - - void *p; - - pass = 1; - p = malloc(sz); - return p; -} - -class A { -public: - A() {} - ~A() {} - - int a; - int b; -}; - - -int main() -{ - A *bb = new A[10]; - delete [] bb; - - if (pass) - printf ("PASS\n"); - else - printf ("FAIL\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ns1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ns1.C deleted file mode 100755 index d20a9d9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ns1.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// GROUPS passed old-abort -struct B -{ - void f(char); - void g(char); -}; - -class C -{ - int g(); -};// ERROR - warning - -class D2 : public B -{ - using B::f; // ok: B is a base of D - using C::g; // error: C isn't a base of D2 -}; // ERROR - type C is not a base type for type D2 diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators1.C deleted file mode 100755 index 89453f9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed operators -struct A { - int x; -}; - -int operator()(A x,float y) { // MUST be a member function// ERROR - .* - return 1; -} - -int main() { - A x; - x(1.0); // ERROR - no match for call -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators2.C deleted file mode 100755 index ece06ef..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators2.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed operators -class X { }; -void operator[](X& a, X& b) {} // MUST be a member function// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators3.C deleted file mode 100755 index e068de3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators3.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed operators -class X { }; -void operator->(X& a, X& b) {} // MUST be a member function// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators4.C deleted file mode 100755 index b56d26c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators4.C +++ /dev/null @@ -1,121 +0,0 @@ -// GROUPS passed operators -// Check that the & operator, when applied to a global function -// or member function returns a proper value as long as the context -// in which the result of & is used requires a pointer to a specific -// unambigous (function-pointer) type. -// -// This test fails (in test5()) when compiled with g++ 1.34.1. - -extern "C" void printf (char *, ...); - -int function (char c); -int function (float f); - -class base { - int filler; -public: - int method (char); - int method (float); -}; - -void* vp; - -typedef int (*ptr_to_func_of_char)(char); -typedef int (*ptr_to_func_of_float)(float); -typedef int (base::*ptr_to_method_of_char)(char); -typedef int (base::*ptr_to_method_of_float)(float); - -int test2 (void*); -int test3 (void*); -int test4 (void*); -int test5 (void*); - -base* base_ptr; - -int fail () -{ - printf ("FAIL\n"); - return 1; -} - -int main () -{ - base_ptr = new base; - - ptr_to_func_of_char p0 = &function; - vp = (void*) p0; - if (test2 (vp)) - return fail (); - ptr_to_func_of_float p1 = &function; - vp = (void*) p1; - if (test3 (vp)) - return fail (); - ptr_to_method_of_char p2 = &base::method; - vp = (void*) p2; // ERROR - - if (test4 (vp)) - return fail (); - ptr_to_method_of_float p3 = &base::method; - vp = (void*) p3; // ERROR - - if (test5 (vp)) - return fail (); - - printf ("PASS\n"); - return 0; -} - -int test2 (void* vp) -{ - char ch = 'x'; - - return (((ptr_to_func_of_char)vp)(ch) != 9901); -} - -int test3 (void* vp) -{ - float flt = 9.9; - - return (((ptr_to_func_of_float)vp)(flt) != 9902); -} - -int test4 (void* vp) -{ - char ch = 'x'; - ptr_to_method_of_char p = (ptr_to_method_of_char) vp; // ERROR - bad type conversion - - return ((base_ptr->*p)(ch) != 9904); -} - -int test5 (void* vp) -{ - float flt = 9.9; - ptr_to_method_of_float p = (ptr_to_method_of_float) vp; // ERROR - bad type conversion - - if ((base_ptr->*p)(flt) != 9905) { - return 1; - } else - return 0; -} - -int function (char c) -{ - c = c; - return 9901; -} - -int function (float f) -{ - f = f; - return 9902; -} - -int base::method (char c) -{ - c = c; - return 9904; -} - -int base::method (float f) -{ - f = f; - return 9905; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators5.C deleted file mode 100755 index 84c09a2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators5.C +++ /dev/null @@ -1,52 +0,0 @@ -// GROUPS passed operators -// Check that operators may be (directly) recursive. - -extern "C" void printf (char *, ...); - -struct base { - int i; -}; - -base base_variable; - -base operator+ (const base& left, const base& right) -{ - base ret_val; - - ret_val.i = left.i + right.i; - return ret_val; -} - -base operator- (const base& left, int right) -{ - base ret_val; - - ret_val.i = left.i - right; - return ret_val; -} - -// Define the unary ! operator for class base to be the fibonachi -// operator. - -base operator! (const base& right) -{ - if (right.i < 2) - return right; - else - return ((!(right-1)) + (!(right-2))); -} - -int main () -{ - base k; - - k.i = 15; - k = !k; // fib it! - - if (k.i != 610) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators6.C deleted file mode 100755 index c0c2318..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators6.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed operators -class a { -public: - a* operator->() { return this; } - void p(); -}; - -void a::p() { - operator->(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators7.C deleted file mode 100755 index 7a95221..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators7.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed operators -class A { - char *p; -public: - operator const char *() const { return p; } -}; - -int foo(const A &a) -{ - return (a != 0); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators8.C deleted file mode 100755 index 390f749..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/operators8.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed operators -struct A { - char *p; - operator char *(); -}; - -char foo(A a) -{ - return a[0]; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload1.C deleted file mode 100755 index e5040fd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload1.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -class Foo -{ -public: - int f (void); -}; - -class Bar : public Foo -{ -public: - int f (int); // ERROR - candidates are -}; - -int main () -{ - Bar b; - - b.f ();// ERROR - - b.f (10); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload10.C deleted file mode 100755 index e28d6ea..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload10.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -class Bed { - public: - static void bed_func( - int (*f)(int &, int, int)); -}; -class g_func { -public: - static int save_status; - - // in compute_harshness, we should be using comptypes, not ==, to - // check if this is equivalent to the previous decl; the only - // difference is the default arg - static int rpt_func(int &status, int expand, - int restore_cursor=1 ); -}; - -int main (int argc, - char **argv, - char **envp) -{ - Bed::bed_func(g_func::rpt_func); - return(1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload11.C deleted file mode 100755 index cbced94..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload11.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -class foo_int -{ -public: - int & i; - - foo_int (int &j) : i(j) {}; - void inc () { i++; } - -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload2.C deleted file mode 100755 index 75068da..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload2.C +++ /dev/null @@ -1,43 +0,0 @@ -// GROUPS passed overloading -// Check that calls to the correct overloaded virtual -// functions are generated even where the type of the formal -// arguments for the overloadings are similar or related. - -extern "C" void printf (char *, ...); - -int proper_method_called = 0; - -struct base { - int member; - virtual void method (char) - { - } - virtual void method (char *) - { - } -}; - -struct derived : public base { - int member; - virtual void method (char) - { - } - virtual void method (char *) - { - proper_method_called++; - } -}; - -char *message; - -int main () -{ - derived derived_object; - - derived_object.method (message); - - if (proper_method_called != 1) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload3.C deleted file mode 100755 index baa90fb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload3.C +++ /dev/null @@ -1,27 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -typedef int rutBoolean; - -class rutBigIntRep -{ -public: - friend rutBoolean operator>(const rutBigIntRep& a, const rutBigIntRep& b); - operator rutBoolean() const; -protected: - enum Kluge {kluge}; - rutBigIntRep(Kluge) {} - rutBigIntRep(); - rutBigIntRep(const rutBigIntRep& value); - rutBigIntRep& operator=(const rutBigIntRep& value); -}; - -rutBoolean operator>(const rutBigIntRep& a, const rutBigIntRep& b) { - // This should not result in a warning. It used to warn about the - // conversion from int to enum while exploring the possibility of - // converting `a' via `operator rutBoolean', then using the - // rutBigIntRep(Kluge) constructor. It later realizes it shouldn't - // do this, but the call to build_type_conversion was ending up with - // a warning in convert. - rutBigIntRep diff(a); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload4.C deleted file mode 100755 index 21c3dc8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload4.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: -// GROUPS passed overloading - typedef void * (*NewObject) (void); - - class B - { - public: - static void WantsNew (NewObject creator); // ERROR - candidates are - }; - - class A - { - public: - static A * NewOne (void); - - static void InitClass (void) - { - B::WantsNew ( (NewObject) A::NewOne ); - // This used to die in convert_harshness_{ansi,old} cuz it - // didn't know what to do about a void type. - B::WantsNew ( A::NewOne );// ERROR - - } - }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload5.C deleted file mode 100755 index d71f0c0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload5.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -class Foo -{ -public: - int operator << (const signed char&); - int operator << (const unsigned char&); - int operator << (const short&); - int operator << (const unsigned short&); - int operator << (const long&); - int operator << (const unsigned long&); -}; - -int main () -{ - Foo fd; - - // We fixed convert_harshness_ansi so it considers the call to - // <<(const signed char&) to be a trivial conversion. It used - // to always make it a standard conversion, which made it conflict - // with <<(const unsigned char &), which is really a std conv. - fd << (signed char) 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload6.C deleted file mode 100755 index 84903c1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload6.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -struct temp_string { - temp_string (const unsigned char); -}; - -class String { - public: - String& operator = (temp_string); - String& operator = (const String&); -}; -class S { - public: - operator temp_string & () const; -}; - -S lbuf; - -static void e_r () -{ - String a; - a = lbuf; - return; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload7.C deleted file mode 100755 index ec2685c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload7.C +++ /dev/null @@ -1,41 +0,0 @@ -// GROUPS passed overloading -extern "C" void printf (char *, ...); - -struct NoName { - - int first; - int second; -}; - -class Casted { - - public: - - NoName x; - double y; - - Casted ( int _x , double _y ): y(_y) - { - x.first = _x; - x.second = _x*2; - } - - operator NoName() const { return x; } - operator double() const { return y; } -}; - -int main() -{ - Casted c(10,12.34); - - NoName x; - double y; - - x = c; - y = c; - - if (x.first == 10 && x.second == 20 && y == 12.34) - printf ("PASS\n"); - else - printf ("FAIL\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload8.C deleted file mode 100755 index 71d1689..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload8.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -typedef struct{double re,im;} complex; -class Complex{public:double re,im; - inline void operator=(Complex&X){re=X.re; im=X.im;};}; -void zxcvbnm(int n,...){n=1;} -int main(){complex c; Complex C; -zxcvbnm(1,c); -zxcvbnm(1,C);} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload9.C deleted file mode 100755 index 93a0cbf..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/overload9.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed overloading -class CLogger -{ -public: - void operator() (int,const char *) {}; // ERROR - candidates - void operator() (int,const char *, ...) {}; // ERROR - candidates -} Log; - -class CGLogger : public CLogger -{ -} GLog; - -int main() -{ - Log(1,"Test");// ERROR - call of.* - Log(1,"Test %d",3); - GLog(1,"Test");// ERROR - call of.* - GLog(1,"Test %d",3); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse1.C deleted file mode 100755 index 0c62c03..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed parsing -class Try { -private: - char s; -public: - // an escaped double-quote should not call consume_string inside - // reinit_parse_for_block - void mf() { s='\"'; } -}; - -int main() -{ - Try x; - x.mf(); -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse2.C deleted file mode 100755 index cd588e1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed parsing -class BitString { -public: - int i; -}; - - -typedef BitString BS; -typedef ::BitString cBS; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse3.C deleted file mode 100755 index 8be64a3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse3.C +++ /dev/null @@ -1,22 +0,0 @@ -// Build don't link: - -// these are marked as expected errors because they evidence an -// ambiguity in the grammar between expressions and declarations. -// when the parser's been cleaned up or rewritten, these two error -// markers can go away, since they'll no longer occur. - -class A -{ - public: - int high; - unsigned int low; - A operator+(const A in); -}; - -A A::operator+(const A in) -{ - if (high==0) - return A(); // this works - else - return (A()); // this works not // gets bogus error - XFAIL *-*-* -} // gets bogus error - XFAIL *-*-* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse4.C deleted file mode 100755 index 6526c60..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse4.C +++ /dev/null @@ -1,24 +0,0 @@ -// Build don't link: - -// this is marked as an expected error because it evidences an -// ambiguity in the grammar between expressions and declarations. -// when the parser's been cleaned up or rewritten, the error -// marker can go away, since it'll no longer occur. - -class B -{ -public: - B( int t ) {} - void f() {} -}; - -int g() { return 0; } // gets bogus error - referenced below XFAIL *-*-* - -int main() -{ - int try1; - B( try1 ).f(); // no syntax error - B b( g() ); // no syntax error - B( ::g() ).f(); // no syntax error - B( g() ).f(); // gets bogus error - treated as decl XFAIL *-*-* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse5.C deleted file mode 100755 index 81a5fe6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse5.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: - -// this is marked as an expected error because it evidences an -// ambiguity in the grammar between expressions and declarations. -// when the parser's been cleaned up or rewritten, the error -// marker can go away, since it'll no longer occur. - -class ptr8 - { -public: - ptr8(unsigned char *string,int len); - }; - -template <unsigned int S> -class buf - { -public: - buf(const ptr8& aRef); - }; - -int main() - { - unsigned char b[3]; - buf<3> b2(ptr8(&b[0],3)); // gets bogus error - XFAIL *-*-* - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse6.C deleted file mode 100755 index d5ece06..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/parse6.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: - -// this is marked as an expected error because it evidences an -// ambiguity in the grammar between expressions and declarations. -// when the parser's been cleaned up or rewritten, the error -// marker can go away, since it'll no longer occur. - -class A { }; - -int main() { - A a = a; - A b(b); // gets bogus error - XFAIL *-*-* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost1.C deleted file mode 100755 index e1b18bc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed prefix-postfix -class foo { -public: - operator ++ (); // ERROR - no type or storage class -}; - -int main() -{ - foo x; - - // This should fall back to calling operator++(), and be an error with - // the -pedantic flag. - x++;// ERROR - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost2.C deleted file mode 100755 index 1e34433..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed initialization -class foo { -public: - operator ++ (); // ERROR - no type or storage class - operator ++ (int); // ERROR - no type or storage class - operator ++ (char); // illegal// ERROR - .* - operator ++ (short); // illegal// ERROR - .* - operator ++ (long); // illegal// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost3.C deleted file mode 100755 index 4244e4f..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost3.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed prefix-postfix -class Y { -public: - friend Y operator++ (Y&); - friend Y operator++ (Y&, char); // illegal// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost4.C deleted file mode 100755 index ac31f91..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/prepost4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed prefix-postfix -class Y { -public: - friend Y operator++ (Y&); - - // This is legal---it's a good test to make sure that grokfndecl's - // checking of the arguments is sane. - friend Y operator++ (Y&, int); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy1.C deleted file mode 100755 index 3e3b2df..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy1.C +++ /dev/null @@ -1,23 +0,0 @@ -// Build don't link: -// GROUPS passed ptolemy-bugs -class Tcl_Interp; - -class PTcl { -public: - PTcl(Tcl_Interp* interp = 0); - ~PTcl(); - int alias(int argc,char** argv); -}; - -typedef int (PTcl::*InterpFuncP)(int,char**); - -struct InterpTableEntry { - char* name; - InterpFuncP func; -}; - - -static InterpTableEntry funcTable[] = { - { "alias" , &PTcl::alias } , - 0, 0 -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy2.C deleted file mode 100755 index 58a10dc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptolemy2.C +++ /dev/null @@ -1,69 +0,0 @@ -// GROUPS passed ptolemy-bugs -#include <iostream.h> - -class PTcl { -public: - int dispatcher(int which,int argc,char** argv); - // fns in the table - int one(int argc, char** argv); - int two(int argc, char** argv); - int three(int argc, char** argv); -}; - -// An InterpFuncP is a pointer to an PTcl function that takes an argc-argv -// argument list and returns TCL_OK or TCL_ERROR. - -typedef int (PTcl::*InterpFuncP)(int,char**); - -struct InterpTableEntry { - char* name; - InterpFuncP func; -}; - -// Here is the function table and dispatcher function. -// These macros define entries for the table - -#define quote(x) #x -#define ENTRY(verb) { quote(verb), &PTcl::verb } - -static InterpTableEntry funcTable[] = { - ENTRY(one), - ENTRY(two), - ENTRY(three), - {0, 0} -}; - -int PTcl::dispatcher(int which, int argc, char** argv) { - return (this->*(funcTable[which].func))(argc, argv); -} - -void printargs(char** argv) { -// while (*argv) { -// cout << " " << *argv++; -// } -// cout << "\n"; -} - -int PTcl::one(int, char** argv) { - cout << "FAIL\n"; - printargs(argv); - return 0; -} - -int PTcl::two(int, char** argv) { - cout << "PASS\n"; - printargs(argv); - return 0; -} - -int PTcl::three(int, char** argv) { - cout << "FAIL\n"; - printargs(argv); - return 0; -} - -int main (int argc, char** argv) { - PTcl obj; - obj.dispatcher(1,argc,argv); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem1.C deleted file mode 100755 index 49c9f75..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem1.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed pointers-to-members -class my_class -{ -public: - typedef void func_type (int num); - my_class (int num, func_type* proc); - void dispatch (void); -private: - int _num; - func_type *_proc; -}; - -my_class::my_class (int num, func_type* proc) : _num(num), _proc(proc) -{ -} - -void my_class::dispatch (void) -{ - _proc(_num); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem2.C deleted file mode 100755 index 2af19e0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem2.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: -// GROUPS passed pointers-to-members -struct C { - struct N { - int g1(int); - int g2(int); - }; - - typedef int (N::*pmfn)(int); - - int f1(int); - int f2(int); -}; - -int (C::*f)(int) = &C::f1; - -/* - The compiler should not crash on the line below; this change fixes it: - * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't - have TYPE_PTRMEMFUNC_P set before we try to build its - CLASSTYPE_ID_AS_LIST. -*/ - -C::pmfn h = &C::N::g1; - -int (C::N::*g)(int) = &C::N::g2; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem3.C deleted file mode 100755 index 0f6bf0b..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem3.C +++ /dev/null @@ -1,32 +0,0 @@ -// Build don't link: -// GROUPS passed pointers-to-members -template<class T> class TemplA { - T t; -}; - - -template<class T> class TemplB { -public: - typedef void (T::*TClassMethod)(); - -private: -/* - This line should not crash cuz of the get_decl_list change in this: - * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't - have TYPE_PTRMEMFUNC_P set before we try to build its - CLASSTYPE_ID_AS_LIST. - (get_decl_list): Likewise, when trying to read it. -*/ - TemplA<TClassMethod> Tmethod; -}; - - -class C { - int a; -}; - -int main(int, char**) { - - TemplB<C> test; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem4.C deleted file mode 100755 index a4f792e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/ptrmem4.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed pointers-to-members -class X { - private: - int i; - public: - X(int k) { i=k; } - int operator=(X &a) { return i = a.i; } - int operator=(int ii) { return i = ii; } -}; -int main(void) -{ - int (X::*op1_ptr)(X&); - op1_ptr = &X::operator=; // g++ gives error - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/recurse.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/recurse.C deleted file mode 100755 index 639dfb3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/recurse.C +++ /dev/null @@ -1,80 +0,0 @@ -// Build don't link: -// GROUPS passed recursive-aborts -// types -typedef unsigned int DBflag; // for storing user flag value -typedef unsigned long DBoffset; // 32-bit unsigned integer -typedef DBoffset DBsize; // type for storing sizes of objects -typedef unsigned char DBbyte; // 8-bit unsigned char - -class DBlink -{ -protected: - DBbyte link[4]; // hold link in portable MSB first format -public: - DBlink(DBoffset = 0, DBflag = 0); - DBlink &operator=(const DBlink &); - DBlink &operator=(DBoffset); - operator DBoffset(); - operator const DBbyte *() { return link; } - void set_flag() { link[0] |= 0x80; } - void reset_flag() { link[0] &= 0x7f; } - int test_flag() const { return (link[0] & 0x80) != 0; } -}; - -typedef DBlink DBsizerec; // hold data record size in portable format - -// constants -const DBoffset DB_NULL = 0; - -class DBlinkrec -{ -protected: - // offsets are stored with MSB in link[0] - DBlink l; // offset into link file of right child - MSB = red bit - DBlink r; // offset into link file of left child - MSB = delete - DBlink d; // offset into parallel data file - MSB = user flag -public: - DBlinkrec():l(DB_NULL), r(DB_NULL), d(DB_NULL) {} - void make_red() // set link to red - { l.set_flag(); } - void make_black() // set link to black - { l.reset_flag(); } - int is_red() const // indicates whether this is a red link - { return l.test_flag(); } - void set_discard() // set discard flag - { r.set_flag(); } - void reset_discard() // reset discard flag - { r.reset_flag(); } - int is_discarded() const // check discard flag - { return r.test_flag(); } - void set_flag() // set user flag - { d.set_flag(); } - void reset_flag() // reset user flag - { d.reset_flag(); } - int is_flag() const // check user flag - { return d.test_flag(); } - - friend class DataBase; -}; - -class DBpathrec : public DBlinkrec -{ - DBoffset offset; // offset of link record in LNK file -public: - DBpathrec():offset(DB_NULL) { } - DBpathrec(DBoffset off, const DBlinkrec &lr):offset(off), DBlinkrec(lr) {} - operator DBoffset() { return offset; } - DBpathrec &operator=(DBoffset off) { offset = off; return *this; } - DBpathrec &operator=(const DBpathrec &pr) - { offset = pr.offset; (DBlinkrec)*this = (DBlinkrec)pr; return *this; } - - friend class DataBase; -}; - -int main() -{ - DBpathrec a(), b(); - - a = b;// ERROR - non-lvalue in assignment.* -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl1.C deleted file mode 100755 index 39a432c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl1.C +++ /dev/null @@ -1,5 +0,0 @@ -// Build don't link: -// GROUPS passed redeclaration -inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// ERROR - .* -int min(int a, int b); -inline int min(int a, int b) {return (a < b)?a:b;}// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl2.C deleted file mode 100755 index 5894219..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl2.C +++ /dev/null @@ -1,51 +0,0 @@ -// GROUPS passed redeclaration -// Check that if multiple declarations of the same single -// function are present in different places in the same file, -// and if these declarations differ (as allowed) in the number -// of argument defaults provided, that correct values are -// passed at all call points anyway. - -extern "C" void printf (char *, ...); - -void receiver (int ii, int jj); - -void sender_1 () -{ - receiver (3,7); -} - -void receiver (int ii, int jj = 9); - -void sender_2 () -{ - receiver (5); -} - -int ii_sum = 0; -int jj_sum = 0; - -void sender_3 (); - -int main () -{ - sender_1 (); - sender_2 (); - sender_3 (); - if (ii_sum != 13 || jj_sum != 25) - printf ("FAIL\n"); - else - printf ("PASS\n"); - - return 0; -} - -void receiver (int ii, int jj) -{ - ii_sum += ii; - jj_sum += jj; -} - -void sender_3 () -{ - receiver (5); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl3.C deleted file mode 100755 index 5987e0e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/redecl3.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed redeclaration -class foo -{ -public: - int bar(int a); -}; - - -void bar(int &a); - -int foo::bar(int a) { - int a = 0; // Should this be an error ?// ERROR - declaration.* - - bar(a); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/reference1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/reference1.C deleted file mode 100755 index 84ad6f4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/reference1.C +++ /dev/null @@ -1,53 +0,0 @@ -// Special g++ Options: -w -// GROUPS passed references -// Check that if a reference is initialized to refer to a value -// which is returned from a function call, the actual call to -// the function is only invoked for the original initialization -// of the reference, and not for each subsequent use of the -// reference. -// -// This test fails with G++ 1.35.0- (pre-release). -// Reported 4/4/89 by Kim Smith - -extern "C" void printf (char *, ...); - -struct base { - mutable int data_member; - - base () {} - void function_member () const; -}; - -base base_object; - -base base_returning_function (); - -int call_count = 0; - -int main () -{ - const base& base_ref = base_returning_function (); - - base_ref.function_member (); - base_ref.function_member (); - base_ref.data_member = 99; - - if (call_count == 1) - printf ("PASS\n"); - else - printf ("FAIL\n"); - - return 0; -} - -base base_returning_function () -{ - base local_base_object; - - call_count++; - return local_base_object; -} - -void base::function_member () const -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/rtti1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/rtti1.C deleted file mode 100755 index 6dcdff3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/rtti1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed RTTI -#include <typeinfo> - -struct B { virtual ~B(){} }; -struct D0 : public virtual B { virtual ~D0(){} }; -struct D1 : public virtual D0 { virtual ~D1(){} }; -struct C : public virtual B, public D1 { virtual ~C() { } }; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope1.C deleted file mode 100755 index babbb01..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed scoping -int f (int i) { - if (i) - for (int j = i; j; j--) - ; - return j; // error: j should only be in scope inside the body of `for'// ERROR - .* -} // ERROR - non-void diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope2.C deleted file mode 100755 index fccd1d6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope2.C +++ /dev/null @@ -1,29 +0,0 @@ -// Build don't link: -// GROUPS passed scoping -class A -{ - public: - A() {} - ~A() {} - virtual void f() {} -}; - -class B : public A -{ - public: - B() {} - ~B() {} - virtual void f() {} -}; - - -B GLOBAL_B; - -B& foo() {return GLOBAL_B;} - -int main() -{ - // build_scoped_method_call and build_scoped_ref should know how - // to deal with a reference for this - foo().A::f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope3.C deleted file mode 100755 index cf78430..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope3.C +++ /dev/null @@ -1,25 +0,0 @@ -// Build don't link: -// GROUPS passed scoping -// This is fixed when NEW_CLASS_SCOPING is on. - -template<class T> -class ArrayG { -public: - ArrayG(); -protected: - const unsigned INITIAL; - T* array; -}; - -template<class T> -ArrayG<T>::ArrayG(): -array(new T[INITIAL]) -{ } - -struct X { - struct Correspondence { - int i; - }; - - void fill(ArrayG<Correspondence>& a); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope4.C deleted file mode 100755 index a6781ab..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope4.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: -// GROUPS passed scoping -class BitString { -public: - int i; - int length() const; -}; - -typedef BitString BS; - -class V { -public: - class BitString { - public: - static int x(const ::BitString& value); - static int y(const class ::BitString& value); // should be parsed ok - static int z(const BS& value); - }; -}; - -int -V::BitString::x(const ::BitString& value) -{ return value.length(); } - -int -V::BitString::y(const class ::BitString& value) // should be parsed ok -{ return value.length(); } - -int -V::BitString::z(const BS& value) -{ return value.length(); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope5.C deleted file mode 100755 index 7532369..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/scope5.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed scoping -class Integer { -public: - int i; -}; - -class Type { - enum Class { ENUM, INTEGER }; - - class Description { - public: - - }; - - class Integer: public Description { - public: - ::Integer low; - ::Integer high; - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/shadow1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/shadow1.C deleted file mode 100755 index 6a1d9d1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/shadow1.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed errors -void f( int a) { - int a; // this should be an error now// ERROR - .* - { - int a; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof1.C deleted file mode 100755 index c8242eb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof1.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed sizeof -// ARM $5.3.2 - -void f() { } - -int -main() -{ - // sizeof may not be applied to a function - int i = sizeof( f);// ERROR - .* - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof2.C deleted file mode 100755 index ddac679..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof2.C +++ /dev/null @@ -1,18 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed sizeof -// ARM $5.3.2 - -void f() { } - -struct foo { int bit : 1; }; - -int -main() -{ - // sizeof may not be applied to a bit-field - foo f; - int i = sizeof (f.bit);// ERROR - .* - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof3.C deleted file mode 100755 index e6972ca..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof3.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed sizeof -// ARM $5.3.2 - -class bar; - -int -main() -{ - // sizeof may not be applied to an undefined class - int k = sizeof (bar);// ERROR - .* - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof4.C deleted file mode 100755 index 62d76c0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof4.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -// GROUPS passed sizeof -// ARM $5.3.2 - -int -main() -{ - // sizeof may not be applied to the type void - int l = sizeof (void);// ERROR - .* - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof5.C deleted file mode 100755 index 0ef9d9c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sizeof5.C +++ /dev/null @@ -1,17 +0,0 @@ -// GROUPS passed sizeof -// ARM $5.3.2 - -extern "C" void printf (char *, ...); - -class foo {}; - -int -main () -{ - // The size of any class or class object is larger than zero. - int i = sizeof (foo); - if (i > 0) - printf ("PASS\n"); - else - printf ("FAIL\n"); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sorry1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/sorry1.C deleted file mode 100755 index caa9276..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/sorry1.C +++ /dev/null @@ -1,36 +0,0 @@ -// Build don't link: -// GROUPS passed old-sorry -class a { -public: - int* foo(); -}; - -a aa; -a* ap; - -class b { -public: - int ok(int* p =aa.foo()); - - // dump_init should know what to do with this NON_LVALUE_EXPR - int f(int* p =ap->foo()); -}; - - int -b::ok(int *p) -{ - return 0; -} - - int -b::f(int *p) -{ - return 0; -} - void -bar() -{ - b b; - b.ok(); - b.f(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/static1.C deleted file mode 100755 index b30c796..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static1.C +++ /dev/null @@ -1,4 +0,0 @@ -// Build don't link: -// GROUPS passed static -class A { public: int a; };// ERROR - .* -void foo7 () { A::a = 3; }// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/static2.C deleted file mode 100755 index 8fd5ffc..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static2.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed static -class A -{ - public: - void member(void) - { - } - - static void staticMember() - { - member (); // illegal, no object for calling non-static method// ERROR - .* - } -}; - -int main() -{ - A::staticMember(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/static3.C deleted file mode 100755 index 5c52f0e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/static3.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed static -class foo{ -public: - static void bar( int i ){ value = i; } - static int value;// ERROR - .* -}; - -const int foo::value = 0; // should be an error.// ERROR - .* - -int main(){ - foo::bar( 1 ); - return 0; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/synth1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/synth1.C deleted file mode 100755 index 5356796..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/synth1.C +++ /dev/null @@ -1,33 +0,0 @@ -// Build don't link: -// Special g++ Options: -pedantic-errors -g -Wall -// GROUPS passed synthetics -// excess errors test - XFAIL sparc64-*-elf -// Check to make sure that g++ doesn't get freaked out about the use -// of generated methods that it supposedly "can't see". - -class Char { -public: - Char(); - Char(char v); - - // synthetic copy-constructor and operator= -private: - char value; -}; - -class XChar: public Char { -public: - XChar(); - XChar(char v, int serial); - - void operator=(const XChar& other); -private: - int serial; -}; - -void -XChar::operator=(const XChar& other) -{ - Char::operator=(other); - // serial stays the same -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template1.C deleted file mode 100755 index e6609fd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template1.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed templates -// g++-2.2.1: member functions returning a template type - - -template <class T> struct list { }; - -struct A -{ - list<int> L; - - list<int> get_list(); - -}; - - -list<int> A::get_list() { return L; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template11.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template11.C deleted file mode 100755 index 4a953a3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template11.C +++ /dev/null @@ -1,47 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class Called> -class aCallback -{ -public: - aCallback(Called& obj, int (Called::*met)()); - - int callback(); - -protected: - -private: - // the object to call - Called& object; - - // the method to apply - int (Called::*method)(); - -}; - -template <class Called> -aCallback<Called>::aCallback(Called& obj, - int (Called::*met)()) : -object(obj), -method(met) -{}; - -template <class Called> -int aCallback<Called>::callback() -{ - return (object.*method)(); -} - -struct myStruct -{ - int action() {return 24;}; -}; - -int main() -{ - myStruct toto; - - aCallback<myStruct> cb(toto, &myStruct::action); - - return cb.callback(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template12.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template12.C deleted file mode 100755 index 2165ae2..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template12.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed templates -inline void foo (const int &x) {} - -template <class type> -inline void foo (const type &x) {x.eat_this_and_die();} - -int main (int argc, char **argv) {foo (argc);} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template13.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template13.C deleted file mode 100755 index 653ef21..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template13.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> -class ListS { -public: - class Vix { - public: - Vix(); - }; -}; - -template<class T> -ListS<T>::Vix::Vix() -{ } - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template15.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template15.C deleted file mode 100755 index b830505..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template15.C +++ /dev/null @@ -1,19 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> class Stack { - public: - Stack (int s = 10); //Comment out "= 10" and it will compile - ~Stack(void); //Omitting "void" doesn't help -}; - -template<class T> Stack<T>::~Stack(void) -{ } - -//If this definition comes before the one for ~Stack, the error message -//about redeclaration of `void Stack<int>::~Stack()' will not occur. -template<class T> Stack<T>::Stack(int s) -{ } - -int main () { - Stack<int> stk(10); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template16.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template16.C deleted file mode 100755 index ec13a24..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template16.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> class TList { - typedef void (T::*TVOIDFUNT)(); - typedef T* (T::*TTPFUNT)(T*); -}; - -class A; -class B : TList<A> { }; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template17.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template17.C deleted file mode 100755 index e6c2652..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template17.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed templates -struct Regex { int i; Regex(char *, int); }; -template<class KEY> -class NDAMName { -public: - static const Regex pattern; - static unsigned sequence_number; -}; - -const Regex NDAMName<'L'>::pattern("^[Ll](.*)$", 1);// ERROR - type/value.* -unsigned NDAMName<'L'>::sequence_number = 0;// ERROR - type/value diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template18.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template18.C deleted file mode 100755 index 5c6479c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template18.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> class X; -typedef X<int> IX; - -template<class T> -class X { -public: - T x; -}; - -struct A { - IX c; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template19.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template19.C deleted file mode 100755 index a8b33c1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template19.C +++ /dev/null @@ -1,26 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -class Base -{ -public: - Base() { } -}; - -template <class memberType, class keyType> -class Middle : public Base<memberType> -{ -public: - Middle (keyType const & (*ko) (memberType const &)) - { - } -}; - -// EXCHANGE the following lines for this code to work. -//template <class memberType, class keyType> class Middle; -template <class T, class keyType> class Middle; - -struct Test : public Middle <int, int> -{ - Test(); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template2.C deleted file mode 100755 index ca60fa7..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template2.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class Q> -class Conc { -public: - static int body(); -}; - -template <class Q> -int Conc<Q>::body() {return 0;} - -int main () { - Conc<int> s2; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template20.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template20.C deleted file mode 100755 index da26f9a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template20.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class A, class B> class Map; - -class Foo -{ -public: - static Map<int,int> bar; -}; - -template <class A, class B> -class Map -{ -public : - int find(); -}; - -int main() -{ - int z = Foo::bar.find(); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template21.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template21.C deleted file mode 100755 index 9d61391..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template21.C +++ /dev/null @@ -1,43 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> -class L { -public: - L(); - - T x[30]; - int doit(int i) const; -}; - -#ifdef BUG -template<class T> -int -L<T>::doit(int i) const -{ - return x[i].z; -} -#endif - -class X { -public: - class Y { - public: - Y(); - Y(int); - - int z; - }; - - L<Y> ly; -}; - -#ifndef BUG -template<class T> -int -L<T>::doit(int i) const -{ - return x[i].z; -} -#endif - -static X x; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template22.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template22.C deleted file mode 100755 index 28c70b3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template22.C +++ /dev/null @@ -1,22 +0,0 @@ -// GROUPS passed templates -extern "C" int printf (const char *, ...); - -template <class T> -class Foo -{ -public: - void func (int const& i); -}; - -template <class T> -void Foo<T>:: -func (int const& i) -{} - - -int main () -{ - Foo<int const> foo; - printf ("PASS\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template23.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template23.C deleted file mode 100755 index f38d420..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template23.C +++ /dev/null @@ -1,34 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -class T_Base -{}; - -template <class T> -class T_Derived -: public T_Base<T> -{}; - - -class Base -{ -public: - Base (float name); -}; - -class Derived -: public Base -{ -private: - T_Base<int>* data_; // Fix (1): Change date_ from T_Base<int>* to T_Derived<int>* - -public: - Derived (float name); -}; - - -Derived:: -Derived (float name) -: Base(name), - data_(new T_Derived<int>()) -{} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template24.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template24.C deleted file mode 100755 index 34549a0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template24.C +++ /dev/null @@ -1,20 +0,0 @@ -// GROUPS passed templates -extern "C" void printf (char *, ...); - -template <class F> -class Temp -{ - F func_; -public: - Temp (F f) :func_(f) {} -}; - -int func (int h = 1, int z = 2) { return h+z; } - -int main () -{ - Temp<int(*)(int, int)> temp (func); - - printf ("PASS\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template25.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template25.C deleted file mode 100755 index 5939fed..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template25.C +++ /dev/null @@ -1,36 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class T> -class Temp_Base -{}; - -template <class T> -class Temp_Derived -: public Temp_Base<T> -{ -public: - Temp_Derived (int i = 10) {} -}; - - -class Base -{ - float r_; -public: - Base (float r) : r_(r) {} -}; - -class Derived -: public Base -{ -private: - Temp_Base<int>* boo_; -public: - Derived (float); -}; - -Derived:: -Derived (float form) -: Base(form), - boo_(new Temp_Derived<int>) -{} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template26.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template26.C deleted file mode 100755 index 6dc1555..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template26.C +++ /dev/null @@ -1,31 +0,0 @@ -// Build don't link: -// GROUPS passed templates -class V { - public: - V(); - V(int); - }; - -template <int I> class AA: public virtual V { - public: - AA(); - AA(int); - }; - -template <int I> class BB : public virtual V { - public: - BB(); - BB(int); - }; - -template <int I> AA<I>::AA() {}; -template <int I> AA<I>::AA(int i): V(i) {}; -template <int I> BB<I>::BB() {}; -template <int I> BB<I>::BB(int i) {}; - -class CC : public AA<1>, public BB<2> { - public: - CC(); - CC(int); - }; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template27.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template27.C deleted file mode 100755 index a2649d4..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template27.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed templates - template<class K, class V> class MapLS { }; - class String {}; - class X1 { }; - class RefProto { }; - template<class REP> class Ref { }; - - class MapLS<String, Ref<X1> >: public MapLS<String, RefProto> { - public: - ~MapLS(); - }; - - MapLS<String, Ref<X1> >::~MapLS() { } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template28.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template28.C deleted file mode 100755 index 48ae7fb..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template28.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed templates -class X { - const char *fptr; -public: - X(const char *ptr) { fptr = ptr; } - operator const char*() { return fptr; } -}; - -int main(){ - X x1("1234"); - X x2(x1+1); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template29.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template29.C deleted file mode 100755 index 2c427d9..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template29.C +++ /dev/null @@ -1,12 +0,0 @@ -// Build don't link: -// GROUPS passed templates - template <class ElementType> class A - { public: - A(ElementType) {} - ElementType get() const ; - }; - - template <class ElementType> ElementType A<ElementType>::get() const - { return ElementType(0); } - -int main() { const A<short> a(3); } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template3.C deleted file mode 100755 index 3900421..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template3.C +++ /dev/null @@ -1,49 +0,0 @@ -// GROUPS passed templates -extern "C" void printf (char *, ...); -extern "C" void exit (int); - -int count = 0; - -void -die (int x) -{ - if (x != ++count) - { - printf ("FAIL\n"); - exit (1); - } -} - -class A { - public: - void f() const { die (-1); } -}; - - -template <class Item> -class B : public A { - public: - void f() const; -}; - -template <class Item> -inline void B<Item>::f() const { die (1); } - -template <class Item> -class C : public A { - public: - void f() const { die (2); } -}; - - -int main() -{ - B<int> b; - C<int> c; - - b.f(); //- bugged, (A::f() called instead of B::f()) - c.f(); //- works fine (C::f() called) - - printf ("PASS\n"); - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template30.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template30.C deleted file mode 100755 index 97357d6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template30.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed templates - - template<class K, class V> class MapLS { }; - class String {}; - class X1 { }; - class RefProto { }; - template<class REP> class Ref { }; - - class MapLS<String, Ref<X1> >: public MapLS<String, RefProto> { - public: - ~MapLS(); - }; - - MapLS<String, Ref<X1> >::~MapLS() { } - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template31.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template31.C deleted file mode 100755 index 3a1b149..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template31.C +++ /dev/null @@ -1,38 +0,0 @@ -// Build don't link: -// GROUPS passed templates -// PRMS Id: 13218 - -struct C { - int x; - char y; - double z; -}; -C c02; - -template <int* ip> struct A { - int* p; - A() : p(ip) {} -}; - -template <C* cp> struct B { - C* p; - B() : p(cp) {} -}; - -int i00; - -int main(void) -{ - A<&i00> a00; - - extern int i01; - A<&i01> a01; - - B<&c02> b02; - - extern C c03; - B<&c03> b03; -} - -int i01; -C c03; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template4.C deleted file mode 100755 index 318cd2e..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template4.C +++ /dev/null @@ -1,11 +0,0 @@ -// Build don't link: -// GROUPS passed templates -// This used to be a circularity in chainon. -template <class ARG> struct TMPL { - typedef int ARG::*ARG_data_member_ptr; - typedef void (ARG::*ARG_func_member_ptr) (); -}; - -struct S { }; - -TMPL<S> object; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template5.C deleted file mode 100755 index 39b74d6..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template5.C +++ /dev/null @@ -1,48 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template<class T> -class Vector -{ -public: - Vector(int x); - ~Vector(); - T& operator [] (int i); - -private: - T* v; - int sz; -} ; - -template<class T> -Vector<T>::Vector(int x) -{ - sz = x; - v = new T (sz); -} ; - -template<class T> -Vector<T>::~Vector() - { delete [] v; } ; - -template<class T> -T & -Vector<T>::operator [] (int i) - { return v[i]; } ; - -int -main(int, char **) -{ - Vector<int> intvec(3); - - intvec[0] = 1; - intvec[1] = 2; - intvec[2] = 3; - - for (int i = 0; i < 3; i++) - intvec[i]; - - return 0; -} - - - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template6.C deleted file mode 100755 index 96459ca..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template6.C +++ /dev/null @@ -1,30 +0,0 @@ -// Build don't link: -// GROUPS passed templates -struct B { -}; - -struct X : B { - ~X (); -}; - -struct Request { - X s; -}; - -template <class ET> class TC { - ET data; -}; - -struct TMem { - - ~TMem() {} - - TC<Request> *req; -}; - -struct FIO { - - void init (); - - FIO () { init(); } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template7.C deleted file mode 100755 index 59dc483..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template7.C +++ /dev/null @@ -1,48 +0,0 @@ -// Build don't link: -// GROUPS passed templates -template <class ET> -class ChainElem { -public: - - ET data; -}; - -template <class ET> -class Chain { -public: - - ChainElem<ET> *first; - - virtual ~Chain() {} - -}; - -struct B { -}; - -struct X : B { - ~X (); -}; - -struct TBNFexpression { -}; - -struct TCaseLabelPair { -}; - -struct TVariant { - Chain<TCaseLabelPair> CaseLabelList; -}; - -struct TCaseConstruct { - Chain<TBNFexpression> TagFieldPrefixes; - Chain<TVariant> Variants; -}; - -struct Production { - X TypeName; -}; - -struct SimpleSyntax { - Chain<Production> Productions; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template8.C deleted file mode 100755 index 80adbe1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template8.C +++ /dev/null @@ -1,20 +0,0 @@ -// Build don't link: -// GROUPS passed templates -#include <stdio.h> - -// make sure we accept unions for templates -template<int n> -union Double_alignt{ - double for_alignt; - char array[n]; - -}; - -int main(){ - - - Double_alignt<20000> heap; - - printf(" &heap.array[0] = %d, &heap.for_alignt = %d\n", &heap.array[0], &heap.for_alignt); - -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/template9.C deleted file mode 100755 index c4c9c83..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/template9.C +++ /dev/null @@ -1,20 +0,0 @@ -// GROUPS passed templates -// Test that the compiler will emit the definition of min given just -// the declaration. At one point in the past, it did not. -// Special g++ Options: -fguiding-decls -#include <iostream.h> - -template <class T> inline T min(T a, T b) { return (a < b) ? a : b;}; - -double min(double,double); // this should expand the template - -main () { - int a = 1, b = 2; - double aa = 2.0, bb = 1.2; - cout << min(a,b) << ", " << min(aa,bb) << "\n"; - if (min (a, aa) == a) - cout << "PASS" << endl; - else - cout << "FAIL" << endl; -} - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/temporary1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/temporary1.C deleted file mode 100755 index 8c6d4c3..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/temporary1.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed temporaries -#include <stdio.h> - -int main () -{ - int a = 2; - - if (----a == 0) - printf ("a = 0\n"); - - printf ("a = %d\n", a); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/typedef1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/typedef1.C deleted file mode 100755 index 2f7aa87..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/typedef1.C +++ /dev/null @@ -1,29 +0,0 @@ -// Build don't link: - -class baseClassA -{ -public: -private: - class internalClassA - { - public: - private: - typedef int privateType; - - privateType memberA; - }; -}; - -class baseClassB -{ -public: -private: - class internalClassA - { - public: - private: - typedef unsigned int privateType; - - privateType memberB; - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/union1.C deleted file mode 100755 index 7a4df26..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union1.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed unions -// This is fixed by finish_anon_union doing a string_cst_equal check on -// the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes. - unsigned - hash(const double d) - { - static union { - unsigned asint[2]; - double asdouble; - }; - asdouble = d; - return asint[0] ^ asint[1]; - } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/union2.C deleted file mode 100755 index d913ae8..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union2.C +++ /dev/null @@ -1,13 +0,0 @@ -// Build don't link: -// GROUPS passed unions -class B; - -struct A { - A(B* x) : i(x) {} - A() : i(0) {} - - union { - B* i; - B* c; - }; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/union3.C deleted file mode 100755 index ad8b840..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/union3.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed unions -union alan { -int a; -char *b; -alan(); -}; - -alan mary; - -alan::alan() -{ - a=0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility1.C deleted file mode 100755 index 7d11f87..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility1.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -class foo { -protected: - int i; -}; - -class bar : public foo { -public: - friend void baz (foo *); -}; - -void baz (foo *f) -{ - f->i = 1; // error: i is protected// ERROR - .* -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility10.C deleted file mode 100755 index 4eb3cae..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility10.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -struct base -{ - protected: - void base_func() {}// ERROR - .*is protected.* -}; - -struct derived : public base -{ - protected: - void derived_func(base *ptr) { ptr->base_func(); }// ERROR - within this context -}; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility2.C deleted file mode 100755 index 09e0f65..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility2.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -class X { - void g (int); // ERROR - private -public: - void g (double); -}; - -class Y : public X { void f() { g (1); } }; // ERROR - private - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility3.C deleted file mode 100755 index 6e84da5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility3.C +++ /dev/null @@ -1,38 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -// Used to say: -// manip.cc:17: member `_f' is a private member of class `B<int>' -// manip.cc:17: member `_a' is a private member of class `B<int>' - -class A {}; - -template <class TP> -class B -{ - A &(*_f) (A &, TP); - TP _a; -public: - B (A &(*f) (A &, TP), TP a) : _f (f), _a (a) {} - friend A &operator<< <>(A &o, const B<TP> &m); -}; - -template <class TP> -inline A & -operator<< (A &o, const B<TP> &m) -{ - (*m._f) (o, m._a); - return o; -} - -A &setw (A &, int); -B<int> setw (int n) -{ - return B<int> (setw, n); -} - -A x; - -void f () -{ - x << setw (2); -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility4.C deleted file mode 100755 index 1e7aea1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility4.C +++ /dev/null @@ -1,14 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -template <class T> -class Feld { -public: - Feld(const Feld&) {} -}; - -class Polynom : private Feld<double> { - Polynom(); - friend Polynom f(const Polynom&); -}; - -Polynom f(const Polynom& p) { return p; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility5.C deleted file mode 100755 index a53881a..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility5.C +++ /dev/null @@ -1,8 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -template<int K> class B; -template<int K> class A {int n; friend class B<K>;}; -template<int K> class B {public: void method(A<K>) const;}; -template<int K> void B<K>::method(A<K> X) const {X.n=0;} -typedef B<2> B2; - diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility6.C deleted file mode 100755 index 5ca62c0..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility6.C +++ /dev/null @@ -1,17 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -class bottom -{ -public: - int b; -}; -class middle : private bottom -{ -public: - void foo () { b; } -}; -class top : public middle -{ -public: - void bar () { b; }// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility7.C deleted file mode 100755 index 670547d..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility7.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -class X -{ -public: - void fn ();// ERROR - .* -}; -class Y : private X -{}; - -class Unrelated -{ -public: - void foo () { Y y; y.fn (); }// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility8.C deleted file mode 100755 index a3bb856..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility8.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -// Make sure private inheritance affects the visibility of -// static members used in an inherited context. -class foo -{ -public: - static int y; -}; -class foo1 : private foo -{ }; -class foo2 : public foo1 -{ public: - void bar () { y; }// ERROR - .* -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility9.C deleted file mode 100755 index c259929..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/visibility9.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -class A { -public: - void aMethod(void) {};// ERROR - .* -}; - -class AA : A { }; - -class B { -public: - void thisMethod() { - AA ana; - ana.aMethod();// ERROR - .* - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/vtables1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/vtables1.C deleted file mode 100755 index 984ce18..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/vtables1.C +++ /dev/null @@ -1,42 +0,0 @@ -// GROUPS passed virtual-tables -// Check that virtual function tables are generated and used -// even for struct's/classes which have no explicit constructors. - -extern "C" void printf (char *, ...); - -int base_func_member_1_called = 0; -int derived_func_member_1_called = 0; - -struct base { - virtual void func_member_1 () - { - base_func_member_1_called++; - } -}; - -struct derived : public base { - virtual void func_member_1 () - { - derived_func_member_1_called++; - } - - virtual void func_member_2 () - { - } -}; - -base* bp1; -base* bp2; - -int main () -{ - bp1 = new base; - bp2 = new derived; - - bp1->func_member_1 (); - bp2->func_member_1 (); - - printf ("PASS\n"); - - return 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings1.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings1.C deleted file mode 100755 index 0296362..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings1.C +++ /dev/null @@ -1,6 +0,0 @@ -// Build don't link: -// GROUPS passed warnings -// there should be a warning about foo only defining private methods -class foo { - int bar(); -};// ERROR - .* diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings10.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings10.C deleted file mode 100755 index 78ddf77..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings10.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed warnings -void foo() -{ - int i; - if (1) { - for (int i = 0; i < 10; i++) - ; - } -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings2.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings2.C deleted file mode 100755 index 49971d5..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings2.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// GROUPS passed warnings -class K { -public: - void f() { - }; // there should be no warning about this semicolon -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings3.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings3.C deleted file mode 100755 index 14fe997..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings3.C +++ /dev/null @@ -1,16 +0,0 @@ -// Build don't link: -// Special g++ Options: -O2 -Wall -// GROUPS passed warnings -class A { -int i; -public: - void funcA(void) { - funcB(); - } - - // The compiler should not emit a warning about not being - // able to inline this function. - void funcB(void) { - i++; - } -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings4.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings4.C deleted file mode 100755 index d733522..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings4.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed warnings -int -main () -{ - register int x; - int * foo = &x; // in C++ it's perfectly legal to do this - - return 0; -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings5.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings5.C deleted file mode 100755 index 5a953fd..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings5.C +++ /dev/null @@ -1,10 +0,0 @@ -// Build don't link: -// GROUPS passed warnings -enum TypeKind { ATK, BTK } ; - -struct Type { - enum TypeKind kind : 8; - void setBTK(); -}; - -void Type::setBTK() { kind = BTK; } diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings6.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings6.C deleted file mode 100755 index 785c083..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings6.C +++ /dev/null @@ -1,9 +0,0 @@ -// Build don't link: -// Special g++ Options: -O2 -Wall -ansi -pedantic -// GROUPS passed warnings -// should not emit this warning about func: -// x.C:2: warning: invalid storage class for function `func' -// -template <class T> inline void func(T) -{ -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings7.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings7.C deleted file mode 100755 index 24e7a2c..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings7.C +++ /dev/null @@ -1,21 +0,0 @@ -// Build don't link: -// Special g++ Options: -O2 -Wall -// GROUPS passed warnings -template<class T> -class X { -public: - void kill(unsigned i) - { vec[i].~T(); } - T *vec; -}; - -class Y { }; - -void -x() -{ - X<int> x; - x.kill(0); - X<Y> y; - y.kill(0); -}; diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings8.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings8.C deleted file mode 100755 index 5599918..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings8.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wall -// GROUPS passed warnings -bool foo(unsigned char c) -{ - return (c & 17) != 0; -} diff --git a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings9.C b/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings9.C deleted file mode 100755 index c46f2a1..0000000 --- a/gcc_arm/testsuite/g++.old-deja/g++.brendan/warnings9.C +++ /dev/null @@ -1,7 +0,0 @@ -// Build don't link: -// Special g++ Options: -Wall -// GROUPS passed warnings -inline int foo() -{ - return 3; -} |