summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/local.c
blob: f4444951e123e31f3827cdd75ee53cb9caad8806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -funit-at-a-time" } */
/* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ia32 } } } */
/* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! ia32 } } } } */

/* Verify that local calling convention is used.  */
static void t(int) __attribute__ ((noinline));
extern volatile int i;

void m(void)
{
	t(i);
}

static void t(int a)
{
	asm("magic %0"::"g"(a));
}