OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [990424-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test that stack alignment is preserved with pending_stack_adjust
2
   with stdcall functions.  */
3
 
4
/* { dg-do run } */
5
/* { dg-require-effective-target ia32 } */
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.