OSDN Git Service

* c-decl.c (declspecs_add_type): Don't pedwarn for _Complex in
[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-options -mpreferred-stack-boundary=4 } */
6
7 void __attribute__((stdcall)) foo(int a, int b, int c);
8
9 extern void abort (void);
10 extern void exit (int);
11
12 int
13 main ()
14 {
15   foo(1, 2, 3);
16   foo(1, 2, 3);
17   exit (0);
18 }
19
20 void __attribute__((stdcall))
21 foo(int a, int b, int c)
22 {
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 ();
29 }