aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* tccpp: fix issues, add testsgrischka2015-05-091-87/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix some macro expansion issues * add some pp tests in tests/pp * improved tcc -E output for better diff'ability * remove -dD feature (quirky code, exotic feature, didn't work well) Based partially on ideas / researches from PipCet Some issues remain with VA_ARGS macros (if used in a rather tricky way). Also, to keep it simple, the pp doesn't automtically add any extra spaces to separate tokens which otherwise would form wrong tokens if re-read from tcc -E output (such as '+' '=') GCC does that, other compilers don't. * cleanups - #line 01 "file" / # 01 "file" processing - #pragma comment(lib,"foo") - tcc -E: forward some pragmas to output (pack, comment(lib)) - fix macro parameter list parsing mess from a3fc54345949535524d01319e1ca6378b7c2c201 a715d7143d9d17da17e67fec6af1c01409a71a31 (some coffee might help, next time ;) - introduce TOK_PPSTR - to have character constants as written in the file (similar to TOK_PPNUM) - allow '\' appear in macros - new functions begin/end_macro to: - fix switching macro levels during expansion - allow unget_tok to unget more than one tok - slight speedup by using bitflags in isidnum_table Also: - x86_64.c : fix decl after statements - i386-gen,c : fix a vstack leak with VLA on windows - configure/Makefile : build on windows (MSYS) was broken - tcc_warning: fflush stderr to keep output order (win32)
* VLA fix: save stack pointer right after modificationPhilip2015-04-281-3/+3
| | | | | | | | | | | | | | | | This patch disables the optimization of saving stack pointers lazily, which didn't fully take into account that control flow might not reach the stack-saving instructions. I've decided to leave in the extra calls to vla_sp_save() in case anyone wants to restore this optimization. Tests added and enabled. There are two remaining bugs: VLA variables can be modified, and jumping into the scope of a declared VLA will cause a segfault rather than a compiler error. Both of these do not affect correct C code, but should be fixed at some point. Once VLA variables have been made properly immutable, we can share them with the saved stack pointer and save stack and instructions.
* fix VLA/continue issuePhilip2015-04-271-2/+3
| | | | | | | | | | | | | | | | | | as reported in http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00131.html. Note that this is one of two separate VLA bugs: A. labels aren't reached by program execution, so the stack pointer is never saved B. continue doesn't restore the stack pointer as goto does This fixes only B. I'm not sure whether the same issue applies to break as well as continue. Add a test case, but disable tests #78 and #79 for now as they're not fully fixed until the issue described in http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00110.html is resolved.
* add test case for VLA segfaultsPhilip2015-04-271-1/+2
| | | | | | | | | This test obviously shouldn't segfault, but currently does so. The problem is in the VLA code, which fails to save the stack pointer before taking a conditional branch in some cases. See this thread: http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00130.html
* a test for the #pragma push/pop_macroseyko2015-04-251-1/+2
|
* Revert "* and #pragma pop_macro("macro_name")"grischka2015-04-231-2/+1
| | | | | | | | | | | | - pop_macro incorrect with initially undefined macro - horrible implementation (tcc_open_bf) - crashes eventually (abuse of Sym->prev_tok) - the (unrelated) asm_label part is the opposite of a fix (Despite of its name this variable has nothing to do with the built-in assembler) This reverts commit 0c8447db7970813292a8be74ee50e49091be5d15.
* * and #pragma pop_macro("macro_name")seyko2015-04-211-1/+2
| | | | | | | | | | * give warning if pragma is unknown for tcc * don't free asm_label in sym_free(), it's a job of the asm_free_labels(). The above pragmas are used in the mingw headers. Thise pragmas are implemented in gcc-4.5+ and current clang.
* -fdollar-in-identifiers addonseyko2015-04-201-4/+8
| | | | | | | * disable a -fdollar-in-identifiers option in assembler files * a test is added This is a patch addon from Daniel Holden.
* A right fix for the array in struct initialization w/o '{'seyko2015-03-231-1/+2
| | | | | Parse a type if there is only one '(' before a type token. Otherwise a recursion will perform a job.
* skip 73_arm64,test on ARCH=x86-64: it fails on this ARCHseyko2015-03-201-0/+3
|
* Add some missing nocode_wanted guardThomas Preud'homme2015-03-101-0/+1
| | | | | | 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.
* Disable floating-point test for ARM soft-floatseyko2015-03-041-0/+3
| | | | | | | | | | | 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)
* Add 73_arm64 for testing some arm64 things, mostly PCS.Edmund Grimley Evans2015-02-251-0/+1
|
* The "open a whisky and cut your finger open" patchThomas Preud'homme2015-02-181-3/+4
| | | | Make integer constant parsing C99 compliant
* Fix macro expansion of empty args.Reimar Döffinger2015-01-181-1/+3
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Fix parsing of binary floating point numberLee Duhem2014-12-151-1/+2
| | | | | | | * 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-071-0/+4
| | | | | | 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-011-2/+2
| | | | | | 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-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- #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-121-3/+2
|
* tests2: fix 30_hanoi test and enable it.minux2014-04-121-1/+1
|
* Fix preprocessor concat with empty argThomas Preud'homme2014-04-121-1/+2
|
* Prevent ## to appear at start or end of macroThomas Preud'homme2014-04-081-1/+3
|
* Add new tests for macro nestingThomas Preud'homme2014-04-071-1/+2
|
* tests2: cleanupgrischka2014-04-071-16/+19
| | | | | | | | | - 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.
* 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-311-1/+2
|
* Add tests for previous fixesThomas Preud'homme2014-03-301-1/+6
| | | | | | | | | Add tests for the fixes made in commits 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6, a465b7f58fdea15caa1bfb81ff5e985c94c4df4a, 0f522fb32a635dafce30f3ce3ff2cb15bcec809e, 82969f045c99b4d1ef833de35117c17b326b46c0 and 673befd2d7745a90c1c4fcb6d2f0e266c04f8c97.
* Add test for previous commitThomas Preud'homme2014-03-251-4/+6
| | | | | * Adapt tests2 Makefile to support testing tcc error reporting * Add test for previous commit
* misc. fixesgrischka2014-01-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | - 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
* Sorted out CMake on x86-64 and fixed silly XMM# bug introduced when working ↵James Lyon2013-04-251-1/+1
| | | | | | | | | on Win64 stdargs. I removed the XMM6/7 registers from the register list because they are not used on Win64 however they are necessary for parameter passing on x86-64. I have now restored them but not marked them with RC_FLOAT so they will not be used except for parameter passing.
* Fixed tests on Windows (including out-of-tree problems)James Lyon2013-04-171-3/+6
| | | | | | | | | | | Modified tcctest.c so that it uses 'double' in place of 'long double' with MinGW since this is what TCC does, and what Visual C++ does. Added an option -norunsrc to tcc to allow argv[0] to be set independently of the compiled source when using tcc -run, which allows tests that rely on the value of argv[0] to work in out-of-tree builds. Also added Makefile rules to automatically update out-of-tree build Makefiles when in-tree Makefiles have changed.
* tests: cleanupgrischka2013-02-051-80/+75
| | | | | | | | | | | | | | | | tests: - add "hello" to test first basic compilation to file/memory - add "more" test (tests2 suite) - remove some tests tests2: - move into tests dir - Convert some files from DOS to unix LF - remove 2>&1 redirection win32: - tccrun.c: modify exception filter to exit correctly (needed for btest) - tcctest.c: exclude weak_test() (feature does not exist on win32)
* tests2: move into testsgrischka2013-02-051-0/+103