OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [struct-return-21_y.c] - Diff between revs 298 and 384

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

Rev 298 Rev 384
#include <stdarg.h>
#include <stdarg.h>
 
 
#include "compat-common.h"
#include "compat-common.h"
 
 
#include "mixed-struct-defs.h"
#include "mixed-struct-defs.h"
#include "mixed-struct-init.h"
#include "mixed-struct-init.h"
 
 
#define T(TYPE)                                                 \
#define T(TYPE)                                                 \
extern TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE;         \
extern TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE;         \
extern TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE;         \
extern TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE;         \
extern TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE;         \
extern TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE;         \
extern TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE;         \
extern TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE;         \
                                                                \
                                                                \
extern void check##TYPE (TYPE x, int i);                        \
extern void check##TYPE (TYPE x, int i);                        \
                                                                \
                                                                \
void                                                            \
void                                                            \
checkg##TYPE (void)                                             \
checkg##TYPE (void)                                             \
{                                                               \
{                                                               \
  check##TYPE (g01##TYPE,  1);                                  \
  check##TYPE (g01##TYPE,  1);                                  \
  check##TYPE (g02##TYPE,  2);                                  \
  check##TYPE (g02##TYPE,  2);                                  \
  check##TYPE (g03##TYPE,  3);                                  \
  check##TYPE (g03##TYPE,  3);                                  \
  check##TYPE (g04##TYPE,  4);                                  \
  check##TYPE (g04##TYPE,  4);                                  \
  check##TYPE (g05##TYPE,  5);                                  \
  check##TYPE (g05##TYPE,  5);                                  \
  check##TYPE (g06##TYPE,  6);                                  \
  check##TYPE (g06##TYPE,  6);                                  \
  check##TYPE (g07##TYPE,  7);                                  \
  check##TYPE (g07##TYPE,  7);                                  \
  check##TYPE (g08##TYPE,  8);                                  \
  check##TYPE (g08##TYPE,  8);                                  \
  check##TYPE (g09##TYPE,  9);                                  \
  check##TYPE (g09##TYPE,  9);                                  \
  check##TYPE (g10##TYPE, 10);                                  \
  check##TYPE (g10##TYPE, 10);                                  \
  check##TYPE (g11##TYPE, 11);                                  \
  check##TYPE (g11##TYPE, 11);                                  \
  check##TYPE (g12##TYPE, 12);                                  \
  check##TYPE (g12##TYPE, 12);                                  \
  check##TYPE (g13##TYPE, 13);                                  \
  check##TYPE (g13##TYPE, 13);                                  \
  check##TYPE (g14##TYPE, 14);                                  \
  check##TYPE (g14##TYPE, 14);                                  \
  check##TYPE (g15##TYPE, 15);                                  \
  check##TYPE (g15##TYPE, 15);                                  \
  check##TYPE (g16##TYPE, 16);                                  \
  check##TYPE (g16##TYPE, 16);                                  \
}                                                               \
}                                                               \
                                                                \
                                                                \
TYPE                                                            \
TYPE                                                            \
test0##TYPE (void)                                              \
test0##TYPE (void)                                              \
{                                                               \
{                                                               \
  return g01##TYPE;                                             \
  return g01##TYPE;                                             \
}                                                               \
}                                                               \
                                                                \
                                                                \
TYPE                                                            \
TYPE                                                            \
test1##TYPE (TYPE x01)                                          \
test1##TYPE (TYPE x01)                                          \
{                                                               \
{                                                               \
  return x01;                                                   \
  return x01;                                                   \
}                                                               \
}                                                               \
                                                                \
                                                                \
TYPE                                                            \
TYPE                                                            \
testva##TYPE (int n, ...)                                       \
testva##TYPE (int n, ...)                                       \
{                                                               \
{                                                               \
  int i;                                                        \
  int i;                                                        \
  TYPE rslt;                                                    \
  TYPE rslt;                                                    \
  va_list ap;                                                   \
  va_list ap;                                                   \
  va_start (ap, n);                                             \
  va_start (ap, n);                                             \
  for (i = 0; i < n; i++)                                        \
  for (i = 0; i < n; i++)                                        \
      rslt = va_arg (ap, TYPE);                                 \
      rslt = va_arg (ap, TYPE);                                 \
  va_end (ap);                                                  \
  va_end (ap);                                                  \
  return rslt;                                                  \
  return rslt;                                                  \
}
}
 
 
T(Sfi)
T(Sfi)
T(Sfii)
T(Sfii)
T(Sfifi)
T(Sfifi)
T(Sfiifii)
T(Sfiifii)
 
 

powered by: WebSVN 2.1.0

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