aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add some missing nocode_wanted guardThomas Preud'homme2015-03-103-0/+3
| | | | | | int i = i++ causes a segfault because of missing guard. Looking recursively at all backend functions called from middle end several more guard appeared to be missing.
* tests/Makefile: Quote to avoid: /bin/sh: 1: [: !=: unexpected operatorEdmund Grimley Evans2015-03-071-1/+1
|
* arm64: Optimise some integer operations with a constant operand.Edmund Grimley Evans2015-03-072-0/+119
|
* Disable floating-point test for ARM soft-floatseyko2015-03-042-2/+14
| | | | | | | | | | | From: Matteo Cypriani <mcy@lm7.fr> Date: Fri, 5 Sep 2014 23:22:56 -0400 Subject: Disable floating-point test for ARM soft-float tcc is not yet capable of doing softfloat floating-point operations on ARM, therefore we disable this test for these platforms. Note that tcc displays a warning to warn ARM users about this limitation (debian)
* disable-BTESTSseyko2015-03-041-1/+0
|
* Disable floating-point test for ARM soft-floatseyko2015-03-031-0/+2
| | | | | | | | | | | From: Matteo Cypriani <mcy@lm7.fr> Date: Fri, 5 Sep 2014 23:22:56 -0400 Subject: Disable floating-point test for ARM soft-float tcc is not yet capable of doing softfloat floating-point operations on ARM, therefore we disable this test for these platforms. Note that tcc displays a warning to warn ARM users about this limitation (debian)
* Turn on a implicit-function-declaration warning by default.seyko2015-03-032-0/+3
| | | | | | | | A non declared function leads to a seriuos problems. And while gcc don't turn this warning on lets tcc do it. This warning can be turned off by -Wno-implicit-function-declaration option. And autor must explicitly do this if program must be compiled with this warning off.
* arm64: Improve constant generation, with tests.Edmund Grimley Evans2015-03-022-0/+33
|
* 73_arm64.c: Avoid taking address of return value.Edmund Grimley Evans2015-02-261-21/+42
|
* Add 73_arm64 for testing some arm64 things, mostly PCS.Edmund Grimley Evans2015-02-253-0/+529
|
* tests/tcctest.c: Test COMPAT_TYPE(char *, signed char *).Edmund Grimley Evans2015-02-241-0/+2
|
* The "open a whisky and cut your finger open" patchThomas Preud'homme2015-02-182-3/+21
| | | | Make integer constant parsing C99 compliant
* Fix macro expansion of empty args.Reimar Döffinger2015-01-183-1/+13
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Allow tcc to understand a setob,... opcodes as alias to seto,...seyko2015-01-061-0/+2
| | | | | | PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html This is fix PR8686 for llvm: accepting a 'b' suffix at the end of all the setcc instructions.
* round() in test (24_math_library) fail because there are no defs included.seyko2015-01-051-0/+2
| | | | gcc complain but work right and tcc simply fail to compile right.
* Fix parsing of binary floating point numberLee Duhem2014-12-153-1/+132
| | | | | | | * tccpp.c (parse_number): `shift' should be 1 while parsing binary floating point number. * tests/tests2/70_floating_point_literals.c: New test cases for floating point number parsing.
* Filter-out warning about softfloat in tests2Matteo Cypriani2014-10-171-2/+2
|
* Clear CFLAGS & LDFLAGS in testsMatteo Cypriani2014-09-072-0/+8
| | | | | | Clear CFLAGS and LDFLAGS to build the tests, in case the main Makefile passes some flags that aren't handled by tcc (we are not compiling tcc here, we are using tcc to compile the tests).
* Rename:jiang2014-07-017-6/+6
| | | | | | 68_macro_concat.c -> 68_macro_param_list_err_1.c 69_macro_concat.c -> 69_macro_param_list_err_2.c and Remove spaces
* bug:jiang2014-06-295-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- #define hexCh(c (c >= 10 ? 'a' + c - 10 : '0' + c) hexCh(c); out: jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" (c >= 10 ? 'a' + c - 10 : '0' + c); --------------------------------------------------------------- #define hexCh(c/3) (c >= 10 ? 'a' + c - 10 : '0' + c) hexCh(c); out: jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" /3) (c >= 10 ? 'a' + c - 10 : '0' + c); jiang@jiang:~/test$ after patch: # 1 "c4.c" c4.c:1: error: may not appear in macro parameter list: "(" jiang@jiang:~/test$ jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" c4.c:1: error: may not appear in macro parameter list: "/" jiang@jiang:~/test$
* tests2: fix and enable 46_grep test.minux2014-04-123-8/+13
|
* tests2: fix 30_hanoi test and enable it.minux2014-04-122-2/+2
|
* Fix preprocessor concat with empty argThomas Preud'homme2014-04-123-1/+18
|
* build: ignore and properly clean tests/vla_testminux2014-04-121-1/+1
|
* Prevent ## to appear at start or end of macroThomas Preud'homme2014-04-085-1/+9
|
* Add new tests for macro nestingThomas Preud'homme2014-04-073-1/+13
|
* Corrected spelling mistakes in comments and stringsVincent Lefevre2014-04-073-7/+7
|
* tests2: cleanupgrischka2014-04-073-23/+25
| | | | | | | | | - remove -norunsrc switch Meaning and usage (-run -norun...???) look sort of screwed. Also general usefulness is unclear, so it was actually to support exactly one (not even very interesting) test This partially reverts e31579b0769e1f9c0947d12e83316d1149307b1a
* win32: libtcc1.a needs to be built with tccgrischka2014-04-071-3/+3
| | | | | gcc/mingw produces msvc compatible pecoff objects, tcc only knows ELF.
* arm: Provide alloca()Michael Matz2014-04-051-2/+2
| | | | | | This provides a simple implementation of alloca for ARM (and enables the associated testcase). As tcc for ARM doesn't contain an assembler, we'll have to resort using gcc for compiling it.
* tests2: Build executables as wellMichael Matz2014-04-051-1/+6
| | | | | The individual tests in tests2 are checked only with -run. Build (and check) executables as well, to test also building executables.
* Allow local redefinition of enumeratorThomas Preud'homme2014-03-313-1/+16
|
* Add tests for previous fixesThomas Preud'homme2014-03-3011-1/+30
| | | | | | | | | Add tests for the fixes made in commits 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6, a465b7f58fdea15caa1bfb81ff5e985c94c4df4a, 0f522fb32a635dafce30f3ce3ff2cb15bcec809e, 82969f045c99b4d1ef833de35117c17b326b46c0 and 673befd2d7745a90c1c4fcb6d2f0e266c04f8c97.
* Add the generated executables ending with "-cc" and "-tcc" to the makefile ↵mingodad2014-03-261-3/+4
| | | | "clean"
* Add test for previous commitThomas Preud'homme2014-03-255-4/+10
| | | | | * Adapt tests2 Makefile to support testing tcc error reporting * Add test for previous commit
* Don't hardcode gcc in tests MakefileThomas Preud'homme2014-03-091-7/+7
|
* Fix and extend *FCAST test in tcctest.cThomas Preud'homme2014-02-051-5/+8
| | | | | | | Result of float to unsigned integer conversion is undefined if float is negative. This commit take the absolute value of the float before doing the conversion to unsigned integer and add more float to integer conversion test.
* Don't perform builtin_frame_address on ARMThomas Preud'homme2014-02-031-2/+3
|
* Test long long to float conversionsThomas Preud'homme2014-02-011-0/+8
|
* tcctest: add back testXb (self compile with -b)grischka2014-01-211-18/+22
| | | | | | | | | | | | | | | | | | - Thanks to Kirill "tcc -b itself" should work now (was removed in d5f4df09ff4a84dda5b03525285f03be7723376b) Also: - tests/Makefile: - fix spurious --I from 767410b8750b45d63805b45ca1a2cf34d7cb4923 - lookup boundtest.c via VPATH (for out-of-tree build) - test[123]b?: fail on diff error - Windows: test3 now works (from e31579b0769e1f9c0947d12e83316d1149307b1a) - abitest: a libtcc.a made by gcc is not usable for tcc on WIndows - using source instead (libtcc.c) - tccpe: - avoid gcc warning (x86_64)
* tcctest: One more signed zero testMichael Matz2014-01-121-0/+6
| | | | This also checks that -(-0.0) is +0.0.
* Fix floating point unary minus and plusMichael Matz2014-01-121-0/+24
| | | | | | | negate(x) is subtract(-0,x), not subtract(+0,x), which makes a difference with signed zeros. Also +x was expressed as x+0, in order for the integer promotions to happen, but also mangles signed zeros, so just don't do that with floating types.
* Various Makefile fixes for cross-compilationThomas Preud'homme2014-01-091-1/+14
| | | | | | - Build libtcc1 for cross-compiler on arm (arm to X cross compilers) - Install libtcc1 and includes for arm to i386 cross compiler - Add basic check of cross-compilers (compile ex1.c)
* misc. fixesgrischka2014-01-063-23/+21
| | | | | | | | | | | | | | | | | | | | | | - tccgen: error out for cast to void, as in void foo(void) { return 1; } This avoids an assertion failure in x86_64-gen.c, also. also fix tests2/03_struct.c accordingly - Error: "memory full" - be more specific - Makefiles: remove circular dependencies, lookup tcctest.c from VPATH - tcc.h: cleanup lib, include, crt and libgcc search paths" avoid duplication or trailing slashes with no CONFIG_MULTIARCHDIR (as from 9382d6f1a0e2d0104a82ed805207d9e742c6b068) - tcc.h: remove ";{B}" from PE search path in ce5e12c2f950052d8109b6b7a56d900547705c08 James Lyon wrote: "... I'm not sure this is the right way to fix this problem." And the answer is: No, please. (copying libtcc1.a for tests instead) - win32/build_tcc.bat: do not move away a versioned file
* Add ARM aeabi functions needed to run tcctestThomas Preud'homme2013-12-111-0/+67
| | | | | | | | | | | | Add implementation for float / integer conversion functions: __aeabi_d2lz, __aeabi_d2ulz, __aeabi_f2lz, __aeabi_f2ulz, __aeabi_l2d, __aeabi_l2f, __aeabi_ul2d, __aeabi_ul2f Add implementation for long long helper functions: __aeabi_ldivmod, __aeabi_uldivmod, __aeabi_llsl, __aeabi_llsr, __aeabi_lasr Add implementation for integer division functions: __aeabi_uidiv, __aeabi_uidivmod, __aeabi_idiv, __aeabi_idivmod,
* Make abitest.c have predictable resultThomas Preud'homme2013-11-251-2/+2
| | | | | | | | stdarg_test in abitest.c relies on a sum of some parameters made by both the caller and the callee to reach the same result. However, the variables used to store the temporary result of the additions are not initialized to 0, leading to uncertainty as to the results. This commit add this needed initialization.
* Improved variable length array support.James Lyon2013-04-273-5/+105
| | | | | | | | | | | | | | | VLA storage is now freed when it goes out of scope. This makes it possible to use a VLA inside a loop without consuming an unlimited amount of memory. Combining VLAs with alloca() should work as in GCC - when a VLA is freed, memory allocated by alloca() after the VLA was created is also freed. There are some exceptions to this rule when using goto: if a VLA is in scope at the goto, jumping to a label will reset the stack pointer to where it was immediately after the last VLA was created prior to the label, or to what it was before the first VLA was created if the label is outside the scope of any VLA. This means that in some cases combining alloca() and VLAs will free alloca() memory where GCC would not.
* Fixed x86-64 long double passing.James Lyon2013-04-261-0/+19
| | | | | | long double arguments require 16-byte alignment on the stack, which requires adjustment when the the stack offset is not an evven number of 8-byte words.
* Fixed silly error in Windows build of tests (abitest-cc not linking to libtcc)James Lyon2013-04-262-33/+34
| | | | | | | | I really should do this when less tired; I keep breaking one platform while fixing another. I've also fixed some Windows issues with tcctest since Windows printf() uses different format flags to those on Linux, and removed some conditional compilation tests in tcctest since they now should work.
* Fixed i386 calling convention issue and CMake build on i386.James Lyon2013-04-261-2/+2
| | | | | The i386 calling convention expects the callee to pop 1 word of the stack when performing a struct ret.