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-6.c] - Blame information for rev 711

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
#include <stdarg.h>
2
 
3
f (int n, ...)
4
{
5
  va_list args;
6
 
7
  va_start (args, n);
8
 
9
  if (va_arg (args, int) != 10)
10
    abort ();
11
  if (va_arg (args, long long) != 10000000000LL)
12
    abort ();
13
  if (va_arg (args, int) != 11)
14
    abort ();
15
  if (va_arg (args, long double) != 3.14L)
16
    abort ();
17
  if (va_arg (args, int) != 12)
18
    abort ();
19
  if (va_arg (args, int) != 13)
20
    abort ();
21
  if (va_arg (args, long long) != 20000000000LL)
22
    abort ();
23
  if (va_arg (args, int) != 14)
24
    abort ();
25
  if (va_arg (args, double) != 2.72)
26
    abort ();
27
 
28
  va_end(args);
29
}
30
 
31
main ()
32
{
33
  f (4, 10, 10000000000LL, 11, 3.14L, 12, 13, 20000000000LL, 14, 2.72);
34
  exit (0);
35
}

powered by: WebSVN 2.1.0

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