1 // PR c++/44619 2 // { dg-do compile } 3 // { dg-options "-Wunused -W" } 4 5 struct S { int x, y; }; 6 7 int f1()8f1 () 9 { 10 struct S p; 11 int S::*q = &S::x; 12 p.*q = 5; 13 return p.*q; 14 } 15 16 int f2(struct S * p,int S::* q)17f2 (struct S *p, int S::*q) 18 { 19 struct S *r = p; 20 int S::*s = q; 21 return r->*s; 22 } 23