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-by-value-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
#include "fp2-struct-defs.h"
4
#include "fp2-struct-check.h"
5
 
6
#define TEST(TYPE)                                              \
7
TYPE g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE;                \
8
TYPE g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE;                \
9
TYPE g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE;             \
10
TYPE g13s##TYPE, g14s##TYPE, g15s##TYPE, g16s##TYPE;            \
11
                                                                \
12
extern void init##TYPE (TYPE *p, double x);                     \
13
extern void checkg##TYPE (void);                                \
14
extern void                                                     \
15
test##TYPE (TYPE s1, TYPE s2, TYPE s3, TYPE s4,                 \
16
            TYPE s5, TYPE s6, TYPE s7, TYPE s8,                 \
17
            TYPE s9, TYPE s10, TYPE s11, TYPE s12,              \
18
            TYPE s13, TYPE s14, TYPE s15, TYPE s16);            \
19
extern void testva##TYPE (int n, ...);                          \
20
                                                                \
21
void                                                            \
22
test2_##TYPE (TYPE s1, TYPE s2, TYPE s3, TYPE s4,               \
23
              TYPE s5, TYPE s6, TYPE s7, TYPE s8)               \
24
{                                                               \
25
  test##TYPE (s1, g2s##TYPE, s2, g4s##TYPE,                     \
26
              s3, g6s##TYPE, s4, g8s##TYPE,                     \
27
              s5, g10s##TYPE, s6, g12s##TYPE,                   \
28
              s7, g14s##TYPE, s8, g16s##TYPE);                  \
29
}                                                               \
30
                                                                \
31
void                                                            \
32
testit##TYPE (void)                                             \
33
{                                                               \
34
  DEBUG_FPUTS (#TYPE);                                          \
35
  DEBUG_FPUTS (" init: ");                                      \
36
  init##TYPE  ( &g1s##TYPE,  (double)1);                        \
37
  init##TYPE  ( &g2s##TYPE,  (double)2);                        \
38
  init##TYPE  ( &g3s##TYPE,  (double)3);                        \
39
  init##TYPE  ( &g4s##TYPE,  (double)4);                        \
40
  init##TYPE  ( &g5s##TYPE,  (double)5);                        \
41
  init##TYPE  ( &g6s##TYPE,  (double)6);                        \
42
  init##TYPE  ( &g7s##TYPE,  (double)7);                        \
43
  init##TYPE  ( &g8s##TYPE,  (double)8);                        \
44
  init##TYPE  ( &g9s##TYPE,  (double)9);                        \
45
  init##TYPE  (&g10s##TYPE, (double)10);                        \
46
  init##TYPE  (&g11s##TYPE, (double)11);                        \
47
  init##TYPE  (&g12s##TYPE, (double)12);                        \
48
  init##TYPE  (&g13s##TYPE, (double)13);                        \
49
  init##TYPE  (&g14s##TYPE, (double)14);                        \
50
  init##TYPE  (&g15s##TYPE, (double)15);                        \
51
  init##TYPE  (&g16s##TYPE, (double)16);                        \
52
  checkg##TYPE ();                                              \
53
  DEBUG_NL;                                                     \
54
  DEBUG_FPUTS (#TYPE);                                          \
55
  DEBUG_FPUTS (" test: ");                                      \
56
  test##TYPE (g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,       \
57
              g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,       \
58
              g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE,    \
59
              g13s##TYPE, g14s##TYPE, g15s##TYPE, g16s##TYPE);  \
60
  DEBUG_NL;                                                     \
61
  DEBUG_FPUTS (#TYPE);                                          \
62
  DEBUG_FPUTS (" testva:");                                     \
63
  DEBUG_NL;                                                     \
64
  testva##TYPE (1,                                              \
65
                g1s##TYPE);                                     \
66
  DEBUG_NL;                                                     \
67
  testva##TYPE (2,                                              \
68
                g1s##TYPE, g2s##TYPE);                          \
69
  DEBUG_NL;                                                     \
70
  testva##TYPE (3,                                              \
71
                g1s##TYPE, g2s##TYPE, g3s##TYPE);               \
72
  DEBUG_NL;                                                     \
73
  testva##TYPE (4,                                              \
74
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE);    \
75
  DEBUG_NL;                                                     \
76
  testva##TYPE (5,                                              \
77
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
78
                g5s##TYPE);                                     \
79
  DEBUG_NL;                                                     \
80
  testva##TYPE (6,                                              \
81
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
82
                g5s##TYPE, g6s##TYPE);                          \
83
  DEBUG_NL;                                                     \
84
  testva##TYPE (7,                                              \
85
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
86
                g5s##TYPE, g6s##TYPE, g7s##TYPE);               \
87
  DEBUG_NL;                                                     \
88
  testva##TYPE (8,                                              \
89
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
90
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE);    \
91
  DEBUG_NL;                                                     \
92
  testva##TYPE (9,                                              \
93
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
94
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
95
                g9s##TYPE);                                     \
96
  DEBUG_NL;                                                     \
97
  testva##TYPE (10,                                             \
98
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
99
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
100
                g9s##TYPE, g10s##TYPE);                         \
101
  DEBUG_NL;                                                     \
102
  testva##TYPE (11,                                             \
103
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
104
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
105
                g9s##TYPE, g10s##TYPE, g11s##TYPE);             \
106
  DEBUG_NL;                                                     \
107
  testva##TYPE (12,                                             \
108
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
109
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
110
                g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE); \
111
  DEBUG_NL;                                                     \
112
  testva##TYPE (13,                                             \
113
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
114
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
115
                g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE,  \
116
                g13s##TYPE);                                    \
117
  DEBUG_NL;                                                     \
118
  testva##TYPE (14,                                             \
119
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
120
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
121
                g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE,  \
122
                g13s##TYPE, g14s##TYPE);                        \
123
  DEBUG_NL;                                                     \
124
  testva##TYPE (15,                                             \
125
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
126
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
127
                g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE,  \
128
                g13s##TYPE, g14s##TYPE, g15s##TYPE);            \
129
  DEBUG_NL;                                                     \
130
  testva##TYPE (16,                                             \
131
                g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE,     \
132
                g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE,     \
133
                g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE,  \
134
                g13s##TYPE, g14s##TYPE, g15s##TYPE, g16s##TYPE); \
135
  DEBUG_NL;                                                     \
136
  DEBUG_FPUTS (#TYPE);                                          \
137
  DEBUG_FPUTS (" test2: ");                                     \
138
  test2_##TYPE (g1s##TYPE, g3s##TYPE, g5s##TYPE, g7s##TYPE,     \
139
                g9s##TYPE, g11s##TYPE, g13s##TYPE, g15s##TYPE); \
140
  DEBUG_NL;                                                     \
141
}
142
 
143
TEST(Sfd)
144
TEST(Sfl)
145
TEST(Sdf)
146
TEST(Sdl)
147
TEST(Slf)
148
TEST(Sld)
149
TEST(Sfdl)
150
TEST(Sfld)
151
TEST(Sdfl)
152
TEST(Sdlf)
153
TEST(Slfd)
154
TEST(Sldf)
155
 
156
#undef T
157
 
158
void
159
struct_by_value_10_x ()
160
{
161
DEBUG_INIT
162
 
163
#define T(TYPE) testit##TYPE ();
164
 
165
T(Sfd)
166
T(Sfl)
167
T(Sdf)
168
T(Sdl)
169
T(Slf)
170
T(Sld)
171
T(Sfdl)
172
T(Sfld)
173
T(Sdfl)
174
T(Sdlf)
175
T(Slfd)
176
T(Sldf)
177
 
178
DEBUG_FINI
179
 
180
if (fails != 0)
181
  abort ();
182
 
183
#undef T
184
}

powered by: WebSVN 2.1.0

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