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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [struct-return-10_x.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include "compat-common.h"
2
 
3
#define T(TYPE)                                                 \
4
TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE;                \
5
TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE;                \
6
TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE;                \
7
TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE;                \
8
                                                                \
9
extern void init##TYPE (TYPE *p, double y);                     \
10
extern void checkg##TYPE (void);                                \
11
extern TYPE test0##TYPE (void);                                 \
12
extern TYPE test1##TYPE (TYPE);                                 \
13
extern TYPE testva##TYPE (int n, ...);                          \
14
                                                                \
15
void                                                            \
16
testit##TYPE (void)                                             \
17
{                                                               \
18
  TYPE rslt;                                                    \
19
  DEBUG_FPUTS (#TYPE);                                          \
20
  DEBUG_FPUTS (" init: ");                                      \
21
  init##TYPE  (&g01##TYPE,  1.0);                               \
22
  init##TYPE  (&g02##TYPE,  2.0);                               \
23
  init##TYPE  (&g03##TYPE,  3.0);                               \
24
  init##TYPE  (&g04##TYPE,  4.0);                               \
25
  init##TYPE  (&g05##TYPE,  5.0);                               \
26
  init##TYPE  (&g06##TYPE,  6.0);                               \
27
  init##TYPE  (&g07##TYPE,  7.0);                               \
28
  init##TYPE  (&g08##TYPE,  8.0);                               \
29
  init##TYPE  (&g09##TYPE,  9.0);                               \
30
  init##TYPE  (&g10##TYPE, 10.0);                               \
31
  init##TYPE  (&g11##TYPE, 11.0);                               \
32
  init##TYPE  (&g12##TYPE, 12.0);                               \
33
  init##TYPE  (&g13##TYPE, 13.0);                               \
34
  init##TYPE  (&g14##TYPE, 14.0);                               \
35
  init##TYPE  (&g15##TYPE, 15.0);                               \
36
  init##TYPE  (&g16##TYPE, 16.0);                               \
37
  checkg##TYPE ();                                              \
38
  DEBUG_NL;                                                     \
39
  DEBUG_FPUTS (#TYPE);                                          \
40
  DEBUG_FPUTS (" test0: ");                                     \
41
  rslt = test0##TYPE ();                                        \
42
  check##TYPE (rslt, 1.0);                                      \
43
  DEBUG_NL;                                                     \
44
  DEBUG_FPUTS (#TYPE);                                          \
45
  DEBUG_FPUTS (" test1: ");                                     \
46
  rslt = test1##TYPE (g01##TYPE);                               \
47
  check##TYPE (rslt, 1.0);                                      \
48
  DEBUG_NL;                                                     \
49
  DEBUG_FPUTS (#TYPE);                                          \
50
  DEBUG_FPUTS (" testva:");                                     \
51
  rslt = testva##TYPE (1, g01##TYPE);                           \
52
  check##TYPE (rslt, 1.0);                                      \
53
  rslt = testva##TYPE (5, g01##TYPE, g02##TYPE,                 \
54
                          g03##TYPE, g04##TYPE,                 \
55
                          g05##TYPE);                           \
56
  check##TYPE (rslt, 5.0);                                      \
57
  rslt = testva##TYPE (9, g01##TYPE, g02##TYPE,                 \
58
                          g03##TYPE, g04##TYPE,                 \
59
                          g05##TYPE, g06##TYPE,                 \
60
                          g07##TYPE, g08##TYPE,                 \
61
                          g09##TYPE);                           \
62
  check##TYPE (rslt, 9.0);                                      \
63
  rslt = testva##TYPE (16, g01##TYPE, g02##TYPE,                \
64
                          g03##TYPE, g04##TYPE,                 \
65
                          g05##TYPE, g06##TYPE,                 \
66
                          g07##TYPE, g08##TYPE,                 \
67
                          g09##TYPE, g10##TYPE,                 \
68
                          g11##TYPE, g12##TYPE,                 \
69
                          g13##TYPE, g14##TYPE,                 \
70
                          g15##TYPE, g16##TYPE);                \
71
  check##TYPE (rslt, 16.0);                                     \
72
  DEBUG_NL;                                                     \
73
}
74
 
75
#include "fp2-struct-defs.h"
76
#include "fp2-struct-check.h"
77
 
78
T(Sfd)
79
T(Sfl)
80
T(Sdf)
81
T(Sdl)
82
T(Slf)
83
T(Sld)
84
T(Sfdl)
85
T(Sfld)
86
T(Sdfl)
87
T(Sdlf)
88
T(Slfd)
89
T(Sldf)
90
 
91
#undef T
92
 
93
void
94
struct_return_10_x ()
95
{
96
DEBUG_INIT
97
 
98
#define T(TYPE) testit##TYPE ();
99
 
100
T(Sfd);
101
T(Sfl);
102
T(Sdf);
103
T(Sdl);
104
T(Slf);
105
T(Sld);
106
T(Sfdl);
107
T(Sfld);
108
T(Sdfl);
109
T(Sdlf);
110
T(Slfd);
111
T(Sldf);
112
 
113
DEBUG_FINI
114
 
115
if (fails != 0)
116
  return;
117
 
118
#undef T
119
}

powered by: WebSVN 2.1.0

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