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].
4
5 struct A { int i; };
6 struct B : public A { };
7
main()8 int main ()
9 {
10 B b;
11
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;
17
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;
23
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;
29 }
30