2 /* { dg-require-ifunc "" } */
3 /* { dg-options "-Wno-pmf-conversions" } */
12 typedef int Func (Klass*);
14 static Func* resolver ();
17 int Klass::implementation (void)
19 printf ("'ere I am JH\n");
23 Klass::Func* Klass::resolver (void)
25 /* GCC guarantees this conversion to be safe and the resulting pointer
26 usable to call the member function using ordinary (i.e., non-member)
27 function call syntax. */
29 return reinterpret_cast<Func*>(&Klass::implementation);
32 int Klass::magic (void) __attribute__ ((ifunc ("_ZN5Klass8resolverEv")));
34 struct Klassier : Klass
42 return obj.magic () != 0;