| 1 |
// { dg-do run } |
| 2 |
// Test that comparison of pointers to members does not complain about |
| 3 |
// contravariance violation. |
| 4 |
|
| 5 |
struct A { int i; }; |
| 6 |
struct B : public A { int j; int f (); }; |
| 7 |
int main () |
| 8 |
{ |
| 9 |
int A::*apm = &A::i; |
| 10 |
int B::*bpm = apm; |
| 11 |
return apm != bpm; |
| 12 |
} |