1 // { dg-do run  }
2 //Check association of member pointer in overload resolution.
3 struct A {
4 	int m_val;
5 	friend int operator ->* (A & other, int A::*pm)
6 		{ return 31; }
7 };
8 
9 int A::*pi = & A::m_val;
10 
11 int
main(void)12 main(void)
13 {
14 	A c;
15 	c.m_val = 42;
16 	int j = c ->* pi;
17 
18 	if (j == 31)
19 		return 0;
20 	else
21 		return 1;
22 }
23