1// { dg-do run  }
2// Test that const-correctness is observed when using pointers-to-members.
3
4struct A {
5  int f () { return 1; }
6  int f () const { return 0; }
7};
8
9struct B {
10  A a;
11  B() { }
12};
13
14int main ()
15{
16  A B::*bm = &B::a;
17  const B b;
18  return (b.*bm).f ();
19}
20