1 /* { dg-do run }  */
2 /* { dg-require-ifunc "" } */
3 /* { dg-options "" } */
4 
5 #include <stdio.h>
6 
7 static int __attribute__((noinline))
implementation(void * ptr)8      implementation (void *ptr)
9 {
10   if (ptr)
11     return ((int (*) (void *))ptr) (0);
12 
13   printf ("'ere I am JH\n");
14   return 0;
15 }
16 
__typeof__(implementation)17 static __typeof__ (implementation) *resolver (void)
18 {
19   return (void *)implementation;
20 }
21 
22 extern int magic (void *) __attribute__ ((ifunc ("resolver")));
23 
main()24 int main ()
25 {
26   return magic ((void *)magic);
27 }
28