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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [amd64-abi-4.c] - Blame information for rev 318

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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