aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
blob: f0cd9b75be80a38bda3edca279608cd95f6e5298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */

extern void (*func_p) (void);

void
foo (void)
{
  asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
}

/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */