1 // Copyright (C) 2007 Free Software Foundation
2 // Contributed by Ollie Wild <aaw@google.com>
3 // { dg-do compile }
4
5 // Test implicit conversion of pointers to member functions appearing as
6 // operands of the equality operators.
7
8 struct B { };
9
10 struct BV { };
11
12 struct D : B, virtual BV { };
13
14 struct C { };
15
f()16 void f ()
17 {
18 void (D::*pd) () = 0;
19 void (B::*pb) () = 0;
20 void (BV::*pbv) () = 0;
21 void (C::*pc) () = 0;
22
23 pd == pb;
24 pd == pbv; // { dg-error "" }
25 pd == pc; // { dg-error "comparison between distinct pointer-to-member types" }
26 }
27