Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / compat / scalar-return-3_x.c
blobc153f6f19dfcd92ee0996f9908e0b9a2d71804f7
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(NAME, TYPE, INITVAL) \
10 TYPE g01##NAME, g02##NAME, g03##NAME, g04##NAME; \
11 TYPE g05##NAME, g06##NAME, g07##NAME, g08##NAME; \
12 TYPE g09##NAME, g10##NAME, g11##NAME, g12##NAME; \
13 TYPE g13##NAME, g14##NAME, g15##NAME, g16##NAME; \
15 extern void init##NAME (TYPE *p, TYPE v); \
16 extern void checkg##NAME (void); \
17 extern TYPE test0##NAME (void); \
18 extern TYPE test1##NAME (TYPE); \
19 extern TYPE testva##NAME (int n, ...); \
21 void \
22 check##NAME (TYPE x, TYPE v) \
23 { \
24 if (x != v) \
25 DEBUG_CHECK \
26 } \
28 void \
29 testit##NAME (void) \
30 { \
31 TYPE rslt; \
32 DEBUG_FPUTS (#NAME); \
33 DEBUG_FPUTS (" init: "); \
34 init##NAME (&g01##NAME, 1); \
35 init##NAME (&g02##NAME, 2); \
36 init##NAME (&g03##NAME, 3); \
37 init##NAME (&g04##NAME, 4); \
38 init##NAME (&g05##NAME, 5); \
39 init##NAME (&g06##NAME, 6); \
40 init##NAME (&g07##NAME, 7); \
41 init##NAME (&g08##NAME, 8); \
42 init##NAME (&g09##NAME, 9); \
43 init##NAME (&g10##NAME, 10); \
44 init##NAME (&g11##NAME, 11); \
45 init##NAME (&g12##NAME, 12); \
46 init##NAME (&g13##NAME, 13); \
47 init##NAME (&g14##NAME, 14); \
48 init##NAME (&g15##NAME, 15); \
49 init##NAME (&g16##NAME, 16); \
50 checkg##NAME (); \
51 DEBUG_NL; \
52 DEBUG_FPUTS (#NAME); \
53 DEBUG_FPUTS (" test0: "); \
54 rslt = test0##NAME (); \
55 check##NAME (rslt, g01##NAME); \
56 DEBUG_NL; \
57 DEBUG_FPUTS (#NAME); \
58 DEBUG_FPUTS (" test1: "); \
59 rslt = test1##NAME (g01##NAME); \
60 check##NAME (rslt, g01##NAME); \
61 if (test_va) \
62 { \
63 DEBUG_NL; \
64 DEBUG_FPUTS (#NAME); \
65 DEBUG_FPUTS (" testva: "); \
66 rslt = testva##NAME (1, g01##NAME); \
67 check##NAME (rslt, g01##NAME); \
68 rslt = testva##NAME (5, g01##NAME, g02##NAME, g03##NAME, \
69 g04##NAME, g05##NAME); \
70 check##NAME (rslt, g05##NAME); \
71 rslt = testva##NAME (9, g01##NAME, g02##NAME, g03##NAME, \
72 g04##NAME, g05##NAME, g06##NAME, \
73 g07##NAME, g08##NAME, g09##NAME); \
74 check##NAME (rslt, g09##NAME); \
75 rslt = testva##NAME (16, g01##NAME, g02##NAME, g03##NAME, \
76 g04##NAME, g05##NAME, g06##NAME, \
77 g07##NAME, g08##NAME, g09##NAME, \
78 g10##NAME, g11##NAME, g12##NAME, \
79 g13##NAME, g14##NAME, g15##NAME, \
80 g16##NAME); \
81 check##NAME (rslt, g16##NAME); \
82 } \
83 DEBUG_NL; \
86 #ifndef SKIP_COMPLEX_INT
87 T(ci, _Complex int, CINT (2, 3))
88 T(cl, _Complex long, CINT (3, 4))
89 T(cll, _Complex long long, CINT (4, 5))
90 #endif
91 T(cd, _Complex double, CDBL (2.0, 3.0))
92 T(cld, _Complex long double, CDBL (3.0, 4.0))
94 #undef T
96 void
97 scalar_return_3_x ()
99 DEBUG_INIT
101 #define T(NAME) testit##NAME ();
103 #ifndef SKIP_COMPLEX_INT
104 T(ci)
105 T(cl)
106 T(cll)
107 #endif
108 T(cd)
109 T(cld)
111 DEBUG_FINI
113 if (fails != 0)
114 abort ();
116 #undef T