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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [va-arg-16.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
#include <stdarg.h>
2
 
3
typedef double TYPE;
4
 
5
void vafunction (TYPE dummy1, TYPE dummy2, ...)
6
{
7
  va_list ap;
8
 
9
  va_start(ap, dummy2);
10
  if (dummy1 != 888.)
11
    abort();
12
  if (dummy2 != 999.)
13
    abort();
14
  if (va_arg (ap, TYPE) != 1.)
15
    abort();
16
  if (va_arg (ap, TYPE) != 2.)
17
    abort();
18
  if (va_arg (ap, TYPE) != 3.)
19
    abort();
20
  if (va_arg (ap, TYPE) != 4.)
21
    abort();
22
  if (va_arg (ap, TYPE) != 5.)
23
    abort();
24
  if (va_arg (ap, TYPE) != 6.)
25
    abort();
26
  if (va_arg (ap, TYPE) != 7.)
27
    abort();
28
  if (va_arg (ap, TYPE) != 8.)
29
    abort();
30
  if (va_arg (ap, TYPE) != 9.)
31
    abort();
32
  va_end(ap);
33
}
34
 
35
 
36
int main (void)
37
{
38
  vafunction( 888., 999., 1., 2., 3., 4., 5., 6., 7., 8., 9. );
39
  exit(0);
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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