OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 990424-1.c
1 /* Test that stack alignment is preserved with pending_stack_adjust
2    with stdcall functions.  */
3
4 /* { dg-do run { target i?86-*-* } } */
5 /* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
6 /* { dg-options -mpreferred-stack-boundary=4 } */
7
8 void __attribute__((stdcall)) foo(int a, int b, int c);
9
10 extern void abort (void);
11 extern void exit (int);
12
13 int
14 main ()
15 {
16   foo(1, 2, 3);
17   foo(1, 2, 3);
18   exit (0);
19 }
20
21 void __attribute__((stdcall))
22 foo(int a, int b, int c)
23 {
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 ();
30 }