1 // { dg-do run }
2 // { dg-options "-fms-extensions" }
3 // Test that an object-dependent reference to a member function can be
4 // used to produce a pointer to member function, as in VC++.
5 // Contributed by Jason Merrill <jason@cygnus.com>
6
7 struct A
8 {
fA9 int f(int a) { return 0; }
fA10 void f(int a, int b) { }
11 };
12
13 typedef int (A::* pmf1)(int);
14 typedef void (A::* pmf2)(int, int);
15
main()16 int main()
17 {
18 A a;
19 pmf1 fn1;
20 pmf2 fn2;
21
22 fn1 = a.f;
23 fn1 = (pmf1)a.f;
24 fn2 = (pmf2)a.f;
25 }
26