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.dg/] [compat/] [struct-return-21_x.c] - Diff between revs 298 and 338

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

Rev 298 Rev 338
#include "compat-common.h"
#include "compat-common.h"
 
 
#ifdef SKIP_VA
#ifdef SKIP_VA
const int test_va = 0;
const int test_va = 0;
#else
#else
const int test_va = 1;
const int test_va = 1;
#endif
#endif
 
 
#define T(TYPE)                                                 \
#define T(TYPE)                                                 \
TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE;                \
TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE;                \
TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE;                \
TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE;                \
TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE;                \
TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE;                \
TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE;                \
TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE;                \
                                                                \
                                                                \
extern void init##TYPE (TYPE *p, int i);                        \
extern void init##TYPE (TYPE *p, int i);                        \
extern void checkg##TYPE (void);                                \
extern void checkg##TYPE (void);                                \
extern TYPE test0##TYPE (void);                                 \
extern TYPE test0##TYPE (void);                                 \
extern TYPE test1##TYPE (TYPE);                                 \
extern TYPE test1##TYPE (TYPE);                                 \
extern TYPE testva##TYPE (int n, ...);                          \
extern TYPE testva##TYPE (int n, ...);                          \
                                                                \
                                                                \
void                                                            \
void                                                            \
testit##TYPE (void)                                             \
testit##TYPE (void)                                             \
{                                                               \
{                                                               \
  TYPE rslt;                                                    \
  TYPE rslt;                                                    \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (" init: ");                                      \
  DEBUG_FPUTS (" init: ");                                      \
  init##TYPE  (&g01##TYPE,  1);                                 \
  init##TYPE  (&g01##TYPE,  1);                                 \
  init##TYPE  (&g02##TYPE,  2);                                 \
  init##TYPE  (&g02##TYPE,  2);                                 \
  init##TYPE  (&g03##TYPE,  3);                                 \
  init##TYPE  (&g03##TYPE,  3);                                 \
  init##TYPE  (&g04##TYPE,  4);                                 \
  init##TYPE  (&g04##TYPE,  4);                                 \
  init##TYPE  (&g05##TYPE,  5);                                 \
  init##TYPE  (&g05##TYPE,  5);                                 \
  init##TYPE  (&g06##TYPE,  6);                                 \
  init##TYPE  (&g06##TYPE,  6);                                 \
  init##TYPE  (&g07##TYPE,  7);                                 \
  init##TYPE  (&g07##TYPE,  7);                                 \
  init##TYPE  (&g08##TYPE,  8);                                 \
  init##TYPE  (&g08##TYPE,  8);                                 \
  init##TYPE  (&g09##TYPE,  9);                                 \
  init##TYPE  (&g09##TYPE,  9);                                 \
  init##TYPE  (&g10##TYPE, 10);                                 \
  init##TYPE  (&g10##TYPE, 10);                                 \
  init##TYPE  (&g11##TYPE, 11);                                 \
  init##TYPE  (&g11##TYPE, 11);                                 \
  init##TYPE  (&g12##TYPE, 12);                                 \
  init##TYPE  (&g12##TYPE, 12);                                 \
  init##TYPE  (&g13##TYPE, 13);                                 \
  init##TYPE  (&g13##TYPE, 13);                                 \
  init##TYPE  (&g14##TYPE, 14);                                 \
  init##TYPE  (&g14##TYPE, 14);                                 \
  init##TYPE  (&g15##TYPE, 15);                                 \
  init##TYPE  (&g15##TYPE, 15);                                 \
  init##TYPE  (&g16##TYPE, 16);                                 \
  init##TYPE  (&g16##TYPE, 16);                                 \
  checkg##TYPE ();                                              \
  checkg##TYPE ();                                              \
  DEBUG_NL;                                                     \
  DEBUG_NL;                                                     \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (" test0: ");                                     \
  DEBUG_FPUTS (" test0: ");                                     \
  rslt = test0##TYPE ();                                        \
  rslt = test0##TYPE ();                                        \
  check##TYPE (rslt, 1);                                        \
  check##TYPE (rslt, 1);                                        \
  DEBUG_NL;                                                     \
  DEBUG_NL;                                                     \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (#TYPE);                                          \
  DEBUG_FPUTS (" test1: ");                                     \
  DEBUG_FPUTS (" test1: ");                                     \
  rslt = test1##TYPE (g01##TYPE);                               \
  rslt = test1##TYPE (g01##TYPE);                               \
  check##TYPE (rslt, 1);                                        \
  check##TYPE (rslt, 1);                                        \
  if (test_va)                                                  \
  if (test_va)                                                  \
    {                                                           \
    {                                                           \
      DEBUG_NL;                                                 \
      DEBUG_NL;                                                 \
      DEBUG_FPUTS (#TYPE);                                      \
      DEBUG_FPUTS (#TYPE);                                      \
      DEBUG_FPUTS (" testva: ");                                \
      DEBUG_FPUTS (" testva: ");                                \
      rslt = testva##TYPE (1, g01##TYPE);                       \
      rslt = testva##TYPE (1, g01##TYPE);                       \
      check##TYPE (rslt, 1);                                    \
      check##TYPE (rslt, 1);                                    \
      rslt = testva##TYPE (5, g01##TYPE, g02##TYPE,             \
      rslt = testva##TYPE (5, g01##TYPE, g02##TYPE,             \
                           g03##TYPE, g04##TYPE,                \
                           g03##TYPE, g04##TYPE,                \
                           g05##TYPE);                          \
                           g05##TYPE);                          \
      check##TYPE (rslt, 5);                                    \
      check##TYPE (rslt, 5);                                    \
      rslt = testva##TYPE (9, g01##TYPE, g02##TYPE,             \
      rslt = testva##TYPE (9, g01##TYPE, g02##TYPE,             \
                           g03##TYPE, g04##TYPE,                \
                           g03##TYPE, g04##TYPE,                \
                           g05##TYPE, g06##TYPE,                \
                           g05##TYPE, g06##TYPE,                \
                           g07##TYPE, g08##TYPE,                \
                           g07##TYPE, g08##TYPE,                \
                           g09##TYPE);                          \
                           g09##TYPE);                          \
      check##TYPE (rslt, 9);                                    \
      check##TYPE (rslt, 9);                                    \
      rslt = testva##TYPE (16, g01##TYPE, g02##TYPE,            \
      rslt = testva##TYPE (16, g01##TYPE, g02##TYPE,            \
                           g03##TYPE, g04##TYPE,                \
                           g03##TYPE, g04##TYPE,                \
                           g05##TYPE, g06##TYPE,                \
                           g05##TYPE, g06##TYPE,                \
                           g07##TYPE, g08##TYPE,                \
                           g07##TYPE, g08##TYPE,                \
                           g09##TYPE, g10##TYPE,                \
                           g09##TYPE, g10##TYPE,                \
                           g11##TYPE, g12##TYPE,                \
                           g11##TYPE, g12##TYPE,                \
                           g13##TYPE, g14##TYPE,                \
                           g13##TYPE, g14##TYPE,                \
                           g15##TYPE, g16##TYPE);               \
                           g15##TYPE, g16##TYPE);               \
      check##TYPE (rslt, 16);                                   \
      check##TYPE (rslt, 16);                                   \
    }                                                           \
    }                                                           \
  DEBUG_NL;                                                     \
  DEBUG_NL;                                                     \
}
}
 
 
#include "mixed-struct-defs.h"
#include "mixed-struct-defs.h"
#include "mixed-struct-check.h"
#include "mixed-struct-check.h"
 
 
T(Sfi)
T(Sfi)
T(Sfii)
T(Sfii)
T(Sfifi)
T(Sfifi)
T(Sfiifii)
T(Sfiifii)
 
 
#undef T
#undef T
 
 
void
void
struct_return_21_x ()
struct_return_21_x ()
{
{
DEBUG_INIT
DEBUG_INIT
 
 
#define T(TYPE) testit##TYPE ();
#define T(TYPE) testit##TYPE ();
 
 
T(Sfi)
T(Sfi)
T(Sfii)
T(Sfii)
T(Sfifi)
T(Sfifi)
T(Sfiifii)
T(Sfiifii)
 
 
DEBUG_FINI
DEBUG_FINI
 
 
if (fails != 0)
if (fails != 0)
  abort ();
  abort ();
 
 
#undef T
#undef T
}
}
 
 

powered by: WebSVN 2.1.0

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