Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / compat / struct-by-value-3_y.c
blobd5a31c9d5a491ec1a7c79a38bd32515bec23dc1a
1 #include <stdarg.h>
3 #include "compat-common.h"
5 #ifdef SKIP_VA
6 const int test_va = 0;
7 #else
8 const int test_va = 1;
9 #endif
11 #include "small-struct-defs.h"
13 extern void checkSc (Sc x, int i);
14 extern void checkSs (Ss x, int i);
15 extern void checkSi (Si x, int i);
16 extern void checkSsc (Ssc x, int i);
17 extern void checkScs (Scs x, int i);
18 extern void checkSsi (Ssi x, int i);
19 extern void checkSis (Sis x, int i);
20 extern void checkSic (Sic x, int i);
21 extern void checkSci (Sci x, int i);
22 extern void checkScsi (Scsi x, int i);
23 extern void checkScis (Scis x, int i);
24 extern void checkSsci (Ssci x, int i);
25 extern void checkSsic (Ssic x, int i);
26 extern void checkSisc (Sisc x, int i);
27 extern void checkSics (Sics x, int i);
29 #include "small-struct-init.h"
31 #define T(TYPE) \
32 extern TYPE g1s##TYPE, g2s##TYPE, g3s##TYPE, g4s##TYPE; \
33 extern TYPE g5s##TYPE, g6s##TYPE, g7s##TYPE, g8s##TYPE; \
34 extern TYPE g9s##TYPE, g10s##TYPE, g11s##TYPE, g12s##TYPE; \
35 extern TYPE g13s##TYPE, g14s##TYPE, g15s##TYPE, g16s##TYPE; \
37 void \
38 checkg##TYPE (void) \
39 { \
40 check##TYPE ( g1s##TYPE, 1); \
41 check##TYPE ( g2s##TYPE, 2); \
42 check##TYPE ( g3s##TYPE, 3); \
43 check##TYPE ( g4s##TYPE, 4); \
44 check##TYPE ( g5s##TYPE, 5); \
45 check##TYPE ( g6s##TYPE, 6); \
46 check##TYPE ( g7s##TYPE, 7); \
47 check##TYPE ( g8s##TYPE, 8); \
48 check##TYPE ( g9s##TYPE, 9); \
49 check##TYPE ( g10s##TYPE, 10); \
50 check##TYPE ( g11s##TYPE, 11); \
51 check##TYPE ( g12s##TYPE, 12); \
52 check##TYPE ( g13s##TYPE, 13); \
53 check##TYPE ( g14s##TYPE, 14); \
54 check##TYPE ( g15s##TYPE, 15); \
55 check##TYPE ( g16s##TYPE, 16); \
56 } \
58 void \
59 test##TYPE (TYPE s1, TYPE s2, TYPE s3, TYPE s4, \
60 TYPE s5, TYPE s6, TYPE s7, TYPE s8, \
61 TYPE s9, TYPE s10, TYPE s11, TYPE s12, \
62 TYPE s13, TYPE s14, TYPE s15, TYPE s16) \
63 { \
64 check##TYPE (s1, 1); \
65 check##TYPE (s2, 2); \
66 check##TYPE (s3, 3); \
67 check##TYPE (s4, 4); \
68 check##TYPE (s5, 5); \
69 check##TYPE (s6, 6); \
70 check##TYPE (s7, 7); \
71 check##TYPE (s8, 8); \
72 check##TYPE (s9, 9); \
73 check##TYPE (s10, 10); \
74 check##TYPE (s11, 11); \
75 check##TYPE (s12, 12); \
76 check##TYPE (s13, 13); \
77 check##TYPE (s14, 14); \
78 check##TYPE (s15, 15); \
79 check##TYPE (s16, 16); \
80 } \
82 void \
83 testva##TYPE (int n, ...) \
84 { \
85 int i; \
86 va_list ap; \
87 if (test_va) \
88 { \
89 va_start (ap, n); \
90 for (i = 0; i < n; i++) \
91 { \
92 TYPE t = va_arg (ap, TYPE); \
93 check##TYPE (t, i+1); \
94 } \
95 va_end (ap); \
96 } \
99 T(Sc)
100 T(Ss)
101 T(Si)
102 T(Ssc)
103 T(Scs)
104 T(Sic)
105 T(Sci)
106 T(Ssi)
107 T(Sis)
108 T(Scsi)
109 T(Scis)
110 T(Ssci)
111 T(Ssic)
112 T(Sisc)
113 T(Sics)