1 // PR c++/39560
2 // { dg-options -Wunused }
3 
4 struct X { };
5 
6 class Z {
7 public:
8   X* cc(int c);
9 };
10 
11 class F {
12 public:
13   typedef X* (Z::*MethO)(int);
14   typedef X* (F::*MethF)(int);
15   template<MethO m>
xwrapper(int i)16   X* xwrapper(int i) {
17     union {
18       Z *z;
19       F *f;
20     };				// { dg-bogus "unused" }
21     f = this;
22     return ((z->*m)(i));
23   }
24 };
25 
26 F::MethF meth = &F::xwrapper<&Z::cc>;
27