aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-03-24 22:28:05 -0500
committerJason Merrill <jason@gcc.gnu.org>1999-03-24 22:28:05 -0500
commitb8b0126f617808155127ac3ceef7166af3edb5fa (patch)
tree64aeb8b11d70bf4344b84c6cb9cfcbc8160ce4f4 /gcc
parent5b163de4083bc0d51829489c9a08c7357a5de20c (diff)
downloadgcc-b8b0126f617808155127ac3ceef7166af3edb5fa.zip
gcc-b8b0126f617808155127ac3ceef7166af3edb5fa.tar.gz
gcc-b8b0126f617808155127ac3ceef7166af3edb5fa.tar.bz2
new
From-SVN: r25968
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/conv6.C28
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/lookup11.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C12
3 files changed, 52 insertions, 0 deletions
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
index 0000000..918e697
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/conv6.C
@@ -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
index 0000000..61a6e91d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/lookup11.C
@@ -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
index 0000000..dc378b2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
@@ -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;
+}