summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/regparm-stdcall.c
blob: 144f5f99e329c3c5e8b9db110436354f81042e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run } */
/* { dg-options -mpreferred-stack-boundary=4 } */
/* { dg-require-effective-target ilp32 } */

extern void abort(void);

void __attribute__((regparm(2), stdcall)) foo(int i, int j, float x)
{
  static int last_align = -1;
  int dummy, align = (int)&dummy & 15;
  if (last_align < 0)
    last_align = align;
  else if (align != last_align)
    abort ();
}

int main()
{
	foo(0,0,0.0);
	foo(0,0,0.0);
	return 0;
}