* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git] / gcc / testsuite / jit.dg / all-non-failing-tests.h
blob58e0c30eb0fae57b3f8bfb7446ec2d5be466f37e
1 /* This file is used by test-combination.c and test-threads.c to
2 bring all of the non-failing test cases into one source file,
3 renaming each "create_code" and "verify_code" hook so that they
4 each have unique name. */
6 /* Include various other test cases, defining COMBINED_TEST so that
7 harness.h doesn't duplicate copes of e.g. main, and renaming the
8 hooks provided by each test case. */
9 #define COMBINED_TEST
11 /* test-accessing-struct.c */
12 #define create_code create_code_accessing_struct
13 #define verify_code verify_code_accessing_struct
14 #include "test-accessing-struct.c"
15 #undef create_code
16 #undef verify_code
18 /* test-accessing-union.c */
19 #define create_code create_code_accessing_union
20 #define verify_code verify_code_accessing_union
21 #include "test-accessing-union.c"
22 #undef create_code
23 #undef verify_code
25 /* test-alignment.c */
26 #define create_code create_code_alignment
27 #define verify_code verify_code_alignment
28 #include "test-alignment.c"
29 #undef create_code
30 #undef verify_code
32 /* test-arith-overflow.c */
33 #define create_code create_code_arith_overflow
34 #define verify_code verify_code_arith_overflow
35 #include "test-arith-overflow.c"
36 #undef create_code
37 #undef verify_code
39 /* test-array-as-pointer.c */
40 #define create_code create_code_array_as_pointer
41 #define verify_code verify_code_array_as_pointer
42 #include "test-array-as-pointer.c"
43 #undef create_code
44 #undef verify_code
46 /* test-arrays.c */
47 #define create_code create_code_arrays
48 #define verify_code verify_code_arrays
49 #include "test-arrays.c"
50 #undef create_code
51 #undef verify_code
53 /* test-calling-external-function.c */
54 #define create_code create_code_calling_external_function
55 #define verify_code verify_code_calling_external_function
56 #include "test-calling-external-function.c"
57 #undef create_code
58 #undef verify_code
60 /* test-calling-function-ptr.c */
61 #define create_code create_code_calling_function_ptr
62 #define verify_code verify_code_calling_function_ptr
63 #include "test-calling-function-ptr.c"
64 #undef create_code
65 #undef verify_code
67 /* test-compound-assignment.c */
68 #define create_code create_code_compound_assignment
69 #define verify_code verify_code_compound_assignment
70 #include "test-compound-assignment.c"
71 #undef create_code
72 #undef verify_code
74 /* test-constants.c */
75 #define create_code create_code_constants
76 #define verify_code verify_code_constants
77 #include "test-constants.c"
78 #undef create_code
79 #undef verify_code
81 /* test-debug-strings.c */
82 #define create_code create_code_debug_strings
83 #define verify_code verify_code_debug_strings
84 #include "test-debug-strings.c"
85 #undef create_code
86 #undef verify_code
88 /* test-dot-product.c */
89 #define create_code create_code_dot_product
90 #define verify_code verify_code_dot_product
91 #include "test-dot-product.c"
92 #undef create_code
93 #undef verify_code
95 /* test-error-*.c: We don't use these test cases, since they deliberately
96 introduce errors, which we don't want here. */
98 /* test-expressions.c */
99 #define create_code create_code_expressions
100 #define verify_code verify_code_expressions
101 #include "test-expressions.c"
102 #undef create_code
103 #undef verify_code
105 /* test-extra-options.c: We don't use this one, since the extra options
106 affect the whole context. */
108 /* test-factorial.c */
109 #define create_code create_code_factorial
110 #define verify_code verify_code_factorial
111 #include "test-factorial.c"
112 #undef create_code
113 #undef verify_code
115 /* test-factorial-must-tail-call.c */
116 #define create_code create_code_factorial_must_tail_call
117 #define verify_code verify_code_factorial_must_tail_call
118 #include "test-factorial-must-tail-call.c"
119 #undef create_code
120 #undef verify_code
122 /* test-fibonacci.c */
123 #define create_code create_code_fibonacci
124 #define verify_code verify_code_fibonacci
125 #include "test-fibonacci.c"
126 #undef create_code
127 #undef verify_code
129 /* test-functions.c */
130 #define create_code create_code_functions
131 #define verify_code verify_code_functions
132 #include "test-functions.c"
133 #undef create_code
134 #undef verify_code
136 /* test-hello-world.c */
137 #define create_code create_code_hello_world
138 #define verify_code verify_code_hello_world
139 #include "test-hello-world.c"
140 #undef create_code
141 #undef verify_code
143 /* test-linked-list.c */
144 #define create_code create_code_linked_list
145 #define verify_code verify_code_linked_list
146 #include "test-linked-list.c"
147 #undef create_code
148 #undef verify_code
150 /* test-long-names.c */
151 #define create_code create_code_long_names
152 #define verify_code verify_code_long_names
153 #include "test-long-names.c"
154 #undef create_code
155 #undef verify_code
157 /* test-quadratic.c */
158 #define create_code create_code_quadratic
159 #define verify_code verify_code_quadratic
160 #include "test-quadratic.c"
161 #undef create_code
162 #undef verify_code
164 /* test-nested-loops.c */
165 #define create_code create_code_nested_loop
166 #define verify_code verify_code_nested_loop
167 #include "test-nested-loops.c"
168 #undef create_code
169 #undef verify_code
171 /* test-pr66700-observing-write-through-ptr.c */
172 #define create_code create_code_pr66700_observing_write_through_ptr
173 #define verify_code verify_code_pr66700_observing_write_through_ptr
174 #include "test-pr66700-observing-write-through-ptr.c"
175 #undef create_code
176 #undef verify_code
178 /* test-pr66779.c */
179 #define create_code create_code_pr66779
180 #define verify_code verify_code_pr66779
181 #include "test-pr66779.c"
182 #undef create_code
183 #undef verify_code
185 /* test-reading-struct.c */
186 #define create_code create_code_reading_struct
187 #define verify_code verify_code_reading_struct
188 #include "test-reading-struct.c"
189 #undef create_code
190 #undef verify_code
192 /* test-string-literal.c */
193 #define create_code create_code_string_literal
194 #define verify_code verify_code_string_literal
195 #include "test-string-literal.c"
196 #undef create_code
197 #undef verify_code
199 /* test-sum-of-squares.c */
200 #define create_code create_code_sum_of_squares
201 #define verify_code verify_code_sum_of_squares
202 #include "test-sum-of-squares.c"
203 #undef create_code
204 #undef verify_code
206 /* test-switch.c */
207 #define create_code create_code_switch
208 #define verify_code verify_code_switch
209 #include "test-switch.c"
210 #undef create_code
211 #undef verify_code
213 /* test-types.c */
214 #define create_code create_code_types
215 #define verify_code verify_code_types
216 #include "test-types.c"
217 #undef create_code
218 #undef verify_code
220 /* test-using-global.c */
221 #define create_code create_code_using_global
222 #define verify_code verify_code_using_global
223 #include "test-using-global.c"
224 #undef create_code
225 #undef verify_code
227 /* test-validly-unreachable-block.c: We don't use this one, since the use
228 of gcc_jit_context_set_bool_allow_unreachable_blocks affects the whole
229 context. */
231 /* test-volatile.c */
232 #define create_code create_code_volatile
233 #define verify_code verify_code_volatile
234 #include "test-volatile.c"
235 #undef create_code
236 #undef verify_code
238 /* Now expose the individual testcases as instances of this struct. */
240 struct testcase
242 const char *m_name;
243 void (*m_hook_to_create_code) (gcc_jit_context *ctxt,
244 void * user_data);
245 void (*m_hook_to_verify_code) (gcc_jit_context *ctxt,
246 gcc_jit_result *result);
249 const struct testcase testcases[] = {
250 {"accessing_struct",
251 create_code_accessing_struct,
252 verify_code_accessing_struct},
253 {"accessing_union",
254 create_code_accessing_union,
255 verify_code_accessing_union},
256 {"alignment",
257 create_code_alignment,
258 verify_code_alignment},
259 {"arith_overflow",
260 create_code_arith_overflow,
261 verify_code_arith_overflow},
262 {"array_as_pointer",
263 create_code_array_as_pointer,
264 verify_code_array_as_pointer},
265 {"arrays",
266 create_code_arrays,
267 verify_code_arrays},
268 {"calling_external_function",
269 create_code_calling_external_function,
270 verify_code_calling_external_function},
271 {"calling_function_ptr",
272 create_code_calling_function_ptr,
273 verify_code_calling_function_ptr},
274 {"compound_assignment",
275 create_code_compound_assignment,
276 verify_code_compound_assignment},
277 {"constants",
278 create_code_constants,
279 verify_code_constants},
280 {"debug_strings",
281 create_code_debug_strings,
282 verify_code_debug_strings},
283 {"dot_product",
284 create_code_dot_product,
285 verify_code_dot_product},
286 {"expressions",
287 create_code_expressions,
288 verify_code_expressions},
289 {"factorial",
290 create_code_factorial,
291 verify_code_factorial},
292 {"factorial_must_tail_call",
293 create_code_factorial_must_tail_call,
294 verify_code_factorial_must_tail_call},
295 {"fibonacci",
296 create_code_fibonacci,
297 verify_code_fibonacci},
298 {"functions",
299 create_code_functions,
300 verify_code_functions},
301 {"hello_world",
302 create_code_hello_world,
303 verify_code_hello_world},
304 {"linked_list",
305 create_code_linked_list,
306 verify_code_linked_list},
307 {"long_names",
308 create_code_long_names,
309 verify_code_long_names},
310 {"quadratic",
311 create_code_quadratic,
312 verify_code_quadratic},
313 {"nested_loop",
314 create_code_nested_loop,
315 verify_code_nested_loop},
316 {"pr66700_observing_write_through_ptr",
317 create_code_pr66700_observing_write_through_ptr,
318 verify_code_pr66700_observing_write_through_ptr},
319 {"pr66779",
320 create_code_pr66779,
321 verify_code_pr66779},
322 {"reading_struct ",
323 create_code_reading_struct ,
324 verify_code_reading_struct },
325 {"string_literal",
326 create_code_string_literal,
327 verify_code_string_literal},
328 {"sum_of_squares",
329 create_code_sum_of_squares,
330 verify_code_sum_of_squares},
331 {"switch",
332 create_code_switch,
333 verify_code_switch},
334 {"types",
335 create_code_types,
336 verify_code_types},
337 {"using_global",
338 create_code_using_global,
339 verify_code_using_global},
340 {"volatile",
341 create_code_volatile,
342 verify_code_volatile}
345 const int num_testcases = (sizeof (testcases) / sizeof (testcases[0]));