2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / conv6.C
blob7a299553e7d1309b1bb01f6b5b385c44fff7b359
1 // { dg-do run  }
2 // Test for composite pointer types, as defined in [expr.rel],
3 // and common pointer to member types, as defined in [expr.eq].
5 struct A { int i; };
6 struct B : public A { };
8 int main ()
10   B b;
12   // The composite type is `A const *'
13         A* ap = &b;
14   const B* bp = &b;
15   if (ap != bp)         // { dg-bogus "" } distinct types
16     return 1;
18   // The composite type is `B const *const *'
19   B       *const * p = 0;
20   B const *      * q = 0;
21   if (p != q)           // { dg-bogus "" } distinct types
22     return 1;
24   // The common type is `int const B::*'
25   const int A::*apm = &A::i;
26         int B::*bpm = &A::i;
27   if (apm != bpm)       // { dg-bogus "" } distinct types
28     return 1;