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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run { target { ! { ia32 } } } } */
2
/* { dg-options "-O2 -mno-sse" } */
3
 
4
#include <stdarg.h>
5
#include <assert.h>
6
 
7
int n1 = 30;
8
int n2 = 324;
9
void *n3 = (void *) &n2;
10
int n4 = 407;
11
 
12
int e1;
13
int e2;
14
void *e3;
15
int e4;
16
 
17
static void
18
__attribute__((noinline))
19
foo (va_list va_arglist)
20
{
21
  e2 = va_arg (va_arglist, int);
22
  e3 = va_arg (va_arglist, void *);
23
  e4 = va_arg (va_arglist, int);
24
}
25
 
26
static void
27
__attribute__((noinline))
28
test (int a1, ...)
29
{
30
  e1 = a1;
31
  va_list va_arglist;
32
  va_start (va_arglist, a1);
33
  foo (va_arglist);
34
  va_end (va_arglist);
35
}
36
 
37
int
38
main ()
39
{
40
  test (n1, n2, n3, n4);
41
  assert (n1 == e1);
42
  assert (n2 == e2);
43
  assert (n3 == e3);
44
  assert (n4 == e4);
45
  return 0;
46
}

powered by: WebSVN 2.1.0

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