From: Jason Merrill Date: Thu, 25 Mar 1999 03:28:05 +0000 (-0500) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8b0126f617808155127ac3ceef7166af3edb5fa;p=gcc.git new From-SVN: r25968 --- 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 00000000000..918e69742d8 --- /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 00000000000..61a6e91d545 --- /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 00000000000..dc378b23e6f --- /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; +}