PR rtl-optimization/88018
[official-gcc.git] / gcc / testsuite / jit.dg / all-non-failing-tests.h
blobbf02e1258bb04a008a59e9b6fe9fe582685a029b
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-autovectorize.c */
54 #define create_code create_code_autovectorize
55 #define verify_code verify_code_autovectorize
56 #include "test-autovectorize.c"
57 #undef create_code
58 #undef verify_code
60 /* test-calling-external-function.c */
61 #define create_code create_code_calling_external_function
62 #define verify_code verify_code_calling_external_function
63 #include "test-calling-external-function.c"
64 #undef create_code
65 #undef verify_code
67 /* test-calling-function-ptr.c */
68 #define create_code create_code_calling_function_ptr
69 #define verify_code verify_code_calling_function_ptr
70 #include "test-calling-function-ptr.c"
71 #undef create_code
72 #undef verify_code
74 /* test-returning-function-ptr.c */
75 #define create_code create_code_calling_internal_function
76 #define verify_code verify_code_calling_internal_function
77 #include "test-returning-function-ptr.c"
78 #undef create_code
79 #undef verify_code
81 /* test-compound-assignment.c */
82 #define create_code create_code_compound_assignment
83 #define verify_code verify_code_compound_assignment
84 #include "test-compound-assignment.c"
85 #undef create_code
86 #undef verify_code
88 /* test-constants.c */
89 #define create_code create_code_constants
90 #define verify_code verify_code_constants
91 #include "test-constants.c"
92 #undef create_code
93 #undef verify_code
95 /* test-debug-strings.c */
96 #define create_code create_code_debug_strings
97 #define verify_code verify_code_debug_strings
98 #include "test-debug-strings.c"
99 #undef create_code
100 #undef verify_code
102 /* test-dot-product.c */
103 #define create_code create_code_dot_product
104 #define verify_code verify_code_dot_product
105 #include "test-dot-product.c"
106 #undef create_code
107 #undef verify_code
109 /* test-error-*.c: We don't use these test cases, since they deliberately
110 introduce errors, which we don't want here. */
112 /* test-expressions.c */
113 #define create_code create_code_expressions
114 #define verify_code verify_code_expressions
115 #include "test-expressions.c"
116 #undef create_code
117 #undef verify_code
119 /* test-extra-options.c: We don't use this one, since the extra options
120 affect the whole context. */
122 /* test-factorial.c */
123 #define create_code create_code_factorial
124 #define verify_code verify_code_factorial
125 #include "test-factorial.c"
126 #undef create_code
127 #undef verify_code
129 /* test-factorial-must-tail-call.c */
130 #define create_code create_code_factorial_must_tail_call
131 #define verify_code verify_code_factorial_must_tail_call
132 #include "test-factorial-must-tail-call.c"
133 #undef create_code
134 #undef verify_code
136 /* test-fibonacci.c */
137 #define create_code create_code_fibonacci
138 #define verify_code verify_code_fibonacci
139 #include "test-fibonacci.c"
140 #undef create_code
141 #undef verify_code
143 /* test-functions.c */
144 #define create_code create_code_functions
145 #define verify_code verify_code_functions
146 #include "test-functions.c"
147 #undef create_code
148 #undef verify_code
150 /* test-hello-world.c */
151 #define create_code create_code_hello_world
152 #define verify_code verify_code_hello_world
153 #include "test-hello-world.c"
154 #undef create_code
155 #undef verify_code
157 /* test-linked-list.c */
158 #define create_code create_code_linked_list
159 #define verify_code verify_code_linked_list
160 #include "test-linked-list.c"
161 #undef create_code
162 #undef verify_code
164 /* test-long-names.c */
165 #define create_code create_code_long_names
166 #define verify_code verify_code_long_names
167 #include "test-long-names.c"
168 #undef create_code
169 #undef verify_code
171 /* test-quadratic.c */
172 #define create_code create_code_quadratic
173 #define verify_code verify_code_quadratic
174 #include "test-quadratic.c"
175 #undef create_code
176 #undef verify_code
178 /* test-nested-loops.c */
179 #define create_code create_code_nested_loop
180 #define verify_code verify_code_nested_loop
181 #include "test-nested-loops.c"
182 #undef create_code
183 #undef verify_code
185 /* test-pr66700-observing-write-through-ptr.c */
186 #define create_code create_code_pr66700_observing_write_through_ptr
187 #define verify_code verify_code_pr66700_observing_write_through_ptr
188 #include "test-pr66700-observing-write-through-ptr.c"
189 #undef create_code
190 #undef verify_code
192 /* test-pr66779.c */
193 #define create_code create_code_pr66779
194 #define verify_code verify_code_pr66779
195 #include "test-pr66779.c"
196 #undef create_code
197 #undef verify_code
199 /* test-reading-struct.c */
200 #define create_code create_code_reading_struct
201 #define verify_code verify_code_reading_struct
202 #include "test-reading-struct.c"
203 #undef create_code
204 #undef verify_code
206 /* test-string-literal.c */
207 #define create_code create_code_string_literal
208 #define verify_code verify_code_string_literal
209 #include "test-string-literal.c"
210 #undef create_code
211 #undef verify_code
213 /* test-sum-of-squares.c */
214 #define create_code create_code_sum_of_squares
215 #define verify_code verify_code_sum_of_squares
216 #include "test-sum-of-squares.c"
217 #undef create_code
218 #undef verify_code
220 /* test-switch.c */
221 #define create_code create_code_switch
222 #define verify_code verify_code_switch
223 #include "test-switch.c"
224 #undef create_code
225 #undef verify_code
227 /* test-types.c */
228 #define create_code create_code_types
229 #define verify_code verify_code_types
230 #include "test-types.c"
231 #undef create_code
232 #undef verify_code
234 /* test-using-global.c */
235 #define create_code create_code_using_global
236 #define verify_code verify_code_using_global
237 #include "test-using-global.c"
238 #undef create_code
239 #undef verify_code
241 /* test-validly-unreachable-block.c: We don't use this one, since the use
242 of gcc_jit_context_set_bool_allow_unreachable_blocks affects the whole
243 context. */
245 /* test-vector-types.cc: We don't use this, since it's C++. */
247 /* test-volatile.c */
248 #define create_code create_code_volatile
249 #define verify_code verify_code_volatile
250 #include "test-volatile.c"
251 #undef create_code
252 #undef verify_code
254 /* Now expose the individual testcases as instances of this struct. */
256 struct testcase
258 const char *m_name;
259 void (*m_hook_to_create_code) (gcc_jit_context *ctxt,
260 void * user_data);
261 void (*m_hook_to_verify_code) (gcc_jit_context *ctxt,
262 gcc_jit_result *result);
265 const struct testcase testcases[] = {
266 {"accessing_struct",
267 create_code_accessing_struct,
268 verify_code_accessing_struct},
269 {"accessing_union",
270 create_code_accessing_union,
271 verify_code_accessing_union},
272 {"alignment",
273 create_code_alignment,
274 verify_code_alignment},
275 {"arith_overflow",
276 create_code_arith_overflow,
277 verify_code_arith_overflow},
278 {"array_as_pointer",
279 create_code_array_as_pointer,
280 verify_code_array_as_pointer},
281 {"arrays",
282 create_code_arrays,
283 verify_code_arrays},
284 {"autovectorize",
285 create_code_autovectorize,
286 verify_code_autovectorize},
287 {"calling_external_function",
288 create_code_calling_external_function,
289 verify_code_calling_external_function},
290 {"calling_function_ptr",
291 create_code_calling_function_ptr,
292 verify_code_calling_function_ptr},
293 {"calling_internal_function",
294 create_code_calling_internal_function,
295 verify_code_calling_internal_function},
296 {"compound_assignment",
297 create_code_compound_assignment,
298 verify_code_compound_assignment},
299 {"constants",
300 create_code_constants,
301 verify_code_constants},
302 {"debug_strings",
303 create_code_debug_strings,
304 verify_code_debug_strings},
305 {"dot_product",
306 create_code_dot_product,
307 verify_code_dot_product},
308 {"expressions",
309 create_code_expressions,
310 verify_code_expressions},
311 {"factorial",
312 create_code_factorial,
313 verify_code_factorial},
314 {"factorial_must_tail_call",
315 create_code_factorial_must_tail_call,
316 verify_code_factorial_must_tail_call},
317 {"fibonacci",
318 create_code_fibonacci,
319 verify_code_fibonacci},
320 {"functions",
321 create_code_functions,
322 verify_code_functions},
323 {"hello_world",
324 create_code_hello_world,
325 verify_code_hello_world},
326 {"linked_list",
327 create_code_linked_list,
328 verify_code_linked_list},
329 {"long_names",
330 create_code_long_names,
331 verify_code_long_names},
332 {"quadratic",
333 create_code_quadratic,
334 verify_code_quadratic},
335 {"nested_loop",
336 create_code_nested_loop,
337 verify_code_nested_loop},
338 {"pr66700_observing_write_through_ptr",
339 create_code_pr66700_observing_write_through_ptr,
340 verify_code_pr66700_observing_write_through_ptr},
341 {"pr66779",
342 create_code_pr66779,
343 verify_code_pr66779},
344 {"reading_struct ",
345 create_code_reading_struct ,
346 verify_code_reading_struct },
347 {"string_literal",
348 create_code_string_literal,
349 verify_code_string_literal},
350 {"sum_of_squares",
351 create_code_sum_of_squares,
352 verify_code_sum_of_squares},
353 {"switch",
354 create_code_switch,
355 verify_code_switch},
356 {"types",
357 create_code_types,
358 verify_code_types},
359 {"using_global",
360 create_code_using_global,
361 verify_code_using_global},
362 {"volatile",
363 create_code_volatile,
364 verify_code_volatile}
367 const int num_testcases = (sizeof (testcases) / sizeof (testcases[0]));