3 /* { dg-options "-O3" } */
4 /* { dg-require-ifunc "" } */
15 do_it_right_at_runtime_A ()
21 do_it_right_at_runtime_B ()
26 static inline void do_it_right_at_runtime (void);
28 void do_it_right_at_runtime (void)
29 __attribute__ ((ifunc ("resolve_do_it_right_at_runtime")));
31 static void (*resolve_do_it_right_at_runtime (void)) (void)
37 /* Use intermediate variable to get a warning for non-matching
39 typeof(do_it_right_at_runtime
) *func
;
41 func
= do_it_right_at_runtime_A
;
43 func
= do_it_right_at_runtime_B
;
51 const unsigned int ITERS
= 10;
53 for (int i
= ITERS
; i
> 0; i
--)
55 do_it_right_at_runtime ();
61 if (resolved_fn
!= 10)