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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [union-2.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* This used to segfault on SPARC 64-bit at runtime because
2
   the stack pointer was clobbered by the function call.   */
3
 
4
/* { dg-do run } */
5
 
6
#include <stdarg.h>
7
 
8
union U
9
{
10
  long l1[2];
11
};
12
 
13
union U u;
14
 
15
void foo (int z, ...)
16
{
17
  int i;
18
  va_list ap;
19
  va_start(ap,z);
20
  i = va_arg(ap, int);
21
  va_end(ap);
22
}
23
 
24
int main(void)
25
{
26
  foo (1, 1, 1, 1, 1, u);
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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