URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 384 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-require-effective-target lp64 } */
|
/* { dg-require-effective-target lp64 } */
|
/* { dg-options "-O2 -mno-sse" } */
|
/* { dg-options "-O2 -mno-sse" } */
|
|
|
#include <stdarg.h>
|
#include <stdarg.h>
|
#include <assert.h>
|
#include <assert.h>
|
|
|
int n1 = 30;
|
int n1 = 30;
|
int n2 = 324;
|
int n2 = 324;
|
void *n3 = (void *) &n2;
|
void *n3 = (void *) &n2;
|
int n4 = 407;
|
int n4 = 407;
|
|
|
int e1;
|
int e1;
|
int e2;
|
int e2;
|
void *e3;
|
void *e3;
|
int e4;
|
int e4;
|
|
|
static void
|
static void
|
__attribute__((noinline))
|
__attribute__((noinline))
|
foo (va_list va_arglist)
|
foo (va_list va_arglist)
|
{
|
{
|
e2 = va_arg (va_arglist, int);
|
e2 = va_arg (va_arglist, int);
|
e3 = va_arg (va_arglist, void *);
|
e3 = va_arg (va_arglist, void *);
|
e4 = va_arg (va_arglist, int);
|
e4 = va_arg (va_arglist, int);
|
}
|
}
|
|
|
static void
|
static void
|
__attribute__((noinline))
|
__attribute__((noinline))
|
test (int a1, ...)
|
test (int a1, ...)
|
{
|
{
|
e1 = a1;
|
e1 = a1;
|
va_list va_arglist;
|
va_list va_arglist;
|
va_start (va_arglist, a1);
|
va_start (va_arglist, a1);
|
foo (va_arglist);
|
foo (va_arglist);
|
va_end (va_arglist);
|
va_end (va_arglist);
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
test (n1, n2, n3, n4);
|
test (n1, n2, n3, n4);
|
assert (n1 == e1);
|
assert (n1 == e1);
|
assert (n2 == e2);
|
assert (n2 == e2);
|
assert (n3 == e3);
|
assert (n3 == e3);
|
assert (n4 == e4);
|
assert (n4 == e4);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.