new
authorJason Merrill <jason@gcc.gnu.org>
Mon, 11 May 1998 11:57:04 +0000 (07:57 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 11 May 1998 11:57:04 +0000 (07:57 -0400)
From-SVN: r19672

gcc/testsuite/g++.old-deja/g++.mike/ns15.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.mike/s9959.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/redecl1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/using2.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/using3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns15.C b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C
new file mode 100644 (file)
index 0000000..3944052
--- /dev/null
@@ -0,0 +1,31 @@
+// Build don't link:
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#define MAX 256
+#define MAXSTATE 1000000
+
+struct R {
+  int count;
+  int state1;
+  int state2;
+};
+
+int cmp_d(const R* a, const R* b) {
+  return a->count > b->count;
+}
+
+namespace CXX {
+  template<class T, int i1, int i2>
+    inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) {
+    ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp);
+  }
+}
+
+using namespace CXX;
+
+void sort_machine() {
+  struct R d[MAX][MAX];
+  qsort<R,MAX> (d, cmp_d);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/s9959.C b/gcc/testsuite/g++.old-deja/g++.mike/s9959.C
new file mode 100644 (file)
index 0000000..654f7d5
--- /dev/null
@@ -0,0 +1,20 @@
+// Build don't link:
+
+class A {
+protected:
+  int aData;
+};
+class B : public A {
+public:
+  virtual void func1() { 
+    A::aData = 1;
+  }
+};
+
+class C : virtual public B {
+public:
+  virtual void func1(void) {
+    A::aData = 2;
+  }
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl1.C b/gcc/testsuite/g++.old-deja/g++.other/redecl1.C
new file mode 100644 (file)
index 0000000..6e25a9a
--- /dev/null
@@ -0,0 +1,6 @@
+//Build don't link:
+struct X{
+  void i();     // ERROR -
+  void i(int);
+  int i;        // ERROR - conflict
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using2.C b/gcc/testsuite/g++.old-deja/g++.other/using2.C
new file mode 100644 (file)
index 0000000..41887c4
--- /dev/null
@@ -0,0 +1,10 @@
+// Build don't link:
+struct X{
+  void f();        
+};
+
+struct Y:X{
+  void f(int);
+  void f();
+  using X::f;       // ERROR - conflict
+};                  // ERROR -
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using3.C b/gcc/testsuite/g++.old-deja/g++.other/using3.C
new file mode 100644 (file)
index 0000000..7d75d8a
--- /dev/null
@@ -0,0 +1,12 @@
+// Build don't link:
+struct A{
+  A();
+};
+
+typedef struct {
+  A i;
+} S;
+
+struct B: S{
+  using S::S;        // ERROR - no such field
+};