Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / 990424-1.c
blob95628e12fa51b53c706e4c5b71b4a9dd8b1101a8
1 /* Test that stack alignment is preserved with pending_stack_adjust
2 with stdcall functions. */
4 /* { dg-do run } */
5 /* { dg-require-effective-target ilp32 } */
6 /* { dg-options -mpreferred-stack-boundary=4 } */
8 void __attribute__((stdcall)) foo(int a, int b, int c);
10 extern void abort (void);
11 extern void exit (int);
13 int
14 main ()
16 foo(1, 2, 3);
17 foo(1, 2, 3);
18 exit (0);
21 void __attribute__((stdcall))
22 foo(int a, int b, int c)
24 static int last_align = -1;
25 int dummy, align = (int)&dummy & 15;
26 if (last_align < 0)
27 last_align = align;
28 else if (align != last_align)
29 abort ();