2 /* { dg-require-ifunc "" } */
3 /* { dg-options "-Wno-pmf-conversions" } */
9 virtual int magic () = 0;
12 struct Klassier : Klass
14 int implementation ();
17 typedef int Func (Klass*);
19 static Func* resolver ();
22 int Klassier::implementation (void)
24 printf ("'ere I am JH\n");
28 Klassier::Func* Klassier::resolver ()
30 /* GCC guarantees this conversion to be safe and the resulting pointer
31 usable to call the member function using ordinary (i.e., non-member)
32 function call syntax. */
34 return reinterpret_cast<Func*>(&Klassier::implementation);
37 int Klassier::magic (void) __attribute__ ((ifunc ("_ZN8Klassier8resolverEv")));
39 int __attribute__ ((weak)) Foo (Klass &base)
48 return Foo (obj) != 0;