summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-01-06 01:47:28 -0800
committerYamaArashi <shadow962@live.com>2016-01-06 01:47:28 -0800
commitbe8b04496302184c6e8f04d6179f9c3afc50aeb6 (patch)
tree726e2468c0c07add773c0dbd86ab6386844259ae /gcc/testsuite/g++.old-deja/g++.bugs
initial commit
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/891229_02.C24
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/891230_01.C20
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900107_01.C37
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900119_01.C46
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900121_01.C16
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900121_02.C49
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900121_05.C30
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900127_01.C25
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900127_02.C46
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900205_02.C28
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900205_03.C48
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900205_04.C26
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900207_03.C49
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900208_02.C17
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900208_03.C18
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900208_04.C20
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900209_01.C20
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_01.C112
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_02.C112
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_03.C26
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_05.C37
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_06.C25
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_07.C19
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_08.C18
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_09.C32
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900210_10.C14
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900211_01.C16
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900211_02.C24
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900211_03.C14
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900211_04.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900212_01.C38
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900212_02.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900212_03.C33
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900213_01.C26
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900213_02.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900213_03.C28
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900214_01.C22
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900215_01.C39
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900215_02.C47
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900220_01.C36
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900220_02.C30
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900220_03.C51
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900221_01.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900227_01.C38
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900321_01.C29
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900321_02.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900321_04.C16
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900321_05.C20
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900322_01.C61
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900324_02.C18
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900324_03.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900324_04.C25
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900324_05.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900324_06.C28
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900325_01.C17
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900330_01.C52
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900330_02.C29
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900331_02.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900331_03.C31
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900331_04.C32
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900401_01.C15
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900402_01.C15
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900402_02.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900403_01.C19
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900403_04.C12
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_01.C15
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_02.C24
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_03.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_04.C17
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_07.C17
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900405_01.C19
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900406_01.C19
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900406_02.C25
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900407_01.C36
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900407_02.C32
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900428_01.C51
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900428_02.C27
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900428_03.C44
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900511_01.C42
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900511_02.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900511_03.C19
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900514_03.C112
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_01.C16
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_02.C32
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_03.C47
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_04.C21
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_05.C18
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_06.C22
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_07.C16
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_09.C29
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_12.C11
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900519_13.C35
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_02.C26
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_03.C49
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_04.C40
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_05.C23
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_06.C78
97 files changed, 2998 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/891229_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/891229_02.C
new file mode 100755
index 0000000..042096c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/891229_02.C
@@ -0,0 +1,24 @@
+// g++ 1.36.1 bug 891229_02
+
+// g++ limits the scope of names which are declared as typedef names within
+// another type to that other type.
+
+// This conflicts with the (global) scope given to such names by cfront 2.0.
+
+// Cfront 2.0 passes this test.
+
+// Note 2/15/94: The standard has changed; this limiting of scope is correct
+// behavior. See 9.9. --jason
+
+// keywords: typedef, nested types, scope
+
+struct foo {
+ foo ();
+ typedef void (*function_p) (void);
+};
+
+function_p fp; // ERROR - no such type in scope
+
+foo::foo () {}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/891230_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/891230_01.C
new file mode 100755
index 0000000..ac49e0b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/891230_01.C
@@ -0,0 +1,20 @@
+// g++ 1.36.1 bug 891230_01
+
+// g++ gives typedefs which are nested within class declarations a scope
+// which is local to the class declaration itself. This causes examples
+// like the following to get compile-time errors.
+
+// Cfront 2.0 passes this test.
+
+// keywords: typedef, nested types, scope
+
+struct foo {
+
+ typedef foo* foo_p;
+ void member (foo_p);
+};
+
+void foo::member (foo_p p) { // gets bogus errors
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900107_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900107_01.C
new file mode 100755
index 0000000..7271f1a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900107_01.C
@@ -0,0 +1,37 @@
+// g++ 1.36.1 bug 900107_01
+
+// Unlike GCC and Cfront 2.0, the g++ 1.36.1 compiler gives struct, union,
+// and class declarations which are nested within blocks file scope.
+
+// Cfront 2.0 passes this test.
+
+// keywords: block scope, file scope, nested types, tagged types
+
+class c1 { int c1_member1; };
+struct s1 { int s1_member1; };
+union u1 { int u1_member1; };
+enum e1 { e1_val1 };
+typedef int t1;
+
+void foo ()
+{
+ class c1 { // gets bogus error
+ int c1_member1;
+ } c1_local_object_0;
+
+ struct s1 { // gets bogus error
+ int s1_member1;
+ } s1_local_object_0;
+
+ union u1 { // gets bogus error
+ int u1_member1;
+ } u1_local_object_0;
+
+ enum e1 { // OK using g++ or GCC, but mishandled by Cfront 2.0.
+ e1_value1
+ } e1_local_object_0;
+
+ typedef int t1; // OK
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
new file mode 100755
index 0000000..3c93c52
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
@@ -0,0 +1,46 @@
+// g++ 1.36.1 bug 900119_01
+
+// g++ allows initializers to be included in the declaration of members
+// of classes, structs, unions (even when -pedantic is used).
+
+// This is not allowed by the C++ 2.0 Reference Manual or by Cfront 2.0.
+
+// keywords: member declaration, member initialization
+
+int global_int;
+
+class class0 {
+public:
+ int class0_member_0 = 99; /* ERROR - */
+ static int class0_member_1 = 99; /* ERROR - */
+ int &class0_member_2 = global_int; /* ERROR - */
+
+ class0 () : class0_member_2 (global_int) { } /* ERROR - */
+};
+
+
+struct struct0 {
+ int struct0_member_0 = 99; /* ERROR - */
+ static int struct0_member_1 = 99; /* ERROR - */
+ int &struct0_member_2 = global_int; /* ERROR - */
+
+ struct0 () : struct0_member_2 (global_int) { } /* ERROR - */
+};
+
+// g++ does not allow unions to have more than one member with an initializer
+
+union union0 {
+ int union0_member_0 = 99; /* ERROR - */
+};
+
+union union1 {
+ //static int union1_member_0 = 99; /* definitely illegal (9.5) */
+};
+
+union union2 {
+ int &union2_member_0 = global_int; /* ERROR - */
+
+ union2 () : union2_member_0 (global_int) { } /* ERROR - */
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900121_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900121_01.C
new file mode 100755
index 0000000..99ab8f6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900121_01.C
@@ -0,0 +1,16 @@
+// g++ 1.36.1 bug 900121_01
+
+// The following file causes g++ 1.36.1 (and 1.36.2) to abort.
+
+// Cfront 2.0 passes this test.
+
+// keywords: abort, incomplete types, reference types, formal parameters
+
+struct s0;
+
+void function (struct s0 &arg1, struct s0 &arg2)
+{
+ arg1 = arg2; // ERROR - causes abort
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900121_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900121_02.C
new file mode 100755
index 0000000..c90dfd9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900121_02.C
@@ -0,0 +1,49 @@
+// g++ 1.36.1 bug 900121_02
+
+// Assignment of structs is defined as memberwise assignment,
+// however g++ (1.36.2) and Cfront 2.0 differ on the definition
+// of assignment for unions.
+
+// (NOTE: Stroustrup now says that assignment of unions which contain either
+// members or sub-members (base classes are not allowed for unions) which
+// have non-default assignment operators defined for them will be illegal
+// in future.)
+
+// g++ (1.36.2) on the other hand, accepts this program without errors.
+
+// keywords: unions, operator=, inheritance, members
+
+struct s0 {
+
+ int i;
+
+ void operator= (s0 & arg)
+ {
+ this->i = arg.i;
+ }
+};
+
+struct s1 {
+
+ double d;
+
+ void operator= (s1 & arg)
+ {
+ this->d = arg.d;
+ }
+};
+
+union u0 {
+ s0 u0_member_0; // ERROR -
+ s1 u0_member_1; // ERROR -
+};
+
+void function ()
+{
+ u0 u0_object_0;
+ u0 u0_object_1;
+
+ u0_object_0 = u0_object_1;
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900121_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900121_05.C
new file mode 100755
index 0000000..03155ab
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900121_05.C
@@ -0,0 +1,30 @@
+// g++ 1.36.1 bug 900121_05
+
+// g++ allows unions to have base types (i.e. to be "derived") and it allows
+// other types to have unions as base types. Both cases are illegal.
+
+// g++ curently does not detect such errors.
+
+// Cfront 2.0 passes this test.
+
+// keywords: unions, inheritance
+
+struct s0 {
+ int s0_member;
+};
+
+union u0 : public s0 { /* ERROR - union has base class */
+ int u0_member_0;
+ int u0_member_1;
+};
+
+union u1 {
+ int u1_member_0;
+ int u1_member_1;
+};
+
+struct s1 : public u1 { /* ERROR - base class is a union */
+ int s1_member_0;
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C
new file mode 100755
index 0000000..7c24d08
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C
@@ -0,0 +1,25 @@
+// g++ 1.36.1 bug 900127_01
+
+// g++ often fails to detect (and issue errors for) ambiguous overload
+// situations. In such cases, one of the possibilities is chosen
+// (apparently arbitrarily). Errors should be issued instead.
+
+// Cfront 2.0 passes this test.
+
+// keywords: function overloading, ambiguity
+
+void foo (int);
+int foo (void);
+
+typedef int (*f_ptr_t1) (void);
+typedef void (*f_ptr_t2) (int);
+
+void bar (f_ptr_t1); // ERROR -
+void bar (f_ptr_t2); // ERROR -
+
+void function ()
+{
+ bar (foo); // ERROR - ambiguous
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C
new file mode 100755
index 0000000..61cd481
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C
@@ -0,0 +1,46 @@
+// g++ 1.36.1 bug 900127_02
+
+// g++ (mostly) keeps separate name spaces for the declarations of data
+// objects and functions.
+
+// This means that a single name may be declared as both a data object and
+// a function within a given scope.
+
+// This fact allows programmers to write code which is not portable to the
+// Cfront translator (which keeps a single namespace for these entities).
+
+// This can also lead to ambiguity when the & (address-of) operator is used.
+
+// Cfront 2.0 passes this test.
+
+// keywords: name spaces, overloading
+
+int global0; // ERROR -
+int global0 (); // ERROR -
+
+int global1 (); // ERROR - xref for below
+int global1; // ERROR - caught
+
+struct struct_0 {
+ int class_local (); // ERROR -
+ int class_local; // ERROR -
+};
+
+struct struct_1 {
+ int class_local; // ERROR -
+ int class_local (); // ERROR -
+};
+
+void function_0 ()
+{
+ int function_0_local; // ERROR -
+ extern int function_0_local (); // ERROR -
+}
+
+void function_1 ()
+{
+ int function_1_local (); // ERROR -
+ extern int function_1_local; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_02.C
new file mode 100755
index 0000000..505792f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_02.C
@@ -0,0 +1,28 @@
+// g++ 1.36.1 bug 900205_02
+
+// g++ allows constructors to be defined which do not include
+// initializations for reference members of their associated classes.
+
+// Cfront 2.0 does not allow this.
+
+// keywords: reference members, constructors, member initialization
+
+int i;
+
+class c0 {
+ int &int_ref;
+public:
+ c0 () /* : int_ref(i) */ { // ERROR - reference needs initializer
+ }
+};
+
+class c1 {
+ int &int_ref;
+public:
+ c1 ();
+};
+
+c1::c1() /* : int_ref(i) */ { // ERROR - reference needs initializer
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C
new file mode 100755
index 0000000..4c352c8
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C
@@ -0,0 +1,48 @@
+// g++ 1.36.1 bug 900205_03
+
+// Section 6.6.3 of the cfront 2.0 Reference Manual says "A return statement
+// without an expression can be used only in functions that do not return
+// a value, that is, a function with the return value type void..."
+
+// Also in 6.6.3: "Flowing off the end of a function is equivalent to a
+// return with no value; this is illegal in a value returning function."
+
+// In contrast to the manual, g++ does not generate ERRORs for cases of
+// "flowing off the end" of non-void functions.
+
+// keywords: return statements, return type, void return, implicit return
+
+// Special g++ Options: -Wreturn-type -pedantic-errors
+
+struct struct00 { };
+
+int global_function_0 () {
+} // ERROR -
+
+struct00 global_function_1 () {
+} // ERROR -
+
+struct struct0 {
+
+ int struct0_member_function_0 () {
+ } // ERROR -
+
+ struct0 struct0_member_function_1 () {
+ } // ERROR -
+};
+
+struct struct1 {
+
+ int struct1_member_function_0 ();
+
+ struct1 struct1_member_function_1 ();
+
+};
+
+int struct1_member_function_0 () {
+} // ERROR -
+
+struct1 struct1::struct1_member_function_1 () {
+} // ERROR -
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C
new file mode 100755
index 0000000..f763480
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C
@@ -0,0 +1,26 @@
+// g++ 1.36.1 bug 900205_04
+
+// g++ allows a class for which an implicit default X::X() constructor must
+// be created (implicitly by the compiler) to be derived from another class
+// which does not have its own default X::X() constructor. This is illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: default constructor, inheritance
+
+struct struct0 {
+ int data_member;
+
+ struct0 (int, void *); // suppresses implicit default constructor
+};
+
+struct0::struct0 (int, void *)
+{
+}
+
+struct struct0_derived_struct_0 : public struct0 {
+}; // ERROR -
+
+// struct0_derived_struct_0 object; // would give g++ error if compiled
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900207_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900207_03.C
new file mode 100755
index 0000000..187c070
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900207_03.C
@@ -0,0 +1,49 @@
+// g++ 1.36.1 bug 900207_03
+
+// g++ fails to allow objects of class or struct types to be initialized
+// using "constructor syntax" in cases where an implicitly generated copy
+// constructor would be invoked for the initialization, and where there is
+// no explicitly specified constructor associated with the type of the
+// object being initialized.
+
+// Note that the type of the error changes depending upon whether or not the
+// type being initialized has any virtual functions associated with it.
+
+// Cfront 2.0 passes this test.
+
+// keywords: implicit copy constructor, initialization
+
+
+// Check construction for a type without virtual function members.
+
+struct struct0 {
+ int data_member;
+};
+
+struct0 struct0_gbl_object0;
+struct0 struct0_gbl_object1 (struct0_gbl_object0); // gets bogus error
+
+void struct0_test ()
+{
+ struct0 struct0_lcl_object1 (struct0_gbl_object0); // gets bogus error
+}
+
+// Check construction for a type with virtual function members.
+
+struct struct1 {
+ int data_member;
+
+ virtual void function_member ();
+};
+
+void struct1::function_member () { }
+
+struct1 struct1_gbl_object0;
+struct1 struct1_gbl_object1 (struct1_gbl_object0); // gets bogus error
+
+void struct1_test ()
+{
+ struct1 struct1_lcl_object1 (struct1_gbl_object0); // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900208_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900208_02.C
new file mode 100755
index 0000000..7e99abd
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900208_02.C
@@ -0,0 +1,17 @@
+// g++ 1.36.1 bug 900208_02
+
+// g++ does not allow a static member of a class/struct/union to be
+// declared as an array without an explicit upper bound.
+
+// Cfront 2.0 passes this test.
+
+// keywords: static data members, arrays, dimension, array bound
+
+class class0 {
+public:
+ static int class0_data_member_0[]; // gets bogus error
+};
+
+int class0::class0_data_member_0[3] = { 1, 2, 3 }; // gets bogus error
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900208_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900208_03.C
new file mode 100755
index 0000000..667a174
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900208_03.C
@@ -0,0 +1,18 @@
+// g++ 1.36.1 bug 900208_03
+
+// The Cfront 2.0 reference manual (5.3.3) says "This type must be an
+// object type; functions cannot be allocated this way...".
+
+// g++ fails to detect (at compile time) cases where an attempt is made to
+// allocate a function using new.
+
+// keywords: operator new, function types
+
+typedef void (func_type) ();
+
+void global_function_0 ()
+{
+ new func_type; // ERROR - missed by both cfront 2.0 and g++ 1.36.1
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900208_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900208_04.C
new file mode 100755
index 0000000..bcf0397
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900208_04.C
@@ -0,0 +1,20 @@
+// g++ 1.36.1 bug 900208_04
+
+// The Cfront 2.0 reference manual (5.3.3) says "This type must be an
+// object type; functions cannot be allocated this way...".
+
+// g++ fails to detect (at compile time) cases where an attempt is made to
+// deallocate a function using delete.
+
+// Cfront 2.0 passes this test.
+
+// keywords: operator delete, function types
+
+typedef void (func_type) ();
+
+void global_function_1 (func_type *p)
+{
+ delete p; // ERROR - caught by Cfront 2.0 but not by g++ 1.36.1
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C
new file mode 100755
index 0000000..59871ab
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C
@@ -0,0 +1,20 @@
+// g++ 1.36.1 bug 900209_01
+
+// g++ implicitly casts values whose types are "void*" to other pointer
+// types (just as the language rules for C permit). Such implicit
+// conversions are not allowed by the Cfront 2.0 Reference Manual
+// however.
+
+// Cfront 2.0 passes this test.
+
+// keywords: void pointers, type conversions, pointer type conversions
+
+void * void_pointer_object;
+char * char_pointer_object;
+
+void global_function_0 ()
+{
+ char_pointer_object = void_pointer_object; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C
new file mode 100755
index 0000000..0a98388
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C
@@ -0,0 +1,112 @@
+// g++ 1.36.1 bug 900210_01
+
+// g++ allows pointer type values to be assigned to variables of integal
+// types. According to the C++ Reference Manual, this is illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: pointer types, integral types, implicit type conversions
+
+int i;
+long l;
+short s;
+char c;
+float f;
+double d;
+long double ld;
+enum {enum_value_0} e;
+
+signed int si;
+signed long sl;
+signed short ss;
+signed char sc;
+
+unsigned int ui;
+unsigned long ul;
+unsigned short us;
+unsigned char uc;
+
+void* vp;
+char* cp;
+int* ip;
+enum {enum_value_1} * ep;
+struct { int member; } * sp;
+void (*fp) (void);
+
+void global_function ()
+{
+ i = vp; /* ERROR - */
+ i = cp; /* ERROR - */
+ i = ip; /* ERROR - */
+ i = ep; /* ERROR - */
+ i = sp; /* ERROR - */
+ i = fp; /* ERROR - */
+ l = vp; /* ERROR - */
+ l = cp; /* ERROR - */
+ l = ip; /* ERROR - */
+ l = ep; /* ERROR - */
+ l = sp; /* ERROR - */
+ l = fp; /* ERROR - */
+ s = vp; /* ERROR - */
+ s = cp; /* ERROR - */
+ s = ip; /* ERROR - */
+ s = ep; /* ERROR - */
+ s = sp; /* ERROR - */
+ s = fp; /* ERROR - */
+ c = vp; /* ERROR - */
+ c = cp; /* ERROR - */
+ c = ip; /* ERROR - */
+ c = ep; /* ERROR - */
+ c = sp; /* ERROR - */
+ c = fp; /* ERROR - */
+ si = vp; /* ERROR - */
+ si = cp; /* ERROR - */
+ si = ip; /* ERROR - */
+ si = ep; /* ERROR - */
+ si = sp; /* ERROR - */
+ si = fp; /* ERROR - */
+ sl = vp; /* ERROR - */
+ sl = cp; /* ERROR - */
+ sl = ip; /* ERROR - */
+ sl = ep; /* ERROR - */
+ sl = sp; /* ERROR - */
+ sl = fp; /* ERROR - */
+ ss = vp; /* ERROR - */
+ ss = cp; /* ERROR - */
+ ss = ip; /* ERROR - */
+ ss = ep; /* ERROR - */
+ ss = sp; /* ERROR - */
+ ss = fp; /* ERROR - */
+ sc = vp; /* ERROR - */
+ sc = cp; /* ERROR - */
+ sc = ip; /* ERROR - */
+ sc = ep; /* ERROR - */
+ sc = sp; /* ERROR - */
+ sc = fp; /* ERROR - */
+ ui = vp; /* ERROR - */
+ ui = cp; /* ERROR - */
+ ui = ip; /* ERROR - */
+ ui = ep; /* ERROR - */
+ ui = sp; /* ERROR - */
+ ui = fp; /* ERROR - */
+ ul = vp; /* ERROR - */
+ ul = cp; /* ERROR - */
+ ul = ip; /* ERROR - */
+ ul = ep; /* ERROR - */
+ ul = sp; /* ERROR - */
+ ul = fp; /* ERROR - */
+ us = vp; /* ERROR - */
+ us = cp; /* ERROR - */
+ us = ip; /* ERROR - */
+ us = ep; /* ERROR - */
+ us = sp; /* ERROR - */
+ us = fp; /* ERROR - */
+ uc = vp; /* ERROR - */
+ uc = cp; /* ERROR - */
+ uc = ip; /* ERROR - */
+ uc = ep; /* ERROR - */
+ uc = sp; /* ERROR - */
+ uc = fp; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C
new file mode 100755
index 0000000..f900a86
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C
@@ -0,0 +1,112 @@
+// g++ 1.36.1 bug 900210_02
+
+// g++ allows integral type values to be assigned to variables of pointer
+// types. According to the C++ Reference Manual, this is illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: integral types, pointer types, implicit type conversions
+// Special Options: -ansi -pedantic-errors
+int i;
+long l;
+short s;
+char c;
+float f;
+double d;
+long double ld;
+enum {enum_value_0} e;
+
+signed int si;
+signed long sl;
+signed short ss;
+signed char sc;
+
+unsigned int ui;
+unsigned long ul;
+unsigned short us;
+unsigned char uc;
+
+void* vp;
+char* cp;
+int* ip;
+enum {enum_value_1} * ep;
+struct { int member; } * sp;
+void (*fp) (void);
+
+void global_function ()
+{
+ vp = i; /* ERROR - */
+ vp = l; /* ERROR - */
+ vp = s; /* ERROR - */
+ vp = c; /* ERROR - */
+ vp = si; /* ERROR - */
+ vp = sl; /* ERROR - */
+ vp = ss; /* ERROR - */
+ vp = sc; /* ERROR - */
+ vp = ui; /* ERROR - */
+ vp = ul; /* ERROR - */
+ vp = us; /* ERROR - */
+ vp = uc; /* ERROR - */
+ cp = i; /* ERROR - */
+ cp = l; /* ERROR - */
+ cp = s; /* ERROR - */
+ cp = c; /* ERROR - */
+ cp = si; /* ERROR - */
+ cp = sl; /* ERROR - */
+ cp = ss; /* ERROR - */
+ cp = sc; /* ERROR - */
+ cp = ui; /* ERROR - */
+ cp = ul; /* ERROR - */
+ cp = us; /* ERROR - */
+ cp = uc; /* ERROR - */
+ ip = i; /* ERROR - */
+ ip = l; /* ERROR - */
+ ip = s; /* ERROR - */
+ ip = c; /* ERROR - */
+ ip = si; /* ERROR - */
+ ip = sl; /* ERROR - */
+ ip = ss; /* ERROR - */
+ ip = sc; /* ERROR - */
+ ip = ui; /* ERROR - */
+ ip = ul; /* ERROR - */
+ ip = us; /* ERROR - */
+ ip = uc; /* ERROR - */
+ ep = i; /* ERROR - */
+ ep = l; /* ERROR - */
+ ep = s; /* ERROR - */
+ ep = c; /* ERROR - */
+ ep = si; /* ERROR - */
+ ep = sl; /* ERROR - */
+ ep = ss; /* ERROR - */
+ ep = sc; /* ERROR - */
+ ep = ui; /* ERROR - */
+ ep = ul; /* ERROR - */
+ ep = us; /* ERROR - */
+ ep = uc; /* ERROR - */
+ sp = i; /* ERROR - */
+ sp = l; /* ERROR - */
+ sp = s; /* ERROR - */
+ sp = c; /* ERROR - */
+ sp = si; /* ERROR - */
+ sp = sl; /* ERROR - */
+ sp = ss; /* ERROR - */
+ sp = sc; /* ERROR - */
+ sp = ui; /* ERROR - */
+ sp = ul; /* ERROR - */
+ sp = us; /* ERROR - */
+ sp = uc; /* ERROR - */
+ fp = i; /* ERROR - */
+ fp = l; /* ERROR - */
+ fp = s; /* ERROR - */
+ fp = c; /* ERROR - */
+ fp = si; /* ERROR - */
+ fp = sl; /* ERROR - */
+ fp = ss; /* ERROR - */
+ fp = sc; /* ERROR - */
+ fp = ui; /* ERROR - */
+ fp = ul; /* ERROR - */
+ fp = us; /* ERROR - */
+ fp = uc; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_03.C
new file mode 100755
index 0000000..8711d86
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_03.C
@@ -0,0 +1,26 @@
+// g++ 1.36.1 bug 900210_03
+
+// g++ allows void* type values to be assigned to variables of other
+// pointer types. According to the C++ Reference Manual, this is illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: void pointers, pointer type conversions, implicit type conversions
+
+void* vp;
+char* cp;
+int* ip;
+enum {enum_value_1} * ep;
+struct { int member; } * sp;
+void (*fp) (void);
+
+void global_function ()
+{
+ cp = vp; /* ERROR - */
+ ip = vp; /* ERROR - */
+ ep = vp; /* ERROR - */
+ sp = vp; /* ERROR - */
+ fp = vp; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C
new file mode 100755
index 0000000..fc0ead9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C
@@ -0,0 +1,37 @@
+// g++ 1.36.1 bug 900210_05
+
+// Section 18.3 of the 2.0 Reference Manual says "An implementation
+// providing { anachronistic features } should also provide a way for
+// the user to ensure that they do not occur in a source file."
+
+// The *only* proper way to "ensure" an absence of anachronstic features
+// is for C++ language processors to generate errors (rather than just
+// warnings) when such features are used. These errors could perhaps be
+// triggered by some set of command line options, or by the absence of
+// certain command line options. (For g++, the -pedantic and -traditional
+// options come to mind.)
+
+// The use of errors rather than warnings is important because errors
+// usually result in non-zero exit status codes for language processors
+// and these non-zero exit stati can be automatically checked during
+// normal execution of a Makefile.
+
+// cfront 2.0 provides the +p option which causes errors to be generated for
+// all cases of anachronistic usage.
+
+// g++ generates neither errors nor warnings for such usage, even when the
+// -ansi and -pedantic options are used.
+
+// Cfront 2.0 passes this test.
+
+// keywords: anachronism, enum types, integral types, implicit type conversions
+
+enum enum0 { enum_value_0 } enum0_object;
+int int0_object;
+
+void function ()
+{
+ enum0_object = int0_object; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_06.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_06.C
new file mode 100755
index 0000000..d52f511
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_06.C
@@ -0,0 +1,25 @@
+// g++ 1.36.1 bug 900210_06
+
+// g++ allows values of pointer-to-const types to be assigned to variables
+// of pointer-to-non-const types.
+
+// Cfront 2.0 disallows such assignments.
+
+// g++ also allows values of pointer-to-volatile types to be assigned to
+// variables of pointer-to-non-volatile types.
+
+// Cfront 2.0 *would* disallow this (if it only supported "volatile").
+
+// keywords: pointer types, implicit type conversions
+
+const char *ccp;
+volatile char *vcp;
+char *cp;
+
+void function ()
+{
+ cp = ccp; /* ERROR - */
+ cp = vcp; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_07.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_07.C
new file mode 100755
index 0000000..1013058
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_07.C
@@ -0,0 +1,19 @@
+// g++ 1.36.1 bug 900210_07
+
+// g++ allows values of pointer-to-signed types to be assigned to variables
+// of pointer-to-unsigned types, and vise versa.
+
+// Cfront 2.0 passes this test.
+
+// keyowrds: pointer types, implicit type conversions
+// Special Options: -ansi -pedantic-errors
+signed int *sip;
+unsigned int *uip;
+
+void function ()
+{
+ sip = uip; // ERROR -
+ uip = sip; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C
new file mode 100755
index 0000000..40704d4
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C
@@ -0,0 +1,18 @@
+// g++ 1.36.1 bug 900210_08
+
+// g++ allows pointer-to-const values to be implicitly converted to
+// void* values. This causes a silent loss of the const qualifier.
+
+// Cfront 2.0 passes this test.
+
+// keywords: pointer types, implicit type conversions
+
+const char *ccp;
+void *vp;
+
+void function ()
+{
+ vp = ccp; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_09.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_09.C
new file mode 100755
index 0000000..ce78540
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_09.C
@@ -0,0 +1,32 @@
+// g++ 1.36.1 bug 900210_09
+
+// g++ allows pointer to members (both data members and function members)
+// to be implicitly converted to void*.
+
+// Section 4.8 of the Cfront 2.0 Reference Manual disallows such implicit
+// conversions.
+
+// Cfront 2.0 passes this test.
+
+// keywords: member pointers, void pointers, implicit type conversions
+
+class class0 {
+public:
+ int class0_data_member_0;
+ void class0_function_member_0 ();
+};
+
+int class0::*class0_data_member_pointer;
+int (class0::*class0_function_member_pointer) ();
+
+void *vp;
+
+void global_function_0 ()
+{
+ vp = class0_data_member_pointer; // ERROR -
+ vp = class0_function_member_pointer; // ERROR -
+}
+
+int main () { return 0; }
+
+
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900210_10.C b/gcc/testsuite/g++.old-deja/g++.bugs/900210_10.C
new file mode 100755
index 0000000..26c1721
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900210_10.C
@@ -0,0 +1,14 @@
+// g++ 1.36.1 bug 900210_10
+
+// g++ allows operator[] to be declared as a static member function.
+// This is illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: operator[], static function members
+
+struct struct0 {
+ static int operator[] (); /* ERROR - */
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900211_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900211_01.C
new file mode 100755
index 0000000..75c99b6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900211_01.C
@@ -0,0 +1,16 @@
+// g++ 1.36.1 bug 900211_01
+
+// g++ issues only warnings for calls to previously undeclared functions,
+// however such calls are actually errors.
+
+// Cfront 2.0 passes this test.
+
+// keywords: undeclared, functions
+// Build don't link:
+
+void global_function_0 ()
+{
+ global_function_1 (); /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900211_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900211_02.C
new file mode 100755
index 0000000..d23a9df
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900211_02.C
@@ -0,0 +1,24 @@
+// g++ 1.36.1 bug 900211_02
+
+// g++ allows you to explicitly specify the return type for a type conversion
+// operator.
+
+// The Cfront 2.0 Reference Manual (12.3.2) says that this in not allowed.
+
+// Cfront 2.0 passes this test.
+
+// keywords: type conversion operators, return type
+
+struct struct0 { int member_0; };
+
+struct0 struct0_object_0;
+
+struct struct1 {
+ struct0 operator struct0 (); /* ERROR - */
+};
+
+struct0 struct1::operator struct0 () { // ERROR -
+ return struct0_object_0;
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900211_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900211_03.C
new file mode 100755
index 0000000..b805f78
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900211_03.C
@@ -0,0 +1,14 @@
+// g++ 1.36.1 bug 900211_03
+
+// The following erroneous code causes g++ to segfault.
+
+// Cfront 2.0 passes this test.
+
+// keywords: segfault, operator new, arrays, undeclared, array bound
+
+void function ()
+{
+ char* new_base = new char[x]; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C
new file mode 100755
index 0000000..81bea9e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C
@@ -0,0 +1,27 @@
+// g++ 1.36.1 bug 900211_04
+
+// g++ fails to flag as errors attempts to compare pointer values against
+// (non-zero) integer values;
+
+// Since implicit conversions of pointer to integers (or vise versa) are
+// illegal, these comparisons are also illegal.
+
+// Cfront 2.0 passes this test.
+
+// keywords: comparison operators, pointer types, integral types
+
+int result;
+int i;
+char *p;
+
+void function ()
+{
+ result = i == p; /* ERROR - caught by g++ */
+ result = i != p; /* ERROR - caught by g++ */
+ result = i > p; /* ERROR - missed */
+ result = i < p; /* ERROR - missed */
+ result = i >= p; /* ERROR - missed */
+ result = i <= p; /* ERROR - missed */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900212_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900212_01.C
new file mode 100755
index 0000000..03c41fb
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900212_01.C
@@ -0,0 +1,38 @@
+// g++ 1.36.1 bug 900212_01
+
+// g++ fails to flag as errors all attempts to add or subtract integer values
+// from pointers-to-member values.
+
+// Some cases are detected however.
+
+// Cfront 2.0 passes this test.
+
+// keywords: pointer arithmetic, member pointers
+
+struct struct0 {
+};
+
+int struct0::*p0;
+int struct0::*p1;
+
+int (struct0::*fp0) ();
+int (struct0::*fp1) ();
+
+void global_function_0 ()
+{
+ p0 = p1 + 3; // ERROR -
+ p0 = p1 - 3; // ERROR -
+ p1++; /* ERROR - caught by g++ */
+ ++p1; /* ERROR - caught by g++ */
+ p1--; /* ERROR - caught by g++ */
+ --p1; /* ERROR - caught by g++ */
+
+ fp0 = fp1 + 3; // ERROR -
+ fp0 = fp1 - 3; // ERROR -
+ fp1++; /* ERROR - */
+ ++fp1; /* ERROR - */
+ fp1--; /* ERROR - */
+ --fp1; /* ERROR - */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C
new file mode 100755
index 0000000..d997b61
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C
@@ -0,0 +1,27 @@
+// g++ 1.36.1 bug 900212_02
+
+// g++ fails to flag as errors attempts to take the difference of two values
+// of some compatible pointer-to-member type.
+
+// Cfront 2.0 passes this test.
+
+// keywords: pointer arithmetic, subtraction, member pointers
+
+struct struct0 {
+};
+
+int struct0::*p0;
+int struct0::*p1;
+
+int (struct0::*fp0) ();
+int (struct0::*fp1) ();
+
+int result;
+
+void global_function_0 ()
+{
+ result = (p0 - p1); // ERROR -
+ result = (fp0 - fp1); // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900212_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900212_03.C
new file mode 100755
index 0000000..479e32c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900212_03.C
@@ -0,0 +1,33 @@
+// g++ 1.36.1 bug 900212_03
+
+// g++ segfaults on any attempt to use the ->* operator.
+
+// Cfront 2.0 passes this test.
+
+// keywords: member pointers, operator->*
+
+struct struct0 {
+ int data_member;
+ void function_member ();
+};
+
+void struct0::function_member ()
+{
+}
+
+int i;
+
+int struct0::*dmp;
+void (struct0::*fmp) ();
+
+struct0 *ptr;
+
+void global_function_0 ()
+{
+ i = ptr->*dmp; // causes segfault
+ (ptr->*fmp) (); // causes segfault
+ // i = ptr->*(&struct0::data_member); // too complicated for cfront
+ // (ptr->*(&struct0::function_member)) (); // too complicated for cfront
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900213_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900213_01.C
new file mode 100755
index 0000000..309a419
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900213_01.C
@@ -0,0 +1,26 @@
+// g++ 1.36.1 bug 900213_01
+
+// g++ incorrectly diagnoses the error when an attempt is made to reference
+// a non-static data-member without an object indication.
+
+// Similar attempts to reference non-static function-members are correctly
+// diagnosed by g++.
+
+// Cfront 2.0 passes this test.
+
+// keywords: non-static members, member pointers, scope resolution
+
+struct struct0 {
+ int struct0_data_member_0; /* ERROR - gets error from below */
+ int struct0_function_member_0 ();
+};
+
+int i;
+
+void global_function_0 ()
+{
+ i = struct0::struct0_data_member_0; /* ERROR - mishandled by g++ */
+ //i = struct0::struct0_function_member_0 (); /* gets caught by g++ */
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900213_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900213_02.C
new file mode 100755
index 0000000..c4263f9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900213_02.C
@@ -0,0 +1,21 @@
+// g++ 1.36.1 bug 900213_02
+
+// The following erroneous code causes g++ to abort.
+
+// Cfront 2.0 passes this test.
+
+// keywords: abort, member pointers, operator*
+
+struct struct0 {
+ int data_member;
+};
+
+int i;
+int struct0::*dmp;
+
+void global_function_0 ()
+{
+ i = *dmp; // ERROR - causes abort
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900213_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900213_03.C
new file mode 100755
index 0000000..4e15896
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900213_03.C
@@ -0,0 +1,28 @@
+// g++ 1.36.1 bug 900213_03
+
+// g++ fails to detect an error when the address of a "bound" function is
+// assigned to a pointer-to-member-function variable.
+
+// It does however correctly detect a similar errors for data-members.
+
+// keywords: bound function, operator&, member pointers
+// Build don't link:
+
+struct struct0 {
+ int data_member;
+ int function_member ();
+};
+
+int i;
+int struct0::*dmp;
+int (struct0::*fmp) ();
+
+struct0 *ptr;
+
+void global_function_0 ()
+{
+ fmp = &ptr->function_member; // ERROR -
+ //dmp = &ptr->data_member; // caught by g++, missed by cfront
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900214_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900214_01.C
new file mode 100755
index 0000000..3aac764
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900214_01.C
@@ -0,0 +1,22 @@
+// g++ 1.36.1 bug 900214_01
+
+// g++ allows function members of incomplete types to be declared to be
+// friends of other types.
+
+// Cfront 2.0 passes this test.
+
+// keywords: friends, incomplete types, function members
+
+struct A;
+
+struct B {
+ friend void A::foo(); // ERROR - type A is incomplete
+};
+
+void A::foo(); /* ERROR - also illegal */
+
+struct A {
+ void foo() {}
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C
new file mode 100755
index 0000000..ff16b20
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C
@@ -0,0 +1,39 @@
+// g++ 1.36.1 bug 900215_01
+
+// g++ allows the definition of a type conversion operator `operator void'
+// for class types, but subsequently fails to generate calls (where needed)
+// for such type conversion operators.
+
+// Cfront 2.0 does generate such calls.
+
+// The following program exits with status 0 when compiled with Cfront 2.0
+// but exits with status 1 when compiled with g++.
+
+// Cfront 2.0 passes this test.
+
+// 4/27/94 (jason): The pre-San Diego working paper prohibits operator
+// void, so we can go back to just ignoring void values.
+
+// keywords: user-defined type conversion operators, void type, explicit casts
+
+struct struct0 {
+
+ operator void (); // ERROR - operator void
+};
+
+int exit_status = 1;
+
+struct0::operator void ()
+{ // ERROR - operator void
+ exit_status = 0;
+}
+
+struct struct0 s0_object;
+
+int test ()
+{
+ (void) s0_object;
+ return exit_status;
+}
+
+int main () { return test (); }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900215_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900215_02.C
new file mode 100755
index 0000000..269849e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900215_02.C
@@ -0,0 +1,47 @@
+// g++ 1.36.1 bug 900215_02
+
+// g++ allows global objects (which happen to be pointers to members of some
+// class X) to be dereferenced without prefix object specifications within
+// member functions of class X.
+
+// In effect, g++ treats any dereference of a pointer-to-member which appears
+// within the context of a member function (and which is not preceeded by
+// either ->* or .*) as if it had been implicitly prefixed with this->*.
+
+// The 2.0 Reference Manual only provides that such implicit prefixing
+// takes place for *members* of the containing class, and *not* for
+// global objects that happen to have certain types (i.e. pointer-to-member
+// of the containing class).
+
+// Also, cfront 2.0 provides implicit this-> prefixes *only* for *members*
+// of the containing class.
+
+// Cfront 2.0 passes this test.
+
+// keywords: member pointers, this, dereference, members
+
+struct struct0 {
+ int data_member;
+ void function_member ();
+};
+
+int struct0::*dmp;
+int (struct0::*fmp) ();
+int i;
+
+struct struct1 {
+ int data_member;
+
+ void function_member ();
+};
+
+void struct0::function_member ()
+{
+ i = (this->*fmp) (); // perfectly legal - for both cfront and g++
+ i = this->*dmp; // perfectly legal - for both cfront and g++
+
+ i = (*fmp) (); // ERROR -
+ i = *dmp; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900220_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900220_01.C
new file mode 100755
index 0000000..df7e641
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900220_01.C
@@ -0,0 +1,36 @@
+// g++ 1.36.1 bug 900220_01
+
+// Ref: 12.8
+
+// Section 12.8 says:
+
+// "That is, X::operator=() will be generated only if no assignment
+// operation is explicitly declared and an object of class X is actually
+// assigned an object of class X (or an object of a class derived from X)
+// or if the address of X::operator= is taken.
+
+// g++ does not allow you to take the address of an implicitly generated
+// operator=
+
+// keywords: operator=, implicit copy operator, operator&
+
+struct struct0 {
+ int data_member;
+};
+
+typedef struct0& (struct0::*member_func_t) (const struct0&);
+
+member_func_t member_func;
+
+void global_function_0 (member_func_t member_f)
+{ // gets bogus error - ref from below
+}
+
+void global_function_1 ()
+{
+ member_func = &struct0::operator=; // gets bogus error
+
+ global_function_0 (&struct0::operator=); // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900220_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900220_02.C
new file mode 100755
index 0000000..cf039f6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900220_02.C
@@ -0,0 +1,30 @@
+// g++ 1.36.1 bug 900220_02
+
+// g++ treats plain `char' and `unsigned char' as different types, however
+// it fails to treat `signed char' as being a different type from plain
+// `char' as called for by both the ANSI C standard and the C++ reference
+// manual.
+
+// keywords: plain char type, signed char type, unsigned char type, overloading
+
+void overloaded (char) {
+}
+
+void overloaded (signed char) { // gets bogus error
+}
+
+void overloaded (unsigned char) {
+}
+
+void global_function ()
+{
+ char c = 0;
+ signed char sc = 0;
+ unsigned char uc = 0;
+
+ overloaded (c);
+ overloaded (sc);
+ overloaded (uc);
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900220_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900220_03.C
new file mode 100755
index 0000000..532fc84
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900220_03.C
@@ -0,0 +1,51 @@
+// g++ 1.36.1 bug 900220_03
+
+// g++ does not properly disambiguate calls to overloaded functions
+// which are nearly identical except that one take a reference to a
+// type `T' object and another takes a reference to a type `const T'
+// object.
+
+// (Note that the volatile stuff is commented out here because cfront
+// does not yet grok volatile.)
+
+// Cfront 2.0 passes this test.
+
+// keywords: references, overloading, type qualifiers, pointers
+
+int c_call_count = 0;
+int cc_call_count = 0;
+//int vc_call_count = 0;
+
+void overloaded (char&)
+{
+ c_call_count++;
+}
+
+void overloaded (const char&)
+{
+ cc_call_count++;
+}
+
+//void overloaded (volatile char&)
+//{
+// vc_call_count++;
+//}
+
+int test ()
+{
+ char c = 0;
+ const char cc = 0;
+ //volatile char vc = 0;
+
+ char& cr = c;
+ const char& ccr = cc;
+ //volatile char& vcr = vc;
+
+ overloaded (c); // OK
+ overloaded (cc); // gets bogus error
+ //overloaded (vc); // OK
+
+ return (c_call_count != 1 || cc_call_count != 1 /* || vc_call_count != 1 */);
+}
+
+int main () { return test (); }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C
new file mode 100755
index 0000000..92c56fc
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C
@@ -0,0 +1,21 @@
+// g++ 1.36.1 bug 900221_01
+
+// Ref: 3.2
+//
+// Section 3.2 of the C++ 2.0 Reference Manual says:
+//
+// "Names of formal arguments for a function are treated as if they
+// were declared in the outermost block of that function"
+//
+// g++ does not enforce this treatment.
+
+// Cfront 2.0 passes this test.
+
+// keywords: scope, formal parameters
+
+void function (int arg1)
+{
+ int arg1; // ERROR - redeclaration of arg1
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C
new file mode 100755
index 0000000..77ac100
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C
@@ -0,0 +1,38 @@
+// g++ 1.37.1 bug 900227_01
+
+// g++ allows pointer type values to be converted to integral types which are
+// not actually large enough to hold the converted values.
+
+// Section 3.3.4 of the ANSI C standard says:
+
+// A pointer may be converted to an integral type. The size of the
+// integer required and the results are implementation defined. If
+// the space provided is not long enough, the behavior is undefined.
+
+// I believe that the only proper thing to do in such cases is to generate
+// errors. After all, if the converted value gets truncated, it is not
+// likely to be useful after that.
+
+// Furthermore, as the following example demonstrates, allowing pointers
+// to be converted to integral types which are not of sufficient size to
+// completely hold the converted values may cause additional troubles.
+
+// I tried the following code on 5 different machines and it failed on
+// all five (unless I also use the GNU assembler and the GNU linker). Three
+// of the five (Sun3, Sun4, and Symmetry) got link-time errors about byte
+// offset overflows. The other two (368/SystemV and AViiON) got assembly
+// time errors about relocatable names used in "constant" expressions.
+
+// keywords: casts, pointer types, integral types
+
+// Update 2/10/95: The compiler will now compute these expressions at
+// runtime. I think this is in the spirit of the GNU compilers (jason).
+
+// Special g++ Options:
+
+int main ();
+
+short s = (short) &main;
+char c = (char) &main;
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C
new file mode 100755
index 0000000..489671f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C
@@ -0,0 +1,29 @@
+// g++ 1.37.1 bug 900321_01
+
+// cfront flags ERRORs on each of the lines indicated below. g++ does not
+// flag either ERRORs or warnings.
+
+// Although I cannot find where in the current C++ Reference Manual this
+// topic is covered, I am sure that these statements should get ERRORs in
+// a "strongly typed" language.
+
+// Cfront 2.0 passes this test.
+
+// keywords: array types, array bound, pointers
+
+int (*ptr_to_array_of_ints)[];
+int (*ptr_to_array_of_3_ints) [3];
+int (*ptr_to_array_of_5_ints) [5];
+
+void function_0 ()
+{
+ // we miss the first two because typeck.c (comp_array_types) deems
+ // it okay if one of the sizes is null
+ ptr_to_array_of_ints = ptr_to_array_of_3_ints; // ERROR -
+ ptr_to_array_of_3_ints = ptr_to_array_of_ints; // ERROR -
+
+ ptr_to_array_of_3_ints = ptr_to_array_of_5_ints; // ERROR -
+ ptr_to_array_of_5_ints = ptr_to_array_of_3_ints; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C
new file mode 100755
index 0000000..d635ba3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C
@@ -0,0 +1,27 @@
+// g++ 1.37.1 bug 900321_02
+
+// The following program exits with a non-zero status because the constructor
+// is not called 3 times as it should be. This program exits with a zero
+// status when compiled with cfront 2.0.
+
+// Cfront 2.0 passes this test.
+
+// keywords: arrays, initialization, default constructor, operator new
+
+int call_count = 0;
+
+struct struct0 {
+ struct0 ();
+};
+
+struct0::struct0 () { call_count++; }
+
+typedef struct0 array[3]; // known dimension
+
+int test ()
+{
+ new array;
+ return (call_count != 3);
+}
+
+int main () { return test (); }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900321_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900321_04.C
new file mode 100755
index 0000000..5f3d5a1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900321_04.C
@@ -0,0 +1,16 @@
+// g++ 1.37.1 bug 900321_04
+
+// The following code causes g++ to segfault.
+
+// Cfront 2.0 passes this test.
+
+// keywords: segfault, object declaration, pointer, array, incomplete type
+
+struct incomplete;
+
+void function ()
+{
+ struct incomplete (*ptr)[]; // causes segfault
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C
new file mode 100755
index 0000000..8f417e8
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C
@@ -0,0 +1,20 @@
+// g++ 1.37.1 bug 900321_05
+
+// The following code is legal as far as the ANSI C standard, GCC, and
+// cfront are concerned, however g++ issues errors for the lines indicated.
+
+// Cfront 2.0 passes this test.
+
+// keywords: operator[], pointers, index
+
+char c;
+char *cp;
+int i;
+
+void function ()
+{
+ c = 3["abcdef"]; // gets bogus error
+ c = i[cp]; // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C
new file mode 100755
index 0000000..48ae600
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C
@@ -0,0 +1,61 @@
+// g++ 1.37.1 bug 900322_01
+
+// ** Old, obsolete commentary:
+// **************************************************************************
+// The ANSI C standard, in section 3.1.2.5 (first paragraph) differentiates
+// types into three disjoint sets, i.e object types, function types, and
+// incomplete types.
+
+// Also in 3.1.2.5 (page 24) the standard says that the element type of
+// an array type is an object type.
+
+// Later in that same section the standard also notes that array types with
+// unknown size are considered incomplete types (page 25). (Struct & union
+// types which have only been "forward declared" are also incomplete types.)
+
+// Some experts infer this to mean that it is not legal to specify or to
+// construct an array *type* whose element type is an incomplete type.
+
+// This interpretation suggests that the statements indicated below contain
+// errors.
+
+// g++ fails to flag all of the indicated statements with errors (even when
+// the -pedantic option is used).
+// **************************************************************************
+
+// The above commentary is wrong. (jason 1998/11/13)
+// In fact, the lines marked OK are well-formed; the prohibition is only
+// against forming array types with multiple unknown bounds. This prohibition
+// is found in 8.3.4 [dcl.array].
+
+// It is also ill-formed to create an object of incomplete type.
+
+// keywords: incomplete types, arrays, element types
+
+extern int extern_two_d [] []; // ERROR - invalid declaration
+int tenative_two_d [] []; // ERROR - caught by g++
+static int static_two_d [] []; // ERROR - caught by g++
+
+int (*pointer_to_two_d)[][]; // ERROR - invalid declaration
+
+void function_0 (int arg [] []) { // ERROR - invalid declaration
+}
+
+typedef int int_one_d_type [];
+typedef int_one_d_type int_two_d_type[];// ERROR - invalid declaration
+
+struct s;
+
+extern struct s extern_s_array [10]; // OK
+struct s tenative_s_array [10]; // ERROR - object with incomplete type
+static struct s static_s_array [10]; // ERROR - object with incomplete type
+
+struct s (*pointer_to_s_array) []; // OK
+
+void function_1 (struct s arg []) { // OK
+}
+
+typedef struct s s_type;
+typedef s_type s_one_d_type [10]; // OK
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C
new file mode 100755
index 0000000..56ff7b7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C
@@ -0,0 +1,18 @@
+// g++ 1.37.1 bug 900324_02
+
+// The following erroreous code causes g++ to segfault.
+
+// Cfront 2.0 passes this test.
+
+// keywords: segfault, function pointer, conditional operator ?:
+
+void function_0 (int i) { }
+
+void (*fp)(void);
+
+void function_1 ()
+{
+ fp = 1 ? function_0 : fp; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C
new file mode 100755
index 0000000..69d9b58
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C
@@ -0,0 +1,21 @@
+// g++ 1.37.1 bug 900324_03
+
+// g++ is unable to correctly parse declarations of non-global function-pointer
+// variables and/or function-pointer formal parameters.
+
+// Cfront 2.0 passes this test.
+
+// keywords: syntax, function pointers, block local, formal
+
+void (*p0)(); // OK
+
+void function_0 ()
+{
+ void (*p1)(); // gets bogus errors
+}
+
+void function_1 (void (*p2)()); // gets bogus errors
+
+void (*function_2 ()) (); // OK
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C
new file mode 100755
index 0000000..c874897
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C
@@ -0,0 +1,25 @@
+// g++ 1.37.1 bug 900324_04
+
+// g++ implements an extension which supports the copying of array objects.
+
+// This extension is not described in the current C++ Reference Manual, and
+// it is not implemented by cfront (2.0).
+
+// g++ should generate errors for the use of this extension when -pedantic
+// is used, however it does not.
+
+// Cfront 2.0 passes this test.
+
+// keywords: extension, pedantic, arrays, copy
+
+typedef int int_array[20];
+
+int_array ia1;
+int_array ia2;
+
+void function_0 ()
+{
+ ia1 = ia2; // ERROR - gnu extension
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_05.C
new file mode 100755
index 0000000..32f691d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_05.C
@@ -0,0 +1,21 @@
+// g++ 1.37.1 bug 900324_05
+
+// The following erroneous code causes g++ to segfault.
+
+// Cfront 2.0 passes this test.
+
+// keywords: segfault, arrays, references, assignment operator=
+
+typedef int int_array[];
+
+extern int_array int_array_object;
+
+int_array &left = int_array_object;
+int_array &right = int_array_object;
+
+void function ()
+{
+ left = right; // ERROR - causes segfault
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_06.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_06.C
new file mode 100755
index 0000000..5a1938a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_06.C
@@ -0,0 +1,28 @@
+// g++ 1.37.1 bug 900324_06
+
+// g++ is unable to use context information (i.e. the required type of the
+// expression) to disambiguate a possibly overloaded function name when that
+// name is used as either the second or the third operand of a ?: operator.
+
+// It is also unable to use the fact that the given name is not in fact
+// overloaded (and has only one possible interpretation).
+
+// This results in improper errors being generated.
+
+// keywords: overloading, function pointers, disambiguation, operator?:
+
+int i;
+void (*p)();
+
+void function_0 ()
+{
+}
+
+void function_1 ()
+{
+ p = i ? function_0 : 0; // gets bogus error
+ p = i ? 0 : function_0; // gets bogus error
+ p = i ? function_1 : function_0; // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900325_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900325_01.C
new file mode 100755
index 0000000..f11ec18
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900325_01.C
@@ -0,0 +1,17 @@
+// g++ 1.37.1 bug 900325_01
+
+// g++ fails to generate errors for attempts to declare a formal argument to
+// be of a void type.
+
+// keywords: formal parameter, void type
+
+typedef void __void;
+typedef __void Void;
+
+void function0 (void arg1) { // ERROR - missed
+}
+
+void function1 (Void arg1) { // ERROR - missed
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900330_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900330_01.C
new file mode 100755
index 0000000..651d370
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900330_01.C
@@ -0,0 +1,52 @@
+// g++ 1.37.1 bug 900330_01
+//
+// As indicated by the example at the end of the section 3.5.3 of the ANSI
+// C standard, when a type qualifier (i.e. "const" or "volatile") is applied
+// to an array type, the effect should be as if the element type had been
+// qualified with the given qualifier.
+//
+// This rule applies to C++ also.
+//
+// In section 7.1.6 of the C++ Reference Manual it says "Each element of a
+// const array is const..."
+//
+// It appears however that when a name already exists for a given array type
+// (i.e. a typedef name) and when that name is qualified by a type qualifier,
+// (i.e. "const" or "volatile"), gcc & g++ may act as if the qualifier applied
+// to the named (array) type rather that to the elements of that type.
+//
+// The result is that (even with the -ansi and -pedantic options) g++
+// generates no errors or warnings for the lines indicated (even though it
+// should).
+//
+// Due to the incorrect associations, gcc & g++ will also issue inappropriate
+// warnings in some cases (as illustrated below).
+
+// keywords: type qualifiers, arrays
+
+typedef const int const_int;
+typedef const_int array_of_const_int[3];
+array_of_const_int *ptr_to_array_of_consts;
+
+typedef int array_of_int[3];
+typedef const array_of_int const_array_of_int;
+const_array_of_int *ptr_to_const_array;
+
+void function_0 ()
+{
+ ptr_to_array_of_consts = ptr_to_const_array; /* gets bogus warning */
+ ptr_to_const_array = ptr_to_array_of_consts; /* gets bogus warning */
+}
+
+/* The following example is taken from ANSI 3.5.3 */
+
+typedef int A[2][3];
+const A a = {{4, 5, 6}, {7, 8, 9}};
+int *pi;
+
+void function_1 ()
+{
+ pi = a[0]; // ERROR - a[0] has type "const int *"
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C
new file mode 100755
index 0000000..85c40f0
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C
@@ -0,0 +1,29 @@
+// g++ 1.37.1 bug 900330_02
+
+// The C++ Reference Manual says in section 13.1:
+
+// "Two function declarations of the same name refer to the same function
+// if they are in the same scope and have identical argument types. A
+// function member of a derived class is *not* in the same scope as a function
+// member of the same name in a base class."
+
+// g++ fails to correctly detect the error indicated.
+
+// Cfront 2.0 passes this test.
+
+// keywords: function, member, overloading, hiding
+
+struct B {
+ int f(int);
+};
+
+struct D : public B {
+ int f(struct B); // ERROR - referred to below
+};
+
+void h(D* pd)
+{
+ pd->f(1); // ERROR - D::f(struct B) hides B::f(int)
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900331_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900331_02.C
new file mode 100755
index 0000000..11884db
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900331_02.C
@@ -0,0 +1,27 @@
+// g++ 1.37.1 bug 900331_02
+
+// g++ fails to treat conditional expressions which yield composite type
+// (i.e. struct type, union type, or class type) lvalues as if they did
+// in fact yield lvalues in all cases.
+
+// Cfront 2.0 passes this test.
+
+// keywords: conditional operator?:, lvalues, composite types
+
+struct struct0 {
+ int data_member;
+};
+
+struct0 object0;
+struct0 object1;
+struct0 object2;
+
+int i;
+
+void function0 ()
+{
+ (i ? object0 : object1).data_member = 99; // gets bogus error
+ (i ? object0 : object1) = object2; // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900331_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900331_03.C
new file mode 100755
index 0000000..a73d685
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900331_03.C
@@ -0,0 +1,31 @@
+// g++ 1.37.1 bug 900331_03
+
+// Special Options: -ansi
+
+// The following code causes g++ to abort.
+
+// Curiously, the abort does not occur if the -pedantic option is used.
+
+// Cfront 2.0 passes this test.
+
+// Keywords: abort, conditional operator?:, lvalues, composite types
+
+struct struct0 {
+ int data_member;
+
+ virtual void function_member () {} // contributes to the abort
+};
+
+struct0 object0;
+struct0 object1;
+struct0 object2;
+
+int i;
+
+void function0 ()
+{
+ object2 = (i ? object0 : object1); // OK
+ (i ? object0 : object1) = object2; // causes abort
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900331_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900331_04.C
new file mode 100755
index 0000000..f8a14c6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900331_04.C
@@ -0,0 +1,32 @@
+// g++ 1.37.1 bug 900331_04
+
+// g++ is unable to correctly parse declarations of formal parameters and
+// local objects which have pointer-to-array types or reference-to-array
+// types.
+
+// Cfront 2.0 passes this test.
+
+// keywords: syntax, arrays, pointers, references, local, formal
+
+int array[10];
+
+int (*global_array_ptr)[10] = &array;
+int (&global_array_ref)[10] = array;
+
+void function0 (int (*formal_array_ptr)[10]) { // gets bogus errors
+}
+
+void function1 (int (&formal_array_ref)[10]) { // gets bogus errors
+}
+
+void function2 ()
+{
+ int (*local_array_ptr)[10] = &array; // gets bogus errors
+}
+
+void function3 ()
+{
+ int (&local_array_ref)[10] = array; // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900401_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900401_01.C
new file mode 100755
index 0000000..18ecd61
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900401_01.C
@@ -0,0 +1,15 @@
+// g++ 1.37.1 bug 900401_01
+
+// The following erroneous code causes g++ to abort.
+
+// Cfront 2.0 passes this test.
+
+// keywords: abort, bit-fields, arrays
+
+typedef unsigned nibble_array[4];
+
+struct whole {
+ nibble_array nibbles:16; // ERROR -
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C
new file mode 100755
index 0000000..946e6d1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C
@@ -0,0 +1,15 @@
+// g++ 1.37.1 bug 900402_01
+
+// The following erroneous code causes g++ to abort.
+
+// Cfront 2.0 passes this test.
+
+// keywords: abort, bit-fields, function types
+
+typedef void (func_type) ();
+
+struct s {
+ func_type f:32; // ERROR - bitified with function type
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900402_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900402_02.C
new file mode 100755
index 0000000..705cbf2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900402_02.C
@@ -0,0 +1,21 @@
+// g++ 1.37.1 bug 900402_02
+
+// g++ fails to correctly flag all attempts to construct an array type
+// of zero length as errors.
+
+// keywords: arrays, array bound, zero length
+
+typedef int array_type[0]; // ERROR - gets warning only
+
+int array_object_1[0]; // ERROR - gets warning only
+
+void function_0 (int formal_array[0])
+{ // ERROR - gets warning only
+}
+
+void function_2 ()
+{
+ int local_object_array_0[0]; // ERROR - gets warning only
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C
new file mode 100755
index 0000000..608d8f9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C
@@ -0,0 +1,19 @@
+// g++ 1.37.1 bug 900403_01
+
+// g++ allows casts to be treated as lvalues (even when the -pedantic
+// option is used). Neither the C++ Reference Manual nor cfront 2.0
+// allow this. (gcc gives warnings for such usage with -pedantic).
+
+// Cfront 2.0 passes this test.
+
+// keywords: lvalues, casts
+
+int i, j;
+
+void f ()
+{
+ (int) i = j; // ERROR -
+ ((int) i) = j; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900403_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900403_04.C
new file mode 100755
index 0000000..c68e4c2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900403_04.C
@@ -0,0 +1,12 @@
+// g++ 1.37.1 bug 900403_04
+
+// The following erroneous code causes g++ to abort.
+
+// keywords: abort, bit-fields, zero length
+
+struct s {
+ unsigned int foo:0; // ERROR - This is the real line
+ unsigned int field;
+};
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C
new file mode 100755
index 0000000..f728865
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C
@@ -0,0 +1,15 @@
+// g++ 1.37.1 bug 900404_01
+
+// g++ allows string initializers for known-length character arrays to be
+// one character longer (counting the terminating null) than the actual
+// length of the array to be initialized.
+
+// The C++ Reference Manual (section 8.4.2) expressly prohibits this.
+
+// Cfront 2.0 passes this test.
+
+// keywords: arrays, initialization, array bounds
+
+char cv[4] = "asdf"; // ERROR - missed
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
new file mode 100755
index 0000000..4099daa
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
@@ -0,0 +1,24 @@
+// g++ 1.37.1 bug 900404_02
+
+// g++ fails to treat multicharacter literals as type "int" as required by
+// section 2.5.2 of the C++ Reference Manual.
+
+// The result is that the following program will exit with a non-zero
+// exit status.
+
+// keywords: character literals, multi-character literals, int type
+
+int exit_status = 0;
+
+void function0 (int i) // function that should be called
+{
+ i = i;
+}
+
+void function0 (char c) // function that is actually called
+{
+ c = c;
+ exit_status++;
+}
+
+int main () { function0 ('abcd'); return exit_status; } // WARNING -
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
new file mode 100755
index 0000000..98a33d7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
@@ -0,0 +1,27 @@
+// g++ 1.37.1 bug 900404_03
+
+// g++ fails to be able to properly flag errors for even simple cases of
+// ambiguous overload resolution (such as the one shown below).
+
+// Cfront 2.0 passes this test.
+
+// keywords: overloading, ambiguity, resolution
+
+void function0 (int i, char c)
+{ // ERROR -
+ i = c;
+}
+
+void function0 (char c, int i)
+{ // ERROR -
+ i = c;
+}
+
+char c;
+
+void test ()
+{
+ function0 (c,c); // ERROR - missed
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C
new file mode 100755
index 0000000..75be8ab
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C
@@ -0,0 +1,17 @@
+// g++ 1.37.1 bug 900404_04
+
+// [dcl.dcl] explains that simple-declarations may omit the
+// init-declarator-list only if the decl-specifier-seq declares a
+// class, i.e. if it contains a class-specifier, an
+// elaborated-type-specifier with class key, or an enum-specifier. The
+// declaration below contains neither.
+
+// g++ fails to flag errors for such usage.
+
+// keywords: semicolon, vacuous, file scope, declaration
+
+int i;
+
+; // ERROR - , XFAIL *-*-*
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_07.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_07.C
new file mode 100755
index 0000000..c07a577
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_07.C
@@ -0,0 +1,17 @@
+// g++ 1.37.1 bug 900404_07
+
+// It is illegal to use a cast to attempt to convert an object type
+// to a non-scalar type (e.g. an array type).
+
+// g++ fails to properly flag as errors such illegal uses of array types.
+
+// keywords: array types, casts, type conversion
+
+typedef int array_type[10];
+
+array_type *ap;
+
+void foo ()
+{
+ int i = *((array_type) *ap); /* ERROR - missed */
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900405_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900405_01.C
new file mode 100755
index 0000000..346db0c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900405_01.C
@@ -0,0 +1,19 @@
+// g++ 1.37.1 bug 900405_01
+
+// The C++ Reference Manual says (in section 5.4) "Types may not be defined
+// in casts."
+
+// g++ fails to flag errors for cases where an attempt is made to define
+// a struct, class, union, or enum type within a cast.
+
+// keywords: casts, type definitions, tagged types
+
+void f ()
+{
+ (enum e { red, green } *) 0; // ERROR - type defined in cast
+ (struct s { int member; } *) 0; // ERROR - type defined in cast
+ (union u { int member; } * ) 0; // ERROR - type defined in cast
+ (class c { int member; } *) 0; // ERROR - type defined in cast
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900406_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900406_01.C
new file mode 100755
index 0000000..93e7af3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900406_01.C
@@ -0,0 +1,19 @@
+// g++ 1.37.1 bug 900406_01
+
+// The following code causes g++ to segfault.
+
+// cfront 2.0 passes this test.
+
+// keywords: segfault, operator new, array types, array bounds
+
+void function0 ()
+{
+ new int[]; // ERROR - causes segfault
+}
+
+void function1 ()
+{
+ new int (*)[]; // ERROR - no size specified
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C
new file mode 100755
index 0000000..daf46a1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C
@@ -0,0 +1,25 @@
+// g++ bug 900406_02
+
+// g++ fails to correctly parse some type specifications within casts.
+
+// This results in incorrect errors being issued.
+
+// These errors are not issued for identical code by either cfront or
+// by gcc.
+
+// cfront 2.0 passes this test.
+
+// keywords: syntax, array types, casts
+
+int (*ipp)[];
+int (**ippp)[];
+
+int function ()
+{
+ ipp = (int (*)[]) 0; // OK
+ ippp = (int (**)[]) 0; // gets bogus error (syntax)
+ return 0;
+}
+
+int main () { return 0; }
+
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900407_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900407_01.C
new file mode 100755
index 0000000..988642f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900407_01.C
@@ -0,0 +1,36 @@
+// g++ 1.37.1 bug 900407_01
+
+// g++ fails to flag errors for uses of anachronistic features such as the
+// invocation of a base class constructor in a ctor-initializer list without
+// explicitly giving its name.
+
+// Errors should probably be issued for such usage unless the -traditional
+// option is used.
+
+// Warnings are however issued.
+
+// Cfront 2.0 flags such usage as an error when the +p (pure-language) option
+// is used.
+
+// Cfront 2.0 passes this test.
+
+// keywords: anachronism, inheritance, initialization, mem-initializer
+
+struct s0 {
+ int member;
+
+ s0 ();
+};
+
+s0::s0() { }
+
+struct s1 : public s0 {
+ int member;
+
+ s1 ();
+};
+
+s1::s1() : () { // ERROR - anachronism used
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900407_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900407_02.C
new file mode 100755
index 0000000..20a323f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900407_02.C
@@ -0,0 +1,32 @@
+// g++ 1.37.1 bug 900407_02
+
+// g++ flags errors for attempts to assign to the "this" parameter within
+// class constructors (regardless of whether or not the -traditional)
+// option is used).
+
+// Such errors should probably not be issued when the -traditional option is
+// used.
+
+// Special g++ Options: -fthis-is-variable
+// Special CC Options:
+
+// Cfront only flags errors for such usage whin the +p (pure language)
+// option is used.
+
+// cfront 2.0 passes this test.
+
+// keywords: anachronism, this, assignment
+
+struct s0 {
+
+ int member;
+
+ s0 ();
+};
+
+s0::s0 ()
+{
+ this = this; // OK - anachronism allowed with -traditional
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900428_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900428_01.C
new file mode 100755
index 0000000..b46fc46
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900428_01.C
@@ -0,0 +1,51 @@
+// g++ 1.37.1 bug 900428_01
+
+// g++ fails to issue error messages for cases where an incomplete type
+// object must be evaluated if the value of such an evaluation is not
+// actually used in the given context.
+
+// In the case where such an object is volatile, it is obvious that this
+// could be a problem, however I believe that errors should be issued
+// for such cases regardless of whether or not such values are volatile
+// because the abstract semantics seem to require the evaluation of such
+// values whether they are volatile or not.
+
+// keywords: incomplete types, evaluation, volatile qualifier
+// Build don't link:
+
+int i;
+
+void *pv;
+volatile void *pvv;
+struct s;
+extern struct s es, *ps;
+extern volatile struct s evs, *pvs;
+
+void pv_test ()
+{
+ *pv; // ERROR - , XFAIL *-*-*
+ (i ? *pv : *pv); // ERROR - , XFAIL *-*-*
+ *pv, *pv; // ERROR - , XFAIL *-*-*
+
+ *pvv; // ERROR - , XFAIL *-*-*
+ (i ? *pvv : *pvv); // ERROR - , XFAIL *-*-*
+ *pvv, *pvv; // ERROR - , XFAIL *-*-*
+
+ es; // ERROR - , XFAIL *-*-*
+ (i ? es : es); // ERROR - , XFAIL *-*-*
+ es, es; // ERROR - , XFAIL *-*-*
+
+ evs; // ERROR - , XFAIL *-*-*
+ (i ? evs : evs); // ERROR - , XFAIL *-*-*
+ evs, evs; // ERROR - , XFAIL *-*-*
+
+ *ps; // ERROR - , XFAIL *-*-*
+ (i ? *ps : *ps); // ERROR - , XFAIL *-*-*
+ *ps, *ps; // ERROR - , XFAIL *-*-*
+
+ *pvs; // ERROR - , XFAIL *-*-*
+ (i ? *pvs : *pvs); // ERROR - , XFAIL *-*-*
+ *pvs, *pvs; // ERROR - , XFAIL *-*-*
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900428_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900428_02.C
new file mode 100755
index 0000000..9da709f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900428_02.C
@@ -0,0 +1,27 @@
+// g++ 1.37.1 bug 900428_02
+
+// g++ fails to issue either errors or warnings (even with -pedantic) for
+// attempts to perform either pre or post increment or decrement operations
+// on variables which have either pointer-to-void types or pointer-to-function
+// types.
+
+// cfront 2.0 passes this test.
+
+// keywords: pointer arithmetic, increment, decrement
+// Build don't link:
+
+void *vp;
+void (*fp) ();
+
+void test ()
+{
+ vp++; /* ERROR - */
+ ++vp; /* ERROR - */
+ vp--; /* ERROR - */
+ --vp; /* ERROR - */
+
+ fp++; /* ERROR - */
+ ++fp; /* ERROR - */
+ fp--; /* ERROR - */
+ --fp; /* ERROR - */
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900428_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900428_03.C
new file mode 100755
index 0000000..74e5586
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900428_03.C
@@ -0,0 +1,44 @@
+// g++ 1.37.1 bug 900428_03
+
+// g++ fails to detect cases where a constructor for a derived class invokes
+// (either explicitly or implicitly) a private constructor for a base class.
+
+// cfront 2.0 passes this test.
+
+// keywords: inheritance, private, accessability, constructors
+
+struct struct_0 {
+ int struct_0_data_member;
+
+private:
+ struct_0 (int, int);
+public:
+ struct_0 (int);
+};
+
+struct_0::struct_0 (int i) { }
+struct_0::struct_0 (int, int) { } // ERROR - xref from below
+
+struct struct_1 : public struct_0 {
+
+ struct_1 ();
+};
+
+struct_1::struct_1 () : struct_0 (8,9)
+{ // ERROR -
+}
+
+struct struct_2 {
+ struct_0 struct_2_data_member;
+
+ struct_2 ();
+};
+
+// g++ catches the following error (but does so only at the line with the
+// closing curly brace).
+
+struct_2::struct_2 () : struct_2_data_member (8,9)
+{ // ERROR - should be up one line
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900511_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900511_01.C
new file mode 100755
index 0000000..e4488d9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900511_01.C
@@ -0,0 +1,42 @@
+// g++ 1.37.1 bug 900511_01
+
+// g++ fails to properly apply user-defined type conversion operators
+// in cases where is it not obvious that the given conversion is
+// appropriate for the context (i.e. operator and other operands)
+// where the conversion should take place.
+
+// cfront 2.0 passes this test.
+
+struct struct_1 {
+ int member;
+
+ operator int ();
+};
+
+struct_1::operator int ()
+{
+ return 0;
+}
+
+struct struct_2 {
+ int member;
+
+ operator float ();
+};
+
+struct_2::operator float ()
+{
+ return 0.0;
+}
+
+struct_1 struct_1_object;
+struct_2 struct_2_object;
+double d;
+
+void test ()
+{
+ d = struct_2_object + struct_1_object; // OK
+ d = struct_1_object + struct_2_object; // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C
new file mode 100755
index 0000000..cef71c0
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C
@@ -0,0 +1,21 @@
+// g++ 1.37.1 bug 900511_02
+
+// g++ does not properly shadow names of types with names of data members
+// in cases where the type names in question are used in the context of
+// formal parameters lists for member functions.
+
+// keywords: typedef names, shadowing, scope, formal parameter list
+
+// cfront 2.0 passes this test.
+
+enum enum0 { enum0_value_0 };
+
+struct struct0 {
+ int enum0;
+ void member_function (enum0 e); // ERROR - invalid use of struct-local member
+};
+
+void class0::member_function (enum0 e) { // ERROR - syntax error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C
new file mode 100755
index 0000000..849bdf3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C
@@ -0,0 +1,19 @@
+// g++ 1.37.1 bug 900511_03
+
+// g++ does not properly shadow names of types with names of data members
+// in cases where the type names in question are used in the context of
+// formal parameters lists for member functions.
+
+// keywords: typedef names, shadowing, scope, formal parameter list
+
+class class0;
+
+struct struct1 {
+ int class0;
+ void member_function (class0 *); // ERROR - invalid use of struct-local member
+};
+
+void class1::member_function (class0 *p) { // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C
new file mode 100755
index 0000000..54123f2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C
@@ -0,0 +1,112 @@
+// g++ 1.37.1 bug 900514_03
+
+// g++ fails to flag ERRORs on the following erroneous code.
+
+// In Section 12.3.2 it says "Defining conversion by both a constructor and
+// a conversion function can lead to ambiguities." However in the case below,
+// the explicit cast syntax disambiguates the constructor as one which
+// invokes the type conversion operator rather than the conversion.
+
+// cfront 2.0 passes this test.
+
+// keywords: user-defined type conversion operator, constructor
+
+struct t_0_st_0;
+
+struct t_0_st_1 {
+ int member;
+
+ t_0_st_1 (t_0_st_0&);// ERROR -
+ t_0_st_1 ();
+};// ERROR -
+
+struct t_0_st_0 {
+ int member;
+
+ operator t_0_st_1 ();// ERROR -
+};
+
+t_0_st_0 t_0_st_0_obj0;
+
+void t_0_assignment ()
+{
+ t_0_st_1 t_0_st_1_obj0;
+ t_0_st_1 t_0_st_1_obj1;
+ t_0_st_1 t_0_st_1_obj2;
+
+ t_0_st_1_obj0 = t_0_st_0_obj0; // ERROR - caught
+ t_0_st_1_obj1 = t_0_st_1 (t_0_st_0_obj0);
+}
+
+void t_0_local_init ()
+{
+ t_0_st_1 t_0_st_1_obj0 = t_0_st_0_obj0; // ERROR -
+ t_0_st_1 t_0_st_1_obj1 = t_0_st_1 (t_0_st_0_obj0);
+}
+
+struct t_1_st_0;
+
+struct t_1_st_1 {
+ int member;
+
+ t_1_st_1 (t_1_st_0&); // ERROR -
+ t_1_st_1 ();
+ void operator= (t_1_st_1&); // ERROR -
+};
+
+struct t_1_st_0 {
+ int member;
+
+ operator t_1_st_1 (); // ERROR -
+};
+
+t_1_st_0 t_1_st_0_obj0;
+
+void t_1_assignment ()
+{
+ t_1_st_1 t_1_st_1_obj0;
+ t_1_st_1 t_1_st_1_obj1;
+ t_1_st_1 t_1_st_1_obj2;
+
+ t_1_st_1_obj0 = t_1_st_0_obj0; // ERROR -
+ t_1_st_1_obj1 = t_1_st_1 (t_1_st_0_obj0); // ERROR -
+}
+
+void t_1_local_init ()
+{
+ t_1_st_1 t_1_st_1_obj0 = t_1_st_0_obj0; // ERROR -
+ t_1_st_1 t_1_st_1_obj1 = t_1_st_1 (t_1_st_0_obj0);
+}
+
+struct t_2_st_0;
+
+struct t_2_st_1 {
+ int member;
+
+ t_2_st_1 (t_2_st_0); // ERROR - candidate
+ t_2_st_1 ();
+}; // ERROR - candidate
+
+struct t_2_st_0 {
+ int member;
+
+ operator t_2_st_1 (); // ERROR - candidate
+};
+
+t_2_st_0 t_2_st_0_obj0;
+
+void t_2_assignment ()
+{
+ t_2_st_1 t_2_st_1_obj0;
+ t_2_st_1 t_2_st_1_obj1;
+ t_2_st_1 t_2_st_1_obj2;
+
+ t_2_st_1_obj0 = t_2_st_0_obj0; // ERROR - caught
+ t_2_st_1_obj1 = t_2_st_1 (t_2_st_0_obj0);
+}
+
+void t_2_local_init ()
+{
+ t_2_st_1 t_2_st_1_obj0 = t_2_st_0_obj0; // ERROR -
+ t_2_st_1 t_2_st_1_obj1 = t_2_st_1 (t_2_st_0_obj0);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_01.C
new file mode 100755
index 0000000..9641d1d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_01.C
@@ -0,0 +1,16 @@
+// g++ 1.37.1 bug 900519_01
+
+// g++ fails to flag errors for some attempts to declare or define non-member
+// type conversion operators.
+
+// cfront 2.0 passes this test.
+
+// keywords: user-defined type conversion operator, non-member
+
+extern operator int (); // ERROR -
+
+extern operator int () { // ERROR -
+ return 0;
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C
new file mode 100755
index 0000000..90dc16a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C
@@ -0,0 +1,32 @@
+// g++ 1.37.1 bug 900519_02
+
+// The C++ Reference Manual says (in section 8.4.3) "A reference to a plain
+// T can only be initialized with a plain T" however g++ allows the
+// initialization of plain references with qualified objects in many cases.
+
+// keywords: references, initialization, type qualifiers
+
+extern const int cint_obj = 9;
+volatile int vint_obj = 9;
+
+void take_int_ref (int& arg) { } // ERROR - referenced by errors below
+
+int& global_int_ref0 = cint_obj; // ERROR -
+int& global_int_ref1 = vint_obj; // ERROR -
+
+extern const int& cint_ref;
+extern volatile int& vint_ref;
+
+void test_0 ()
+{
+ int& local_int_ref0 = cint_obj; // ERROR -
+ int& local_int_ref1 = vint_obj; // ERROR -
+
+ take_int_ref (cint_obj); // ERROR - caught
+ take_int_ref (vint_obj); // ERROR -
+
+ take_int_ref (cint_ref); // ERROR -
+ take_int_ref (vint_ref); // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C
new file mode 100755
index 0000000..114d909
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C
@@ -0,0 +1,47 @@
+// g++ 1.37.1 bug 900519_03
+
+// The C++ Reference Manual says (in section 8.4.3) "A reference to a
+// volatile T can be initialized with a volatile T or a plain T but not a
+// const T. A reference to a const T can be initialized with a const T or
+// a plain T or something that can be converted into a plain T, but not a
+// volatile T."
+
+// g++ fails to disgnose such errors in most cases.
+
+// keywords: references, initialization, type qualifiers
+
+extern const int cint_obj;
+extern volatile int vint_obj;
+
+void take_cint_ref (const int& arg) { } // ERROR -
+void take_vint_ref (volatile int& arg) { } // ERROR -
+
+const int& global_cint_ref2 = vint_obj; // ERROR -
+
+volatile int& global_vint_ref1 = cint_obj; // ERROR -
+
+extern const int& extern_cint_ref;
+extern volatile int& extern_vint_ref;
+
+void test_0 ()
+{
+ const int& local_cint_ref2 = vint_obj; // ERROR -
+
+ volatile int& local_vint_ref1 = cint_obj; // ERROR -
+}
+
+void test_1 ()
+{
+ take_cint_ref (vint_obj); // ERROR -
+
+ take_vint_ref (cint_obj); // ERROR - caught
+}
+
+void test_2 ()
+{
+ take_cint_ref (extern_vint_ref); // ERROR -
+
+ take_vint_ref (extern_cint_ref); // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_04.C
new file mode 100755
index 0000000..53867a1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_04.C
@@ -0,0 +1,21 @@
+// g++ 1.37.1 bug 900519_04
+
+// The following legal code causes g++ to segfault.
+
+// cfront 2.0 passes this test.
+
+// keywords: segfault, references, initialization
+
+int cint_obj = 9;
+
+void take_cint_ref (int& arg) { }
+
+int& cint_ref_0 = cint_obj;
+int& cint_ref_1 = cint_obj;
+
+void test_0 ()
+{
+ take_cint_ref (cint_ref_1); // causes segfault
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C
new file mode 100755
index 0000000..9a2a4cf
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C
@@ -0,0 +1,18 @@
+// g++ 1.37.1 bug 900519_05
+
+// g++ fails to allow the use of function-reference types.
+
+// cfront 2.0 passes this test.
+
+// keywords: function types, reference types
+
+typedef void (func_type) (int, int);
+typedef func_type& func_ref_type;
+
+void function (int arg1, int arg2)
+{
+}
+
+func_type& global_func_ref1 = function;
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_06.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_06.C
new file mode 100755
index 0000000..5704c3f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_06.C
@@ -0,0 +1,22 @@
+// g++ 1.37.1 bug 900519_06
+
+// g++ allows the type given in an invocation of operator new to be a
+// reference type.
+
+// Since pointers to reference types are illegal, the required return type
+// from such an invocation (of operator new) is illegal, and thus (it seems)
+// the entire call to new should be treated as being illegal.
+
+typedef int& int_ref;
+
+void test (int n)
+{
+ new int&; // ERROR - missed
+ new int_ref; // ERROR - missed
+ new int&[n]; // ERROR - missed
+ new int_ref[n]; // ERROR - missed
+ new int&[3]; // ERROR - missed
+ new int_ref[3]; // ERROR - missed
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_07.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_07.C
new file mode 100755
index 0000000..f5ea6bc
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_07.C
@@ -0,0 +1,16 @@
+// g++ 1.37.1 bug 900519_07
+
+// It is illegal to specify or to use array-of-reference types, yet g++
+// allows them to be specified (in typedef statements and in declarations)
+// and to be used (in declarations).
+
+// keywords: reference types, array types
+
+int i;
+int j;
+
+typedef int& int_ref;
+typedef int_ref int_ref_array_type[2]; // ERROR - missed
+
+int& int_ref_array_obj0[2] = { i, j }; // ERROR - missed
+int_ref int_ref_array_obj1[2] = { i, j }; // ERROR - missed
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_09.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_09.C
new file mode 100755
index 0000000..3bff70e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_09.C
@@ -0,0 +1,29 @@
+// g++ 1.37.1 bug 900519_09
+
+// g++ allows the allocation of const objects via operator new even when
+// these uses of operator new do not include initializations.
+
+// This is inconsistant within the restrictions placed on the construction
+// of class, struct, and union types which have constant members.
+
+// Since there is no completely valid way of initializing such objects
+// after the invocation of new, these cases should all be illegal.
+
+// keywords: operator new, initialization, const qualifier
+
+struct struct_0 {
+ int member;
+};
+
+typedef const int const_int;
+typedef const struct struct_0 const_struct_0;
+
+void test ()
+{
+ new const int; // ERROR -
+ new const_int; // ERROR -
+ new const struct_0; // ERROR -
+ new const_struct_0; // ERROR -
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_12.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_12.C
new file mode 100755
index 0000000..112b989
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_12.C
@@ -0,0 +1,11 @@
+// g++ 1.37.1 bug 900519_12
+
+// The following erroneous code causes g++ to segfault.
+
+// cfront 2.0 passes this test.
+
+// keywords: segfault, typedef, pointer type, function type
+
+typedef eek void (*)(); // ERROR -
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
new file mode 100755
index 0000000..8161b59
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
@@ -0,0 +1,35 @@
+// g++ 1.37.1 bug 900519_13
+
+// If multiple inheritance creates a situation in which a given name is
+// inherited from more than one base class, and if the inherited declarations
+// for the name are for different categories of members (e.g. object members,
+// function members, enumeral members), then g++ will (in some cases) fail
+// to flag errors when the ambiguous name is used.
+
+// cfront 2.0 passes this test.
+
+// keywords: inheritance, ambiguity resolution, members
+
+struct base_0 {
+ enum { base_member };
+};
+
+struct base_1 {
+ int base_member;
+};
+
+struct base_2 {
+ int base_member ();
+};
+
+struct derived_0 : public base_0, public base_1 {
+ void member () { base_member; } // ERROR -
+};
+
+struct derived_1 : public base_0, public base_2 {
+ void member () { base_member; } // ERROR - missed
+};
+
+struct derived_2 : public base_1, public base_2 {
+ void member () { base_member; } // ERROR - missed
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C
new file mode 100755
index 0000000..80543b6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C
@@ -0,0 +1,26 @@
+// g++ 1.37.1 bug 900520_02
+
+// keywords: reference types, initialization, parameter passing
+
+typedef int b_array[3];
+typedef int u_array[];
+
+typedef b_array &b_array_ref;
+typedef u_array &u_array_ref;
+
+void take_b_array_ref (b_array_ref arg) { } // ERROR - passed to here
+
+extern u_array u_array_gbl_obj;
+
+u_array_ref u_array_ref_gbl_obj0 = u_array_gbl_obj;
+
+b_array_ref b_array_ref_gbl_obj0 = u_array_ref_gbl_obj0; // ERROR - invalid declaration
+
+void test_passing ()
+{
+ take_b_array_ref (u_array_ref_gbl_obj0); // ERROR - invalid call
+}
+
+b_array u_array_gbl_obj;
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_03.C
new file mode 100755
index 0000000..b1f05c9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_03.C
@@ -0,0 +1,49 @@
+// g++ 1.37.1 bug 900520_03
+
+// The C++ Reference Manual says (in section 8.2.4):
+
+// When an identifier of array type appears in an expression, except
+// as the operand of sizeof or & or used to initialize a reference,
+// it is converted into a pointer to the first member of the array.
+
+// One must assume from the verbage, that when the name of a non-const array
+// object appears in one of the exempted contexts mentioned in this passage,
+// that it is *not* automatically converted into a pointer value, but rather
+// that it remains as an array type value, and that it may therefore also
+// still be an lvalue, and may be used to initialize references.
+
+// As the following code demonstrates, g++ does in fact treat the names
+// of non-const array objects as valid initializers for reference-to-array
+// type object in some (but not all) contexts.
+
+// The exception is that g++ does not allow names which designate objects
+// on incomplete array types to be used as actual parameters in function
+// calls where the corresponding formal parameter is of a reference-to-array
+// type.
+
+// g++ does however allow other similar sorts of initializations of non-formal
+// reference objects.
+
+// 5/16/94 (jason): The 1/25/94 WP explicitly states in section 8.3.5 that
+// parameter types may not contain pointers or references to arrays of unknown
+// bound. g++ is correct.
+
+// keywords: reference types, array types, initialization, parameter passing
+
+typedef int u_array[];
+typedef u_array &u_array_ref;
+
+void take_u_array_ref (u_array_ref arg) { } // ERROR - reference to array of unknown bound in parmtype
+
+extern u_array u_array_gbl_obj;
+u_array_ref u_array_ref_gbl_obj0 = u_array_gbl_obj; // OK
+
+void test_local_initialization ()
+{
+ u_array_ref u_array_ref_lcl_obj0 = u_array_gbl_obj; // OK
+}
+
+void test_passing ()
+{
+ take_u_array_ref (u_array_gbl_obj);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C
new file mode 100755
index 0000000..d9488cf
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C
@@ -0,0 +1,40 @@
+// g++ 1.37.1 bug 900520_04
+
+// g++ does not yet support the initialization of scalar type objects
+// (including built-in arithmetic types, enum types, and pointer types)
+// via constructor initialization syntax except within a call to operator
+// new.
+
+// keywords: unimplemented, syntax, initialization, scalar types
+
+enum e_type { e_value };
+
+typedef char *charp;
+
+charp cp;
+
+int global_i (1); // gets bogus error
+double global_d (9.9); // gets bogus error
+charp global_cp0 (cp); // gets bogus error
+charp global_cp1 (0); // gets bogus error
+enum e_type global_e (e_value); // gets bogus error
+
+void func0 ()
+{
+ int local_i (1); // gets bogus error
+ double local_d (9.9); // gets bogus error
+ charp local_cp0 (cp); // gets bogus error
+ charp local_cp1 (0); // gets bogus error
+ enum e_type local_e (e_value); // gets bogus error
+}
+
+void func1 ()
+{
+ int* ip = new int (1); // gets bogus error
+ double* dp = new double (9.9); // gets bogus error
+ charp* cpp0 = new charp (cp); // gets bogus error
+ charp* cpp1 = new charp (0); // gets bogus error
+ enum e_type* ep = new e_type (e_value); // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C
new file mode 100755
index 0000000..d628ae3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C
@@ -0,0 +1,23 @@
+// g++ 1.37.1 bug 900520_05
+
+// The following legal code gets syntax errors from g++.
+
+// keywords: syntax, unimplemented, operator new, initialization, pointer types
+
+struct struct_0 {
+};
+
+char *cp;
+static struct_0 *sp;
+
+void test0 ()
+{
+ new char * (cp); // gets bogus error
+}
+
+void test1 ()
+{
+ new struct_0 * (sp); // gets bogus error
+}
+
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C
new file mode 100755
index 0000000..aa4ec9a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C
@@ -0,0 +1,78 @@
+// g++ 1.37.1 bug 900520_06
+
+// When an object of a class type is passed into a formal parameter of the
+// same class type (in a function call) the language definition calls for
+// this action to be treated like any other form of an initialization of
+// an object of the given class type.
+
+// g++ fails however to invoke the (compiler-supplied) copy constructor for
+// the class type when a parameter of the class type is passed as an
+// actual parameter.
+
+// This causes the following program to exit with a non-zero exit status.
+
+// cfront 2.0 passes this test.
+
+int base_copy_ctor_called = 0;
+int member_copy_ctor_called = 0;
+
+struct struct_0 {
+ struct_0 ();
+ struct_0 (const struct_0&);
+};
+
+struct_0::struct_0 ()
+{
+}
+
+struct_0::struct_0 (const struct_0&)
+{
+ base_copy_ctor_called++;
+}
+
+struct struct_1 {
+ struct_1 ();
+ struct_1 (const struct_1&);
+};
+
+struct_1::struct_1 ()
+{
+}
+
+struct_1::struct_1 (const struct_1&)
+{
+ member_copy_ctor_called++;
+}
+
+struct struct_2 : public struct_0 {
+ struct_2 ();
+ struct_1 struct_1_member;
+#ifdef MAKE_COPY_CONSTRUCTOR_EXPLICIT
+ struct_2 (const struct_2&);
+#endif
+};
+
+struct_2::struct_2 ()
+{
+}
+
+#ifdef MAKE_COPY_CONSTRUCTOR_EXPLICIT
+struct_2::struct_2 (const struct_2& arg) :
+ struct_0 ((struct_0&)arg),
+ struct_1_member (arg.struct_1_member)
+{
+}
+#endif
+
+void take_struct_2 (struct_2 arg)
+{
+}
+
+int test ()
+{
+ struct_2 struct_2_object0;
+ take_struct_2 (struct_2_object0);
+ return (base_copy_ctor_called != 1 || member_copy_ctor_called != 1);
+}
+
+int main () { return test (); }