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.c-torture/] [execute/] [va-arg-5.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
#include <stdarg.h>
2
 
3
va_double (int n, ...)
4
{
5
  va_list args;
6
 
7
  va_start (args, n);
8
 
9
  if (va_arg (args, double) != 3.141592)
10
    abort ();
11
  if (va_arg (args, double) != 2.71827)
12
    abort ();
13
  if (va_arg (args, double) != 2.2360679)
14
    abort ();
15
  if (va_arg (args, double) != 2.1474836)
16
    abort ();
17
 
18
  va_end (args);
19
}
20
 
21
va_long_double (int n, ...)
22
{
23
  va_list args;
24
 
25
  va_start (args, n);
26
 
27
  if (va_arg (args, long double) != 3.141592L)
28
    abort ();
29
  if (va_arg (args, long double) != 2.71827L)
30
    abort ();
31
  if (va_arg (args, long double) != 2.2360679L)
32
    abort ();
33
  if (va_arg (args, long double) != 2.1474836L)
34
    abort ();
35
 
36
  va_end (args);
37
}
38
 
39
main ()
40
{
41
  va_double (4, 3.141592, 2.71827, 2.2360679, 2.1474836);
42
  va_long_double (4, 3.141592L, 2.71827L, 2.2360679L, 2.1474836L);
43
  exit (0);
44
}

powered by: WebSVN 2.1.0

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