diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/local.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/local.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/local.c b/gcc/testsuite/gcc.target/i386/local.c new file mode 100644 index 00000000000..2fda2a2fc99 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/local.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -funit-at-a-time" } */ +/* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ilp32 } } } */ +/* { dg-final { scan-assembler "magic\[^\\n\]*edi" { target lp64 } } } */ + +/* Verify that local calling convention is used. */ +static t(int) __attribute__ ((noinline)); +m() +{ + t(1); +} +static t(int a) +{ + asm("magic %0"::"g"(a)); +} |