ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/bpf/xbpf-indirect-call-1.c

22 lines
276 B
C

/* { dg-do compile } */
/* { dg-options "-mxbpf" } */
/* GCC should generate an indirect call instruction (call %REG)
when targetting xBPF. */
void
foo ()
{
;
}
void
bar()
{
void (*funp) () = &foo;
(*funp) ();
}
/* { dg-final { scan-assembler "call\t%r" } } */