tinycc/tests/tests2
Michael Matz e6980f6cc7 Detect more invalid initializers
in presence of invalid source code we can't rely on the
next token to determine if we have or haven't already parsed
an initializer element, we really have to track it in some separate
state; it's a flag, so merge it with the other two we have (size_only
and first).  Also add some syntax checks for situations which
formerly lead to vstack leaks, see the added testcases.
2019-03-18 03:31:11 +01:00
..
00_assignment.c tests2: move into tests 2013-02-05 13:22:36 +01:00
00_assignment.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
01_comment.c tests2: move into tests 2013-02-05 13:22:36 +01:00
01_comment.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
02_printf.c tests2: move into tests 2013-02-05 13:22:36 +01:00
02_printf.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
03_struct.c misc. fixes 2014-01-06 19:56:26 +01:00
03_struct.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
04_for.c tests2: move into tests 2013-02-05 13:22:36 +01:00
04_for.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
05_array.c tests2: move into tests 2013-02-05 13:22:36 +01:00
05_array.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
06_case.c tests2: move into tests 2013-02-05 13:22:36 +01:00
06_case.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
07_function.c zfunc works again on ARM after Pursuer fix 2018-12-22 19:14:22 +01:00
07_function.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
08_while.c tests2: move into tests 2013-02-05 13:22:36 +01:00
08_while.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
09_do_while.c tests2: move into tests 2013-02-05 13:22:36 +01:00
09_do_while.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
10_pointer.c tests2: move into tests 2013-02-05 13:22:36 +01:00
10_pointer.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
11_precedence.c tests2: move into tests 2013-02-05 13:22:36 +01:00
11_precedence.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
12_hashdefine.c tests2: move into tests 2013-02-05 13:22:36 +01:00
12_hashdefine.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
13_integer_literals.c tests2: move into tests 2013-02-05 13:22:36 +01:00
13_integer_literals.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
14_if.c tests2: move into tests 2013-02-05 13:22:36 +01:00
14_if.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
15_recursion.c tests2: move into tests 2013-02-05 13:22:36 +01:00
15_recursion.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
16_nesting.c tests2: move into tests 2013-02-05 13:22:36 +01:00
16_nesting.expect tests: cleanup 2013-02-05 14:27:38 +01:00
17_enum.c enums: Accept GNU extension 2017-07-10 22:20:34 +02:00
17_enum.expect enums: Accept GNU extension 2017-07-10 22:20:34 +02:00
18_include.c tests2: move into tests 2013-02-05 13:22:36 +01:00
18_include.expect tests: cleanup 2013-02-05 14:27:38 +01:00
18_include.h tests: cleanup 2013-02-05 14:27:38 +01:00
19_pointer_arithmetic.c tests2: move into tests 2013-02-05 13:22:36 +01:00
19_pointer_arithmetic.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
20_pointer_comparison.c tests2: move into tests 2013-02-05 13:22:36 +01:00
20_pointer_comparison.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
21_char_array.c tests2: move into tests 2013-02-05 13:22:36 +01:00
21_char_array.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
22_floating_point.c tests2: move into tests 2013-02-05 13:22:36 +01:00
22_floating_point.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
23_type_coercion.c tests2: move into tests 2013-02-05 13:22:36 +01:00
23_type_coercion.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
24_math_library.c round() in test (24_math_library) fail because there are no defs included. 2015-01-05 18:23:32 +03:00
24_math_library.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
25_quicksort.c tests2: move into tests 2013-02-05 13:22:36 +01:00
25_quicksort.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
26_character_constants.c tests2: move into tests 2013-02-05 13:22:36 +01:00
26_character_constants.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
27_sizeof.c tccgen.c: Try to make sizeof(!x) work. 2015-11-22 00:00:36 +00:00
27_sizeof.expect tccgen.c: Try to make sizeof(!x) work. 2015-11-22 00:00:36 +00:00
28_strings.c Use ISO C string functions instead of obsolete BSD ones that used to be in strings.h. It allows more systems -- i.e. Windows -- to use those tests 2016-10-12 06:18:38 +02:00
28_strings.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
29_array_address.c tests2: move into tests 2013-02-05 13:22:36 +01:00
29_array_address.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
30_hanoi.c tests2: fix 30_hanoi test and enable it. 2014-04-12 13:37:37 -04:00
30_hanoi.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
31_args.c tests2: cleanup 2014-04-07 11:20:45 +02:00
31_args.expect tests2: cleanup 2014-04-07 11:20:45 +02:00
32_led.c tests2: move into tests 2013-02-05 13:22:36 +01:00
32_led.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
33_ternary_op.c Fix incorrect one-sided void handling in ?: 2018-11-29 13:40:48 +01:00
33_ternary_op.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
34_array_assignment.c tests2: move into tests 2013-02-05 13:22:36 +01:00
34_array_assignment.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
35_sizeof.c tests2: move into tests 2013-02-05 13:22:36 +01:00
35_sizeof.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
36_array_initialisers.c tests2: move into tests 2013-02-05 13:22:36 +01:00
36_array_initialisers.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
37_sprintf.c tests2: move into tests 2013-02-05 13:22:36 +01:00
37_sprintf.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
38_multiple_array_index.c tests2: move into tests 2013-02-05 13:22:36 +01:00
38_multiple_array_index.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
39_typedef.c Fix function types 2017-07-14 17:42:48 +02:00
39_typedef.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
40_stdio.c tests2: move into tests 2013-02-05 13:22:36 +01:00
40_stdio.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
41_hashif.c tests2: move into tests 2013-02-05 13:22:36 +01:00
41_hashif.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
42_function_pointer.c Fix gawk miscompile 2016-12-18 05:20:14 +01:00
42_function_pointer.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
43_void_param.c tests2: move into tests 2013-02-05 13:22:36 +01:00
43_void_param.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
44_scoped_declarations.c tests: cleanup 2013-02-05 14:27:38 +01:00
44_scoped_declarations.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
45_empty_for.c tests: cleanup 2013-02-05 14:27:38 +01:00
45_empty_for.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
46_grep.c Turn on a implicit-function-declaration warning by default. 2015-03-03 16:32:25 +03:00
46_grep.expect tests2: fix and enable 46_grep test. 2014-04-12 14:04:10 -04:00
47_switch_return.c tests2: move into tests 2013-02-05 13:22:36 +01:00
47_switch_return.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
48_nested_break.c tests2: move into tests 2013-02-05 13:22:36 +01:00
48_nested_break.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
49_bracket_evaluation.c tests2: move into tests 2013-02-05 13:22:36 +01:00
49_bracket_evaluation.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
50_logical_second_arg.c tests: cleanup 2013-02-05 14:27:38 +01:00
50_logical_second_arg.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
51_static.c tests2: move into tests 2013-02-05 13:22:36 +01:00
51_static.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
52_unnamed_enum.c tests2: move into tests 2013-02-05 13:22:36 +01:00
52_unnamed_enum.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
54_goto.c tests: cleanup 2013-02-05 14:27:38 +01:00
54_goto.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
55_lshift_type.c tests2: move into tests 2013-02-05 13:22:36 +01:00
55_lshift_type.expect tests2: move into tests 2013-02-05 13:22:36 +01:00
60_errors_and_warnings.c Detect more invalid initializers 2019-03-18 03:31:11 +01:00
60_errors_and_warnings.expect Detect more invalid initializers 2019-03-18 03:31:11 +01:00
64_macro_nesting.c Turn on a implicit-function-declaration warning by default. 2015-03-03 16:32:25 +03:00
64_macro_nesting.expect Add new tests for macro nesting 2014-04-07 23:30:57 +08:00
67_macro_concat.c Fix preprocessor concat with empty arg 2014-04-12 16:11:42 +08:00
67_macro_concat.expect Fix preprocessor concat with empty arg 2014-04-12 16:11:42 +08:00
70_floating_point_literals.c Fix parsing of binary floating point number 2014-12-15 16:32:08 +08:00
70_floating_point_literals.expect Fix parsing of binary floating point number 2014-12-15 16:32:08 +08:00
71_macro_empty_arg.c Fix macro expansion of empty args. 2015-01-18 22:00:10 +01:00
71_macro_empty_arg.expect Fix macro expansion of empty args. 2015-01-18 22:00:10 +01:00
72_long_long_constant.c tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
72_long_long_constant.expect tccpp: fix issues, add tests 2015-05-09 14:29:39 +02:00
73_arm64.c arm64: Optimise some integer operations with a constant operand. 2015-03-07 17:42:08 +00:00
73_arm64.expect arm64: Optimise some integer operations with a constant operand. 2015-03-07 17:42:08 +00:00
75_array_in_struct_init.c A right fix for the array in struct initialization w/o '{' 2015-03-23 08:27:16 +03:00
75_array_in_struct_init.expect A right fix for the array in struct initialization w/o '{' 2015-03-23 08:27:16 +03:00
76_dollars_in_identifiers.c add missing test from -fdollar-in-identifiers commit 2015-04-20 12:03:45 +01:00
76_dollars_in_identifiers.expect add missing test from -fdollar-in-identifiers commit 2015-04-20 12:03:45 +01:00
77_push_pop_macro.c a test for the #pragma push/pop_macro 2015-04-25 15:03:50 +03:00
77_push_pop_macro.expect a test for the #pragma push/pop_macro 2015-04-25 15:03:50 +03:00
78_vla_label.c tccgen.c: Bug fix for 992cbda and 3ff77a1: set nocode_wanted. 2015-11-21 23:58:58 +00:00
78_vla_label.expect tccgen.c: Bug fix for 992cbda and 3ff77a1: set nocode_wanted. 2015-11-21 23:58:58 +00:00
79_vla_continue.c tests/tests2/79_vla_continue.c: Fix off-by-one error. 2015-11-13 21:49:29 +00:00
79_vla_continue.expect VLA fix: save stack pointer right after modification 2015-04-28 09:23:29 +00:00
80_flexarray.c tccgen.c: Fix flex array members some more 2016-03-11 22:35:44 +01:00
80_flexarray.expect tccgen.c: Fix flex array members some more 2016-03-11 22:35:44 +01:00
81_types.c Reorganize type parsing 2017-05-02 03:07:36 +02:00
81_types.expect Fix type parsing 2016-03-24 15:44:01 +01:00
82_attribs_position.c Fix more attribute placements 2018-12-31 22:00:31 +01:00
82_attribs_position.expect Fix misparsed type in presence of attributes 2018-07-28 18:55:54 +02:00
83_utf8_in_identifiers.c utf8 in identifiers 2016-04-05 13:05:09 +03:00
83_utf8_in_identifiers.expect utf8 in identifiers 2016-04-05 13:05:09 +03:00
84_hex-float.c updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
84_hex-float.expect updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
85_asm-outside-function.c updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
85_asm-outside-function.expect updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
86_memory-model.c updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
86_memory-model.expect updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
87_dead_code.c Code suppression fixes 2018-01-05 02:19:26 +01:00
87_dead_code.expect Code suppression fixes 2018-01-05 02:19:26 +01:00
88_codeopt.c Fix some code suppression fallout 2016-12-20 04:58:34 +01:00
88_codeopt.expect Fix some code suppression fallout 2016-12-20 04:58:34 +01:00
89_nocode_wanted.c updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
89_nocode_wanted.expect updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
90_struct-init.c Spelling fixes 2017-09-24 18:03:26 -07:00
90_struct-init.expect struct-init: Fix zero initialization with multi-level designators 2017-05-06 05:28:13 +02:00
91_ptr_longlong_arith32.c updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
91_ptr_longlong_arith32.expect updates & cleanups (tcc-doc/Changelog/TODO ...) 2017-02-13 19:03:29 +01:00
92_enum_bitfield.c Fix unsigned enum bit-fields 2017-05-05 23:16:43 +02:00
92_enum_bitfield.expect Fix unsigned enum bit-fields 2017-05-05 23:16:43 +02:00
93_integer_promotion.c bitfields: promote to signed int 2017-05-09 18:36:24 +02:00
93_integer_promotion.expect bitfields: promote to signed int 2017-05-09 18:36:24 +02:00
94_generic.c Fix type completion for array types as well 2018-11-30 23:43:30 +01:00
94_generic.expect patch type_to_str to handle complex function-ptr decls better 2018-04-01 00:38:11 +02:00
95_bitfields_ms.c #pragma comment(option,"-..."), bitfields test, etc... 2017-07-14 19:26:01 +02:00
95_bitfields_ms.expect tccgen: nodata_wanted fix, default ONE_SOURCE, etc... 2017-07-23 21:24:11 +02:00
95_bitfields.c various stuff 2017-10-11 18:13:43 +02:00
95_bitfields.expect tccgen: nodata_wanted fix, default ONE_SOURCE, etc... 2017-07-23 21:24:11 +02:00
96_nodata_wanted.c misc fixes 2018-06-01 12:52:01 +02:00
96_nodata_wanted.expect misc fixes 2018-06-01 12:52:01 +02:00
97_utf8_string_literal.c Add test case for wide char handling in wide string literal 2017-09-10 16:50:19 +08:00
97_utf8_string_literal.expect Add test case for wide char handling in wide string literal 2017-09-10 16:50:19 +08:00
98_al_ax_extend.c Convert two .c files to LF line endings 2017-09-24 16:48:08 -07:00
98_al_ax_extend.expect Add test case for AL/AX extending problem 2017-09-10 17:03:34 +08:00
99_fastcall.c Spelling fixes 2017-09-24 18:03:26 -07:00
99_fastcall.expect Add test case for fastcall calling convention 2017-09-10 18:22:48 +08:00
100_c99array-decls.c Don't fail on const/restrict/static/* inside [] 2018-04-01 00:48:09 +02:00
100_c99array-decls.expect Don't fail on const/restrict/static/* inside [] 2018-04-01 00:48:09 +02:00
101_cleanup.c More cleanup tests 2019-01-28 05:54:19 +01:00
101_cleanup.expect More cleanup tests 2019-01-28 05:54:19 +01:00
LICENSE tests2: move into tests 2013-02-05 13:22:36 +01:00
Makefile Revert "allow c11 feature only when -std=c11 is use" 2019-01-11 10:35:44 +01:00