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

powered by: WebSVN 2.1.0

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