OSDN Git Service

new
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Mar 1999 03:28:05 +0000 (03:28 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Mar 1999 03:28:05 +0000 (03:28 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25968 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.other/conv6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/lookup11.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv6.C b/gcc/testsuite/g++.old-deja/g++.other/conv6.C
new file mode 100644 (file)
index 0000000..918e697
--- /dev/null
@@ -0,0 +1,28 @@
+// Test for composite pointer types, as defined in [expr.rel],
+// and common pointer to member types, as defined in [expr.eq].
+
+struct A { int i; };
+struct B : public A { };
+
+int main ()
+{
+  B b;
+
+  // The composite type is `A const *'
+        A* ap = &b;
+  const B* bp = &b;
+  if (ap != bp)                // gets bogus error - distinct types XFAIL *-*-*
+    return 1;
+
+  // The composite type is `B const *const *'
+  B       *const * p = 0;
+  B const *      * q = 0;
+  if (p != q)          // gets bogus error - distinct types XFAIL *-*-*
+    return 1;
+
+  // The common type is `int const B::*'
+  const int A::*apm = &A::i;
+        int B::*bpm = &A::i;
+  if (apm != bpm)      // gets bogus error - distinct types XFAIL *-*-*
+    return 1;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup11.C b/gcc/testsuite/g++.old-deja/g++.other/lookup11.C
new file mode 100644 (file)
index 0000000..61a6e91
--- /dev/null
@@ -0,0 +1,12 @@
+// Build don't link:
+
+namespace A {
+  int i;
+}
+using namespace A;
+namespace B {
+  int i;
+}
+using namespace B;
+
+int i;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
new file mode 100644 (file)
index 0000000..dc378b2
--- /dev/null
@@ -0,0 +1,12 @@
+// Test to make sure g++ can handle target types that aren't identical
+// with pointers to members.
+
+struct A { int i; };
+struct B : public A { };
+
+int main ()
+{
+  int A::*p = &A::i;
+  const int B::*q = &A::i;
+  return p != q;
+}