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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr44942.c] - Diff between revs 297 and 338

Only display areas with differences | Details | Blame | View Log

Rev 297 Rev 338
/* PR target/44942 */
/* PR target/44942 */
 
 
#include <stdarg.h>
#include <stdarg.h>
 
 
void
void
test1 (int a, int b, int c, int d, int e, int f, int g, long double h, ...)
test1 (int a, int b, int c, int d, int e, int f, int g, long double h, ...)
{
{
  int i;
  int i;
  va_list ap;
  va_list ap;
 
 
  va_start (ap, h);
  va_start (ap, h);
  i = va_arg (ap, int);
  i = va_arg (ap, int);
  if (i != 1234)
  if (i != 1234)
    __builtin_abort ();
    __builtin_abort ();
  va_end (ap);
  va_end (ap);
}
}
 
 
void
void
test2 (int a, int b, int c, int d, int e, int f, int g, long double h, int i,
test2 (int a, int b, int c, int d, int e, int f, int g, long double h, int i,
       long double j, int k, long double l, int m, long double n, ...)
       long double j, int k, long double l, int m, long double n, ...)
{
{
  int o;
  int o;
  va_list ap;
  va_list ap;
 
 
  va_start (ap, n);
  va_start (ap, n);
  o = va_arg (ap, int);
  o = va_arg (ap, int);
  if (o != 1234)
  if (o != 1234)
    __builtin_abort ();
    __builtin_abort ();
  va_end (ap);
  va_end (ap);
}
}
 
 
void
void
test3 (double a, double b, double c, double d, double e, double f,
test3 (double a, double b, double c, double d, double e, double f,
       double g, long double h, ...)
       double g, long double h, ...)
{
{
  double i;
  double i;
  va_list ap;
  va_list ap;
 
 
  va_start (ap, h);
  va_start (ap, h);
  i = va_arg (ap, double);
  i = va_arg (ap, double);
  if (i != 1234.0)
  if (i != 1234.0)
    __builtin_abort ();
    __builtin_abort ();
  va_end (ap);
  va_end (ap);
}
}
 
 
void
void
test4 (double a, double b, double c, double d, double e, double f, double g,
test4 (double a, double b, double c, double d, double e, double f, double g,
       long double h, double i, long double j, double k, long double l,
       long double h, double i, long double j, double k, long double l,
       double m, long double n, ...)
       double m, long double n, ...)
{
{
  double o;
  double o;
  va_list ap;
  va_list ap;
 
 
  va_start (ap, n);
  va_start (ap, n);
  o = va_arg (ap, double);
  o = va_arg (ap, double);
  if (o != 1234.0)
  if (o != 1234.0)
    __builtin_abort ();
    __builtin_abort ();
  va_end (ap);
  va_end (ap);
}
}
 
 
int
int
main ()
main ()
{
{
  test1 (0, 0, 0, 0, 0, 0, 0, 0.0L, 1234);
  test1 (0, 0, 0, 0, 0, 0, 0, 0.0L, 1234);
  test2 (0, 0, 0, 0, 0, 0, 0, 0.0L, 0, 0.0L, 0, 0.0L, 0, 0.0L, 1234);
  test2 (0, 0, 0, 0, 0, 0, 0, 0.0L, 0, 0.0L, 0, 0.0L, 0, 0.0L, 1234);
  test3 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 1234.0);
  test3 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 1234.0);
  test4 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 0.0, 0.0L,
  test4 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 0.0, 0.0L,
         0.0, 0.0L, 0.0, 0.0L, 1234.0);
         0.0, 0.0L, 0.0, 0.0L, 1234.0);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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