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-6.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" } */
4
 
5
#include <stdarg.h>
6
#include <assert.h>
7
 
8
int n1 = 30;
9
double n2 = 324;
10
double n3 = 39494.94;
11
double n4 = 407;
12
double n5 = 32.304;
13
double n6 = 394.14;
14
double n7 = 4.07;
15
double n8 = 32.4;
16
double n9 = 314.194;
17
double n10 = 0.1407;
18
 
19
int e1;
20
double e2;
21
double e3;
22
double e4;
23
double e5;
24
double e6;
25
double e7;
26
double e8;
27
double e9;
28
double e10;
29
 
30
static void
31
__attribute__((noinline))
32
foo (va_list va_arglist)
33
{
34
  e2 = va_arg (va_arglist, double);
35
  e3 = va_arg (va_arglist, double);
36
  e4 = va_arg (va_arglist, double);
37
  e5 = va_arg (va_arglist, double);
38
  e6 = va_arg (va_arglist, double);
39
  e7 = va_arg (va_arglist, double);
40
  e8 = va_arg (va_arglist, double);
41
  e9 = va_arg (va_arglist, double);
42
  e10 = va_arg (va_arglist, double);
43
}
44
 
45
static void
46
__attribute__((noinline))
47
test (int a1, ...)
48
{
49
  va_list va_arglist;
50
  e1 = a1;
51
  va_start (va_arglist, a1);
52
  foo (va_arglist);
53
  va_end (va_arglist);
54
}
55
 
56
int
57
main ()
58
{
59
  test (n1, n2, n3, n4, n5, n6, n7, n8, n9, n10);
60
  assert (n1 == e1);
61
  assert (n2 == e2);
62
  assert (n3 == e3);
63
  assert (n4 == e4);
64
  assert (n5 == e5);
65
  assert (n6 == e6);
66
  assert (n7 == e7);
67
  assert (n8 == e8);
68
  assert (n9 == e9);
69
  assert (n10 == e10);
70
  return 0;
71
}

powered by: WebSVN 2.1.0

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