IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / compat / struct-return-19_x.c
blob0085a9f6883b79c8a2e7cae3d28e4135dfaffdcf
1 #include "compat-common.h"
3 #ifdef SKIP_VA
4 const int test_va = 0;
5 #else
6 const int test_va = 1;
7 #endif
9 #define T(TYPE) \
10 TYPE g01##TYPE, g02##TYPE, g03##TYPE, g04##TYPE; \
11 TYPE g05##TYPE, g06##TYPE, g07##TYPE, g08##TYPE; \
12 TYPE g09##TYPE, g10##TYPE, g11##TYPE, g12##TYPE; \
13 TYPE g13##TYPE, g14##TYPE, g15##TYPE, g16##TYPE; \
15 extern void init##TYPE (TYPE *p, int i); \
16 extern void checkg##TYPE (void); \
17 extern TYPE test0##TYPE (void); \
18 extern TYPE test1##TYPE (TYPE); \
19 extern TYPE testva##TYPE (int n, ...); \
21 void \
22 testit##TYPE (void) \
23 { \
24 TYPE rslt; \
25 DEBUG_FPUTS (#TYPE); \
26 DEBUG_FPUTS (" init: "); \
27 init##TYPE (&g01##TYPE, 1); \
28 init##TYPE (&g02##TYPE, 2); \
29 init##TYPE (&g03##TYPE, 3); \
30 init##TYPE (&g04##TYPE, 4); \
31 init##TYPE (&g05##TYPE, 5); \
32 init##TYPE (&g06##TYPE, 6); \
33 init##TYPE (&g07##TYPE, 7); \
34 init##TYPE (&g08##TYPE, 8); \
35 init##TYPE (&g09##TYPE, 9); \
36 init##TYPE (&g10##TYPE, 10); \
37 init##TYPE (&g11##TYPE, 11); \
38 init##TYPE (&g12##TYPE, 12); \
39 init##TYPE (&g13##TYPE, 13); \
40 init##TYPE (&g14##TYPE, 14); \
41 init##TYPE (&g15##TYPE, 15); \
42 init##TYPE (&g16##TYPE, 16); \
43 checkg##TYPE (); \
44 DEBUG_NL; \
45 DEBUG_FPUTS (#TYPE); \
46 DEBUG_FPUTS (" test0: "); \
47 rslt = test0##TYPE (); \
48 check##TYPE (rslt, 1); \
49 DEBUG_NL; \
50 DEBUG_FPUTS (#TYPE); \
51 DEBUG_FPUTS (" test1: "); \
52 rslt = test1##TYPE (g01##TYPE); \
53 check##TYPE (rslt, 1); \
54 if (test_va) \
55 { \
56 DEBUG_NL; \
57 DEBUG_FPUTS (#TYPE); \
58 DEBUG_FPUTS (" testva: "); \
59 rslt = testva##TYPE (1, g01##TYPE); \
60 check##TYPE (rslt, 1); \
61 rslt = testva##TYPE (5, g01##TYPE, g02##TYPE, \
62 g03##TYPE, g04##TYPE, \
63 g05##TYPE); \
64 check##TYPE (rslt, 5); \
65 rslt = testva##TYPE (9, g01##TYPE, g02##TYPE, \
66 g03##TYPE, g04##TYPE, \
67 g05##TYPE, g06##TYPE, \
68 g07##TYPE, g08##TYPE, \
69 g09##TYPE); \
70 check##TYPE (rslt, 9); \
71 rslt = testva##TYPE (16, g01##TYPE, g02##TYPE, \
72 g03##TYPE, g04##TYPE, \
73 g05##TYPE, g06##TYPE, \
74 g07##TYPE, g08##TYPE, \
75 g09##TYPE, g10##TYPE, \
76 g11##TYPE, g12##TYPE, \
77 g13##TYPE, g14##TYPE, \
78 g15##TYPE, g16##TYPE); \
79 check##TYPE (rslt, 16); \
80 } \
81 DEBUG_NL; \
84 #include "mixed-struct-defs.h"
85 #include "mixed-struct-check.h"
87 T(Scdc)
88 T(Sd)
89 T(Sdi)
90 T(Scsdsc)
91 T(Scsdis)
92 T(Scsdisc)
93 T(Ssds)
94 T(Ssdsc)
95 T(Scssdssc)
97 #undef T
99 void
100 struct_return_19_x ()
102 DEBUG_INIT
104 #define T(TYPE) testit##TYPE ();
106 T(Scdc)
107 T(Sd)
108 T(Sdi)
109 T(Scsdsc)
110 T(Scsdis)
111 T(Scsdisc)
112 T(Ssds)
113 T(Ssdsc)
114 T(Scssdssc)
116 DEBUG_FINI
118 if (fails != 0)
119 abort ();
121 #undef T