FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / 990424-1.c
blob00b476427f3e4814d646f808586429d5e280d431
1 /* Test that stack alignment is preserved with pending_stack_adjust
2 with stdcall functions. */
4 /* { dg-do run { target i?86-*-* } } */
5 /* { dg-options -mpreferred-stack-boundary=4 } */
7 void __attribute__((stdcall)) foo(int a, int b, int c);
9 extern void abort (void);
10 extern void exit (int);
12 int
13 main ()
15 foo(1, 2, 3);
16 foo(1, 2, 3);
17 exit (0);
20 void __attribute__((stdcall))
21 foo(int a, int b, int c)
23 static int last_align = -1;
24 int dummy, align = (int)&dummy & 15;
25 if (last_align < 0)
26 last_align = align;
27 else if (align != last_align)
28 abort ();