1 #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 "mixed-struct-defs.h"
141 #include "mixed-struct-check.h"
142 
143 T(Scdc)
T(Sd)144 T(Sd)
145 T(Sdi)
146 T(Scsdsc)
147 T(Scsdis)
148 T(Scsdisc)
149 T(Ssds)
150 T(Ssdsc)
151 T(Scssdssc)
152 
153 #undef T
154 
155 void
156 struct_by_value_19_x ()
157 {
158 DEBUG_INIT
159 
160 #define T(TYPE) testit##TYPE ();
161 
162 T(Scdc)
163 T(Sd)
164 T(Sdi)
165 T(Scsdsc)
166 T(Scsdis)
167 T(Scsdisc)
168 T(Ssds)
169 T(Ssdsc)
170 T(Scssdssc)
171 
172 DEBUG_FINI
173 
174 if (fails != 0)
175   abort ();
176 
177 #undef T
178 }
179