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-5.c] - Rev 774

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

#include <stdarg.h>
 
va_double (int n, ...)
{
  va_list args;
 
  va_start (args, n);
 
  if (va_arg (args, double) != 3.141592)
    abort ();
  if (va_arg (args, double) != 2.71827)
    abort ();
  if (va_arg (args, double) != 2.2360679)
    abort ();
  if (va_arg (args, double) != 2.1474836)
    abort ();
 
  va_end (args);
}
 
va_long_double (int n, ...)
{
  va_list args;
 
  va_start (args, n);
 
  if (va_arg (args, long double) != 3.141592L)
    abort ();
  if (va_arg (args, long double) != 2.71827L)
    abort ();
  if (va_arg (args, long double) != 2.2360679L)
    abort ();
  if (va_arg (args, long double) != 2.1474836L)
    abort ();
 
  va_end (args);
}
 
main ()
{
  va_double (4, 3.141592, 2.71827, 2.2360679, 2.1474836);
  va_long_double (4, 3.141592L, 2.71827L, 2.2360679L, 2.1474836L);
  exit (0);
}
 

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

powered by: WebSVN 2.1.0

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