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