aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bpf/xbpf-indirect-call-1.c
blob: dc4b3cfb12dc787f8841c51aa24315c5af9789aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { 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" } } */