URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* This used to segfault on SPARC 64-bit at runtime because
|
/* This used to segfault on SPARC 64-bit at runtime because
|
the stack pointer was clobbered by the function call. */
|
the stack pointer was clobbered by the function call. */
|
|
|
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
#include <stdarg.h>
|
#include <stdarg.h>
|
|
|
union U
|
union U
|
{
|
{
|
long l1[2];
|
long l1[2];
|
};
|
};
|
|
|
union U u;
|
union U u;
|
|
|
void foo (int z, ...)
|
void foo (int z, ...)
|
{
|
{
|
int i;
|
int i;
|
va_list ap;
|
va_list ap;
|
va_start(ap,z);
|
va_start(ap,z);
|
i = va_arg(ap, int);
|
i = va_arg(ap, int);
|
va_end(ap);
|
va_end(ap);
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
foo (1, 1, 1, 1, 1, u);
|
foo (1, 1, 1, 1, 1, u);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.