Jesse Rosenstock
b931e65811
Fix ICE for bit-fields with typedef
...
Fixes #1267
Avoid ICE, but treat plain int bit-fields declared via typedef as
signed rather than unsigned. It is more efficient to treat them
as unsigned, but this requires distinguishing int from signed int,
and this is curently not done.
2020-10-03 15:04:31 +02:00
Oliver Schmidt
4acdc9ced9
Fixed paramcount build.
2020-10-03 14:55:30 +02:00
mrdudz
b549e83fb2
move program from testcode/assembler to test/asm and remove testcode/assembler
2020-09-29 19:03:42 +02:00
mrdudz
34177d9edd
test related to issue #1094
2020-09-25 20:08:32 +02:00
mrdudz
7ff08c85cf
Merge branch 'master' of https://github.com/cc65/cc65
2020-09-25 16:25:53 +02:00
mrdudz
61d934fd7b
test related to issue #1265
2020-09-25 16:25:32 +02:00
Greg King
47ee179273
Fixed a copy & paste error in the test/misc/ makefile.
...
Fixed a warning that's changed to an error in Travis CI tests.
2020-09-25 00:31:07 -04:00
mrdudz
5ba9d28488
test related to pr #1189
2020-09-24 16:16:16 +02:00
mrdudz
97a1093ee0
test related to issue #1222
2020-09-24 12:23:18 +02:00
mrdudz
a86644eff1
test related to issue #1221
2020-09-24 00:08:36 +02:00
mrdudz
b3491e3d9a
test related to issue #1244
2020-09-23 23:57:36 +02:00
mrdudz
46ebb15c76
test related to issue #1245
2020-09-23 23:57:25 +02:00
mrdudz
6fdd90fa63
fix typo
2020-09-23 23:51:37 +02:00
mrdudz
99121688f8
added test related to issue #1263
2020-09-23 23:51:24 +02:00
Jesse Rosenstock
4e4e4c2d21
Allow char bit-fields
...
These are not required to be supported (only int, signed int, and
unsigned int are required), but most compilers support it.
https://port70.net/~nsz/c/c89/c89-draft.html#3.5.2.1
https://port70.net/~nsz/c/c89/c89-draft.html#A.6.5.8
For consistency with other integral types, plain `char` bit-fields
are unsigned, regardless of the `--signed-chars` option.
Fixes #1047
2020-09-08 14:24:04 +02:00
Jesse Rosenstock
9a0e4a35e1
Fix enum bit-field ICE #1244
...
This previously resulted in an ICE:
cc65: Check failed: (Entry->Type->C & T_MASK_SIGN) == T_SIGN_SIGNED,
file 'cc65/symtab.c', line 874
This CHECK is in the code that deals with changing `int` bitfields to
`unsigned int`.
Work around this by treating enum bit-fields as having their signedness
specified, so this type change code does not get called.
Fixes #1244 .
2020-09-07 11:21:23 +02:00
Jesse Rosenstock
44b719d957
Change line endings from CRLF to LF
...
test/ref/pr1220.c was somehow added with CRLFs.
Other files use just LF.
2020-09-04 14:01:21 +02:00
acqn
2a3d996077
Improved test case for PR #1220 .
2020-09-02 21:36:59 +02:00
acqn
492ee7fc45
Improved test/ref/pr1220.c.
2020-08-30 03:10:24 +08:00
acqn
504aee3835
Merge branch 'master' into StaticConst
2020-08-27 06:27:23 +08:00
mrdudz
c1a514c0f8
added test related to issue #1201
2020-08-26 23:20:28 +02:00
Oliver Schmidt
b0d3b19a6a
The bug1209 test fails at link stage.
2020-08-26 21:01:02 +02:00
Oliver Schmidt
c658acbf85
Avoid cl65 in tests.
...
cl65 creates intermediate files based on the source file name in the source file directory. Calling cl65 in parallel with the same source file causes those intermediate files to get overwritten.
Fixes #1080
2020-08-26 20:39:34 +02:00
acqn
b6a4715a38
Added test/ref/pr1220 for testing constant AND/OR code generation.
2020-08-26 08:45:01 +08:00
acqn
d68925c6a8
Bug #1113 was fixed long ago.
2020-08-25 22:34:25 +08:00
Jesse Rosenstock
344aea0669
Add additional test cases for #1209
...
These test cases don't use dynamic labels.
https://github.com/cc65/cc65/issues/1209#issuecomment-678738971
Also update the original test case for consistency:
* Change failure message to just "FAIL", as there is only one failure
* Outdent label definitions
* Clarify description
2020-08-24 19:15:06 +02:00
Jesse Rosenstock
d38e5858f0
Add tests for #1211
...
CL_MoveRefs: Add CHECK (E->JumpTo != NULL) to make failure clearer.
2020-08-24 18:10:22 +02:00
Jesse Rosenstock
4b7cd491e3
Move #1209 test from err/ to misc/
...
misc/ is the correct place for tests that should compile
but do not.
Revert err/Makefile changes from #1210 .
2020-08-24 18:07:31 +02:00
Jesse Rosenstock
23621f3299
Add test case for #1209
...
Change err/ tests to use cl65 and .prg instead of cc65 and .s
since this test only fails at the link stage.
2020-08-22 15:27:49 +02:00
acqn
0486d28abc
Fixed Issue #327 .
2020-08-22 13:44:18 +02:00
acqn
1abb9da2b2
Moved bug250.c to test/val as it is fixed.
2020-08-26 09:40:32 +08:00
acqn
b15ab348ba
Moved bug250.c from test/misc as it is to be fixed.
2020-08-26 08:23:05 +08:00
mrdudz
794adcc512
remove unneeded rule
2020-08-19 22:33:10 +02:00
mrdudz
e6b8f4d715
move/fix bug264.c as suggested in issue #1122
2020-08-19 22:25:18 +02:00
mrdudz
1a92368aed
rename bdiff.c to isequal.c, make it handle different line-endings as equal
2020-08-19 14:50:12 +02:00
mrdudz
0690a12ad2
change "the cc65 authors" to "The cc65 Authors" as per jmrs request
2020-08-18 22:41:42 +02:00
mrdudz
0c22d5011e
added test related to pr #1190
2020-08-18 17:58:29 +02:00
mrdudz
ab89c168de
replace "Copyright 2020 Google LLC" by "Copyright 2020 the cc65 authors"
2020-08-18 17:47:35 +02:00
Jesse Rosenstock
ff535b8e1a
Treat signed int bit-fields as signed
...
Prior to this PR, `int`, `signed int`, and `unsigned int`
bitfields are all treated as `unsigned int`.
With this PR, `signed int` will be treated as `signed int`,
and the others remain unsigned.
Since `Type` does not distinguish between `int` and `signed int`,
add an extra `int* SignenessSpecified` param to `ParseTypeSpec`
so we can tell these apart for bit-fields and treat plain `int : N`
as `unsigned int : N` since it is more efficient to zero-extend
than sign-extend.
Fixes #1095
2020-08-18 12:23:20 +02:00
mrdudz
2663561c62
added test related to pr #1135
2020-08-18 00:41:35 +02:00
mrdudz
6d8860b9de
added test related to issue #1145
2020-08-18 00:41:07 +02:00
mrdudz
cf41fccc0a
added test related to issue #1143
2020-08-18 00:40:29 +02:00
Bob Andrews
531de44c95
Merge pull request #1193 from jmr/bitfield-union-bug
...
Add test of union of bit-field from mailing list
2020-08-17 14:33:51 +02:00
Jesse Rosenstock
6db93d58cf
Add test of union of bit-field from mailing list
...
https://sourceforge.net/p/cc65/mailman/message/36152700/
This currently works, but add a test to prevent future regressions.
2020-08-17 09:54:31 +02:00
Jesse Rosenstock
1cf9404c19
Support C2X _Static_assert(expr) syntax
...
This makes the message in _Static_assert(expr, message) optional.
Fixes #1188 .
2020-08-16 11:38:20 +02:00
Jesse Rosenstock
c4698dfd07
Use C89 semantics for integer conversions
...
Previously, the following rules were used for binary operators:
* If one of the values is a long, the result is long.
* If one of the values is unsigned, the result is also unsigned.
* Otherwise the result is an int.
C89 specifies the "usual arithmetic conversions" as:
* The integral promotions are performed on both operands.
* Then the following rules are applied:
* If either operand has type unsigned long int, the other operand is
converted to unsigned long int.
* Otherwise, if one operand has type long int and the other has type
unsigned int, if a long int can represent all values of an unsigned int,
the operand of type unsigned int is converted to long int; if a long int
cannot represent all the values of an unsigned int, both operands are
converted to unsigned long int.
* Otherwise, if either operand has type long int, the other operand is
converted to long int.
* Otherwise, if either operand has type unsigned int, the other operand is
converted to unsigned int.
* Otherwise, both operands have type int.
https://port70.net/~nsz/c/c89/c89-draft.html#3.2.1.5
As one example, these rules give a different result for an operator
with one long operand and one unsigned int operand. Previously,
the result type was unsigned long. With C89 semantics, it is just long,
since long can represent all unsigned ints.
Integral promotions convert types shorter than int to int (or unsigned int).
Both char and unsigned char are promoted to int since int can represent
all unsigned chars.
https://port70.net/~nsz/c/c89/c89-draft.html#3.2.1.1
Rename promoteint to ArithmeticConvert, since this is more accurate.
Fixes #170
2020-08-15 19:14:31 +02:00
mrdudz
f0e4053a0d
added test related to issue #1178
2020-08-14 19:58:58 +02:00
acqn
1d28e8e3de
Improved test case for Issue #191 .
2020-08-14 18:33:54 +02:00
mrdudz
dc83eb15af
added test related to issue #1181
2020-08-14 16:12:17 +02:00
acqn
8b8561161c
Moved #1098 bug tests from test/misc to test/err as they are fixed now.
2020-08-12 15:02:43 +02:00
acqn
e3d913b81a
Fixed the reference output of test/misc/goto.c (test/misc/goto.ref).
2020-08-02 23:51:11 +02:00
Jesse Rosenstock
633cd17a3e
Add enum size test case for #1050
2020-08-02 01:18:28 +02:00
Jesse Rosenstock
847982c6bf
Handle bit-field test after shift/mask
...
Previously, bit-field tests were incorrectly combined with load in
`if (x.bitfield)`. Delay the test until after the shift/mask
is done. Still combine tests with load if no shift/mask is required.
Fixes #1139
2020-07-31 19:33:28 +02:00
Jesse Rosenstock
3df6c383c0
Add support for static_assert
...
Add C11's _Static_assert and static_assert macro.
This is like #error, but is handled at a later stage
of translation, so it is possible to check sizes of
types, values of enums, etc.
https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10
2020-07-30 19:17:11 +02:00
Jesse Rosenstock
c72fa735b9
Add test for #1139
2020-07-30 19:13:19 +02:00
Jesse Rosenstock
2d5fd0fc63
Use char ops if possible for bit-field loads
...
Set CF_FORCECHAR and change type to char once we have
shifted into a char.
This saves some unnecessary ldx #0 instructions.
2020-07-30 14:59:23 +02:00
Jesse Rosenstock
aaa0cf5448
Add err tests for bitfield width errors
...
! ../../bin/cc65 -o ../../testwrk/err/bitfield-named-zero-width.s bitfield-named-zero-width.c
bitfield-named-zero-width.c(27): Error: Zero width for named bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-negative-width.s bitfield-negative-width.c
bitfield-negative-width.c(26): Error: Negative width in bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-too-wide.s bitfield-too-wide.c
bitfield-too-wide.c(26): Error: Width of bit-field exceeds its type
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
74dda01919
Add test that plain int bitfields are unsigned
...
We want to make sure this doesn't change when #1095 is fixed;
unsigned is much more efficient.
2020-07-29 16:43:17 +02:00
acqn
35e1efc7f2
Moved misc/bug1048 as it is already correctly rejected by the compiler.
2020-07-28 23:26:25 +02:00
Jesse Rosenstock
c272c73686
Add err test for char bit-fields #1047
2020-07-28 22:03:01 +02:00
Jesse Rosenstock
c0f2b69bef
Add test case for sign extending < 1 byte
2020-07-28 22:01:22 +02:00
Jesse Rosenstock
04d16b3740
Make $WORKDIR for tests/err
...
Without this, if there is a test that can compile,
it will still fail because the WORKDIR does not exist:
```
pass.c(1): Fatal: Cannot open output file '../../testwrk/err/pass.s': No such file or directory
```
2020-07-28 21:59:12 +02:00
Oliver Schmidt
4316242d7e
Adjusted to 5df2de0629
(and slightly simplified).
2020-07-27 17:47:14 +02:00
mrdudz
ed3f281b9e
fix wording
2020-07-27 14:40:27 +02:00
mrdudz
afe455238c
added test related to issue #1113
2020-07-22 15:55:55 +02:00
mrdudz
98b2d43c2b
added tests related to pr #1110
2020-07-22 15:52:04 +02:00
mrdudz
ce06b20c6c
add some details to the readme
2020-07-22 15:31:39 +02:00
mrdudz
844f5a9d33
hook up test/todo in the toplevel test makefile
2020-07-22 15:12:29 +02:00
mrdudz
6abf24e25e
move test for issue #1077 to test/val
2020-07-22 15:12:02 +02:00
mrdudz
e22e9c403c
added testcase for issue #1098
2020-07-22 14:57:40 +02:00
mrdudz
eb094ecf6a
remove ifdef magic
2020-07-22 00:21:23 +02:00
mrdudz
4a9c5ff63b
use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day
2020-07-22 00:09:48 +02:00
mrdudz
6d518a61a5
Merge branch 'master' of https://github.com/cc65/cc65
2020-07-21 23:52:24 +02:00
mrdudz
df900e30b8
removed references to macros from common.h
2020-07-21 23:50:23 +02:00
Brad Smith
041f981960
rand() use XOR to break up unwanted pair correlation ( #1107 )
...
* rand() use XOR to break up unwanted pair correlation
This form of rand() cannot return the same value twice in a row.
Two additonal EOR instructions produce a more even distribution of successive pairs.
see comments on #951
* rand.s document purpose of XOR
* suggested srand() optimization: zero fill unnecessary
* test to validate implementation of rand()
* srand() improving behaviour and adding startup test
* srand() with a tail call to rand() for better initial shuffle
* srand() can fall through to rand() instead of tail call
2020-07-21 23:38:18 +02:00
mrdudz
7e1f4760e7
remove common.h from test/misc, its no more used
2020-07-21 23:31:58 +02:00
mrdudz
2bbea6779a
properly configure sitest so it could work, if we had the respective features :)
2020-07-21 23:04:03 +02:00
mrdudz
9e43c0a569
added a test related to pr#1102 - we can now return structs by value when they are max. 4 bytes
2020-07-21 21:04:41 +02:00
mrdudz
145084c41c
move test for issue #1075 to test/var
2020-07-21 20:02:51 +02:00
mrdudz
42c162c15e
rework test for issue #1075 to return an exit code
2020-07-21 19:58:36 +02:00
mrdudz
a0c80a8c72
move (now working) tests to test/val
2020-07-21 19:24:39 +02:00
mrdudz
b2d7998241
update makefile to use $(NOT) as discussed with Oliver
2020-07-21 19:15:41 +02:00
mrdudz
e4fc7a0fec
reworked pptest3 into an exectutable test and moved to test/val
2020-07-21 15:30:35 +02:00
mrdudz
010ed6d729
reworked pptest1/4/5 into executable tests and moved to test/val
2020-07-21 14:58:15 +02:00
mrdudz
638e254668
rework pptest2 into a runable test and move to test/misc (since it does not compile with cc65)
2020-07-21 14:48:49 +02:00
Greg King
517df130cc
Made a regression test increment a variable after, instead of before, using it.
...
That change allows the initial value of zero to be tested.
2020-07-20 17:16:11 -04:00
mrdudz
5a9d76ad52
added test for issue #1108
2020-07-20 15:50:11 +02:00
Jesse Rosenstock
bbcb39978c
Add test of signed bitfields for #1095
2020-07-19 11:05:27 +02:00
mrdudz
a4f1e37f0c
increase the maximum amount of cycles, else the shift test will fail
2020-07-13 21:26:31 +02:00
mrdudz
5ad365c5df
some tweaks to the moved tests to make them more suitable for automatic testing
2020-07-13 21:26:07 +02:00
mrdudz
882194c221
move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo)
2020-07-13 21:25:13 +02:00
mrdudz
d940c9aa85
added a bit more precise description
2020-07-13 17:04:22 +02:00
mrdudz
390f972014
updated Makefile with exception rules for the added tests
2020-07-13 15:16:26 +02:00
mrdudz
5597b83d04
added testcase for issue #975
2020-07-13 15:13:38 +02:00
mrdudz
36ff372149
added testcase for issue #760
2020-07-13 15:13:22 +02:00
mrdudz
bec140143b
added testcase for issue #760
2020-07-13 15:13:06 +02:00
mrdudz
f8873c2508
added testcase for issue #250
2020-07-13 15:12:47 +02:00
mrdudz
f5d99106e6
added testcase for issue #1075
2020-07-13 15:12:30 +02:00
mrdudz
693e3a7109
added testcase for issue #1048
2020-07-13 15:12:04 +02:00
Oliver Schmidt
bcb8b49907
Removed executable bit.
2020-07-12 23:11:43 +02:00
Jesse Rosenstock
df97570471
Set .NOTPARALLEL in test/misc and test/val
...
The cl65 intermediate files stomp each other in
these directories.
2020-07-10 13:08:19 +02:00
Jesse Rosenstock
3999f2ad75
Move .NOTPARALLEL closer to rule that needs it
2020-07-10 13:08:19 +02:00
Jesse Rosenstock
878e4a57c8
Make Makefiles more -j friendly
...
Add .$1.$2 to outputs missing them.
2020-07-10 13:08:19 +02:00
mrdudz
579b50f0c5
test for issue #927
2020-07-09 16:18:08 +02:00
mrdudz
2428285694
test for issue #327
2020-07-09 16:17:31 +02:00
mrdudz
ff18218b0a
test for issue #170
2020-07-09 16:17:16 +02:00
mrdudz
5925a7f8ee
test for issue #1077
2020-07-09 16:16:46 +02:00
mrdudz
4b8b15a07a
tests for issue #169
2020-07-09 16:05:57 +02:00
mrdudz
93f0df58e5
test related to issue #1071
2020-07-09 15:57:51 +02:00
Jesse Rosenstock
359da1ae76
Update bit-field tests after #1058 merge
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8449c9eaa0
Add zlib license text
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
532e6b2554
Add copyright notice
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
6f85ee9d95
Add another test for bit-field unit overlap
...
Test when there is another field after bit-fields with
allocation unit overlap.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
2f456ce4e2
Add comment explaining four_bits_with_int
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8a331ee7ec
Print to stdout instead of stderr
...
Print number of failures.
This makes it consistent with the other val/ tests.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
a70ac6be30
Add test of bit-field packing for #1054 and #1055
2020-07-08 17:20:15 +02:00
Oliver Schmidt
0f8b587bc2
Added directory for currently failing regression tests.
2020-07-01 00:13:55 +02:00
Jesse Rosenstock
8891a896b5
test/ref: Use separate .out files
...
Use different .out files for different options / targets.
This allows make -j N to work.
Previously all test.*.*.prgs would use the same test.out file.
Now test.*.*.out is also used.
2020-06-29 22:34:44 +02:00
Oliver Schmidt
5277ea0b73
Add test license description.
2020-06-27 02:23:40 +02:00
Jesse Rosenstock
18246278c5
switch2.c: Remove use of REFCC and UNSIGNED_CHARS
...
Explicitly use `signed char` or `unsigned char`, rather than
```
signed char k;
char k;
signed char k;
char k;
```
This should have resulted in the same thing; however, note that
`REFCC` was never defined, and `common.h` was not included, so
the old code in fact tested `char` then `unsigned char`,
which are the same.
The only difference is that a switch using plain `char` is not
tested, but since this is the same as either `signed char` or
`unsigned char`, the lack of test coverage seems relatively safe.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
8fe317e7fa
Remove REFCC_UNSIGNED_CHARS from test/ref/
...
Explicitly use signed char or unsigned char for REFCC.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
86ba877a99
Define REFCC and REFCC_UNSIGNED_CHARS in reference
...
switch2.c uses these macros. With them unset, signed chars
are not tested.
2020-06-25 13:18:08 +02:00
mrdudz
6e6ce4e5ee
added various tests related to bug #1045
2020-06-23 00:46:12 +02:00
acqn
e9307ce58e
Moved test/ref/cc65141011.c to test/val/cc65141011.c.
2020-06-22 23:23:39 +02:00
acqn
b2268765bf
The ref test cc65141011.c now passes.
2020-06-22 23:23:39 +02:00
IrgendwerA8
08705a3fdc
Changes resulting from 2nd code review
2020-02-03 20:45:09 +01:00
IrgendwerA8
ce80624f62
ctype size optimization
2020-02-03 20:45:09 +01:00
mrdudz
a2bbb6f1be
added regression test related to bug #1001
2020-01-25 20:56:52 +01:00
mc78
7bae9038cf
Replaced plain 0's and 1's in exit statements with EXIT_SUCCESS or EXIT_FAILURE
2019-11-19 14:08:00 +01:00
Stefan
659d1729eb
Fixed exit code #974
2019-11-12 08:05:25 -05:00
Greg King
a0db846a97
Allowed old-style (K and R) function declarations to be fastcall.
...
That lets them match old-style definitions. It avoids "Type conflict" error messages. It allows shorter function calls.
Fixed the types of some variables in "test/ref/otccex.c". It avoids crashes on 64-bit Windows (32-bit Windows with 64-bit pointers).
2019-07-22 09:26:23 -04:00
Lauri Kasanen
1bfdce55ed
binlit: Add a few random leading zeros
2019-07-20 17:21:42 +02:00
Lauri Kasanen
925ea9d544
cc65: Add support for binary literals
...
Binary literals, 0b001, are a GCC extension in C and a C++14 feature.
2019-07-20 17:21:42 +02:00
Greg King
88c6dd2da8
Changed empty parameter lists into (void) lists on functions with asm() statements.
...
The fix avoids any possible problems with how cc65 will handle old-style (K & R) function declarations, in the future.
2019-07-16 13:16:02 -04:00
Björn Esser
9faca05e6a
test/ref/otccex: Fix ramdomly occurring segfault.
...
The variables named tab and p are used in the context of pointers
and thus must be declared as such. Determining the purpose they
serve, using char over int seems more feasible here as well.
2019-06-09 20:26:12 +02:00
bbbradsmith
fb7d4acd5c
versionable header for sim65
...
load and run address now configured from header
fix error codes not to conflict with test
fix test/misc/endless.c which is supposed to fail if an endless loop does not occur
2019-05-29 22:56:51 +02:00
bbbradsmith
7a863e5cda
bug895 test: more specific description comment
2019-05-27 10:03:25 +02:00
bbbradsmith
df90a005cd
bug895 testing against more permutations of comparison
2019-05-27 10:03:25 +02:00
bbbradsmith
1461ad6fcc
unit test to catch regression of bug #895
2019-05-27 10:03:25 +02:00
Christian Groessler
392e6e10fc
again, some TABs slipped into the code...
2019-04-30 18:21:13 +02:00
IrgendwerA8
37f80534c9
Fix for #830 supplied by UvB
2019-04-25 15:19:53 +02:00
Lauri Kasanen
654d972288
C90 param, void
2019-04-21 12:46:03 -04:00
Lauri Kasanen
3b3b16ee9c
Add support for computed gotos
...
This is a GCC extension that allows C to use fast jump tables.
2019-04-21 12:46:03 -04:00
Lauri Kasanen
f29220be1b
Add test showing optimizer failure, OptUnusedLoads removes needed loads
2019-04-21 12:46:03 -04:00
IrgendwerA8
1530020a1f
Fix for multiplication optimization issue #367
2019-04-02 16:34:22 +02:00
IrgendwerA8
3d8c3a4948
Code review adaptations, removed "cc65_" prefix from functions
2019-03-29 22:53:04 +01:00
IrgendwerA8
db8bd84a82
Changes due to code review.
2019-03-29 22:53:04 +01:00
IrgendwerA8
399250a105
Optimized mul20 & mul40 and extracted to new library.
2019-03-29 22:53:04 +01:00
Christian Groessler
7445550831
remote TABs in doc/ and test/
2019-02-12 22:50:49 +01:00
Greg King
a6b04f6e97
Changed most "backticks" (grave accents) into apostrophes.
...
Quotations that are embraced by tick marks now look better, in most fonts.
2019-01-05 14:57:12 -05:00
laubzega
6d8c315cdb
Testcase added.
2018-10-16 09:45:30 +02:00
laubzega
2bb4abda23
Testcase .ref updated for new warning style.
2018-10-02 18:49:53 +02:00
laubzega
c797b3b376
Proper warnings for "risky" gotos.
2018-10-02 18:49:53 +02:00
laubzega
4b78d40e97
Added testcase for between-blocks gotos.
...
Deleted old testcase.
2018-10-02 18:49:53 +02:00
laubzega
a48bbc4be0
Switched from warning to error. Tightened the testcase.
2018-10-02 18:49:53 +02:00
Laubzega
7a5acaf39a
Missed the comment.
2018-10-02 18:49:53 +02:00
Laubzega
403783b649
Add a testcase for https://github.com/cc65/cc65/pull/757
2018-10-02 18:49:53 +02:00
Oliver Schmidt
753b48647f
Increased consistency.
...
The test program works as-is only if the timezone isn't set (to something different than UTC). However, using localtime() instead of gmtime() makes it at least consistent in that the original time (given to mktime()) is identical to the time retrieved.
2018-08-02 15:45:57 +02:00
Oliver Schmidt
b04028b5d8
Added test for mktime() and gmtime().
...
A recent regression makes gmtime()/localtime() fail. So it's obviously desirable to have a test for that code.
2018-07-24 03:26:40 +02:00
Greg King
362b6afacf
Made a C union declaration know the sizes of anonymous struct/union members when it determines its size.
...
The bug was located, and the fix was written, by Francesco.
2018-05-13 18:54:45 -04:00
greg-king5
ca31e3af1e
Fixed a bug that didn't preserve the accumulator's value when a simple 16-bit fetch-and-store is optimized. ( #637 )
...
Fix a 16-bit fetch-and-store cc65 optimizer bug.
2018-05-12 13:46:16 -04:00
Oliver Schmidt
f44406c46f
Merge pull request #446 from clbr/lz4
...
Add LZ4 decompression support
2017-06-10 23:23:12 +02:00
greg-king5
06c3cd8307
Added a missing -O configuration.
2017-06-07 10:31:09 -04:00
greg-king5
e24bb372d0
Added a missing -O configuration.
2017-06-07 10:26:34 -04:00
greg-king5
a397a8c1a1
Added missing -O configuration.
2017-06-07 10:20:20 -04:00
Lauri Kasanen
e75a59d7a8
Add LZ4 decompression support
2017-06-06 18:48:25 +03:00
Lauri Kasanen
05b73276c2
Update test description
2017-05-20 09:53:30 +03:00
Lauri Kasanen
80e6afd335
Add two new trampoline test cases
2017-05-19 14:34:10 +03:00
Oliver Schmidt
11b01b908d
Merge pull request #424 from clbr/trampoline
...
Trampoline support
2017-05-18 16:29:34 +02:00
Lauri Kasanen
219b239a34
Adjustments in response to latest comments
2017-05-18 17:14:26 +03:00
Lauri Kasanen
4c05c46cd1
Remove RAM-trampoline array support
2017-05-18 16:11:39 +03:00
Lauri Kasanen
ca41af41c2
Rename pragma trampoline to wrapped-call, value to identifier
2017-05-16 20:10:24 +03:00
Lauri Kasanen
077b14ccfa
test/val/postincdec: Test for the final val value
2017-05-08 10:19:26 +03:00
Lauri Kasanen
7adcde1707
Add explicit postinc/dec testcase
2017-05-07 20:35:49 +03:00
Lauri Kasanen
9c86c03a96
Add test case
2017-05-02 20:43:41 +03:00
Greg King
1aab287189
Fixed the handling of "while (0) {}".
...
It's a corner case; but, conditional macroes might create it -- better safe than sorry.
2017-04-07 09:26:58 -04:00
Oliver Schmidt
e806515541
Removed workaround.
2017-04-04 15:53:14 +02:00
Oliver Schmidt
93193727be
Removed workaround.
2017-04-04 15:52:37 +02:00
Oliver Schmidt
cd27fef6a8
Removed workaround.
2017-04-04 15:52:01 +02:00
Oliver Schmidt
3789174162
Removed workaround.
2017-04-04 15:51:00 +02:00
Oliver Schmidt
14268510f5
Removed workaround.
2017-04-04 15:45:24 +02:00
Oliver Schmidt
233dd5062a
Merge pull request #389 from IrgendwerA8/stringimprovements
...
Optimization of string functions (size & speed).
2017-04-04 15:39:37 +02:00
Oliver Schmidt
5dbacb538e
Merge pull request #411 from pfusik/bss-name-regression
...
Fix regression of #pragma bss-name
2017-03-22 13:44:48 +01:00
Piotr Fusik
8e35a82c91
Fix regression of #pragma bss-name
...
Closes #409
2017-03-21 22:35:25 +01:00
Oliver Schmidt
5b3611265b
Revert to recursively expanded var.
...
4a6bca0b56
needed to move to a simply expanded variable but cc82cd9992
made that unnecessary again.
2017-03-21 20:54:55 +01:00
IrgendwerA8
cc82cd9992
Fixed addressing error for TSB/TSR and enabled tests again.
2017-03-20 21:53:07 +01:00
Oliver Schmidt
0851e3d694
Allow to control test Makefile output via QUIET (like libsrc).
2017-03-20 11:22:04 +01:00
Oliver Schmidt
50174d9860
Hide stdout of tests returning an exit code.
...
Now that we doubled our tests by running them for both 6502 and 65C02 Travis CI complains (again) about a too long build output. So let's reduce it by omitting the (useless) stdout of tests.
2017-03-19 20:32:23 +01:00
Oliver Schmidt
4a6bca0b56
Run test for the 65C02 code generator / runtime too.
...
Now that sim65's 65C02 support is actually functional we can run test for the 65C02 support in the compiler and the runtime.
We learn the hard way this is a good idea as there are tests failing when built with optimizations for the 65C02:
- val/compare7
- val/compare8
- val/compare9
- val/compare10
- val/or1
2017-03-19 20:07:19 +01:00
Oliver Schmidt
ff9b77b6cc
Shortened test subdir names.
2017-03-19 17:57:25 +01:00
Oliver Schmidt
66634ef683
Cleaned up test Makefiles.
2017-03-19 17:48:44 +01:00
Greg King
750a527100
Made C's sizeof operator work with initialized void variables.
...
Added regression tests that check cc65's handling of void variables.
2017-03-12 14:41:32 -04:00
Oliver Schmidt
a780df1fe1
Merge pull request #381 from pfusik/static-forward-decl
...
"static" forward declarations
2017-03-12 18:26:14 +01:00
Greg King
73261ea48f
Fixed a pointer test again -- but, it's better than in pull request #391 .
...
This time, the expression compares the pointer directly, instead of comparing the pointer's target. The new expression avoids an array underrun.
2017-03-11 15:11:15 -05:00
Christian Groessler
8a81f9c0c8
Fix line endings (CRLF -> LF) on all affected files.
2017-03-10 11:21:14 +01:00
Piotr Fusik
05d1b8072b
Add regression tests for duplicate globals with different linkage.
2017-03-09 21:18:48 +01:00
Piotr Fusik
6c3873316b
Add regression tests for duplicate global/static variables detected by the compiler.
2017-03-09 20:49:42 +01:00
Piotr Fusik
ce0cf85386
Add regression test for #204 .
2017-03-09 20:40:20 +01:00
IrgendwerA8
371e8efb79
temporarily disable optimizations altogether until a fine grain control
...
is implemented on Makefile level only disabling the compiler option -Os
2017-03-07 19:16:31 +01:00
IrgendwerA8
81115aa826
Added further optimizations and unit tests.
2017-03-05 02:09:12 +01:00
Greg King
8f0ea644dd
Fixed a pointer-difference, comparison-with-zero expression.
...
Some GCC C compilers can't subtract higher pointers from lower pointers properly, when those pointers must be scaled (because they point to objects that are wider than a char). The scaling is done as unsigned which makes the difference positive instead of negative.
So, a broken expression was changed into a direct comparison between the two pointers.
2017-03-01 06:52:43 -05:00
Greg King
99f3c7d01d
Fixed a makefile: "yaccdbg.c" includes "yacc.c". So, yaccdbg must depend on both of them.
2017-03-01 06:29:53 -05:00
Oliver Schmidt
79e1b25c6c
Removed DEL as suggested by Greg.
2016-10-16 13:47:31 +02:00
Sven Oliver Moll
476260a6fa
4510 support for da65: fixed docs and Makefile for testcase.
2016-09-27 12:02:57 +02:00
Sven Oliver Moll
d0ed84c2d0
da65: adding support for 4510 cpu of c65
2016-09-20 17:37:10 +02:00
Sven Oliver Moll
bcdd190020
removed 'make clean' invoked from test/Makefile for test/assembler/Makefile, as all artifacts are now created in testwrk and will be cleaned up out of directory
2016-09-13 11:54:56 +02:00
Sven Oliver Moll
95a2f4b9dd
re-adding WORKDIR to Makefile
...
- added workaround to remove *.o files after assembling
- also removed now obsolete clean target
2016-09-13 11:28:11 +02:00
Sven Oliver Moll
aaa26c7d57
Revert "test/assembler: removed WORKDIR variable, as remote assembling does only work partly"
...
This reverts commit 7a9a7c3188
.
2016-09-13 11:21:25 +02:00
Sven Oliver Moll
a5772f7dc3
added forgotten testcase for testing cpu based conditional assembling
2016-09-07 19:49:21 +02:00
Sven Oliver Moll
7a9a7c3188
test/assembler: removed WORKDIR variable, as remote assembling does only work partly
2016-09-07 19:41:37 +02:00
Sven Oliver Moll
ae3f9bbd77
Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase
2016-09-07 19:21:24 +02:00
Oliver Schmidt
05279f8302
Merge pull request #345 from SvOlli/release
...
migrated opcodes tests for assembler from testcode to test...
2016-09-07 10:11:47 +02:00
Sven Oliver Moll
f007fc13d5
added README for test/assembler
2016-09-06 14:54:21 +02:00
Sven Oliver Moll
89e2bf89cb
migrated opcodes tests for assembler from testcode to test for inclusion on automated testing
2016-09-03 16:52:23 +02:00
Chris Cacciatore
7919812378
Updated switch statement comments.
...
* Now comments represent the fact that there may not be curly braces.
2016-08-19 20:21:10 -07:00
Chris Cacciatore
ac4bdbd411
Now testing switch statements with empty bodies.
2016-08-15 11:36:50 -07:00
Chris Cacciatore
c4823c6fd4
Added Duff's Device to tests.
2016-08-15 11:26:03 -07:00
Oliver Schmidt
ce45f75987
Harmonized goal name.
2016-06-01 23:51:43 +02:00
Greg King
e050655757
Added a cc65 regression test for pointer and offset addition operations.
2016-01-01 11:39:55 -05:00
Greg King
5e7c7d78fc
Added a regression test program for the changes in the right-shift optimizer.
2015-12-14 11:46:30 -05:00
Oliver Schmidt
a85ac88fca
Merge pull request #197 from greg-king5/static
...
Handle almost-duplicate C declarations that have different linkages.
2015-08-15 06:53:40 +02:00
Greg King
6ed3d055cb
Removed redundant attempts to build uncompilable files.
2015-08-13 17:47:02 -04:00
Greg King
1baecf4a15
Added regression tests of diagnostics for conflicts between extern/public and static declarations.
2015-08-13 03:39:35 -04:00
Oliver Schmidt
d3eebc8fcf
Merge branch 'pointer' of https://github.com/mrdudz/cc65 into mrdudz-pointer
2015-07-15 12:24:09 +02:00
mrdudz
5ceffa1f70
Merge remote-tracking branch 'upstream/master' into testsuite
2015-07-11 12:44:06 +02:00
Oliver Schmidt
50b0536222
Ignore return values only with CMD.EXE MkII.
...
CMD.EXE considers file deletion commands not able to delete anything as there's nothing to delete as failed. Of course we don't want to bail out of the Makefile because of missing files to delete. Therefore we ignore the return values with '-'. This change limits this workaround to CMD.EXE.
2015-07-11 00:01:39 +02:00
Oliver Schmidt
992f0f03c5
Ignore return values only with CMD.EXE.
...
CMD.EXE considers file deletion commands not able to delete anything as there's nothing to delete as failed. Of course we don't want to bail out of the Makefile because of missing files to delete. Therefore we ignore the return values with '-'. This change limits this workaround to CMD.EXE.
2015-07-10 22:39:53 +02:00
mrdudz
1380c68cf3
workaround for cmd.exe rmdir
2015-07-10 20:04:31 +02:00
mrdudz
12a3e6841c
tests for illegal pointer operations that must always fail
2015-07-10 18:38:54 +02:00
mrdudz
6ab197f364
patch from Uz that makes some illegal operations on pointers error out
2015-07-10 14:27:49 +02:00
mrdudz
ad97b1b08e
removed -f again, as that is the default. also removed "-" before the actual comments, which were the workaround previously
2015-07-10 11:11:41 +02:00
mrdudz
6970053023
use rm -r instead of rmdir, and use -f for rm, that makes subsequent runs of "make clean" not fail
2015-07-10 10:43:00 +02:00
Oliver Schmidt
bdb01212c2
Merge pull request #173 from mrdudz/testsuite3
...
two more tests
2015-07-09 18:46:07 +02:00
mrdudz
28d65d595d
two more tests
2015-07-09 17:36:12 +02:00
Oliver Schmidt
74074a20b2
Merge pull request #164 from greg-king5/testsuite
...
Adjust some new test programs.
2015-07-01 20:58:56 +02:00
Greg King
ba03d28731
Removed some trailing whitespace; and, expanded a tab.
2015-07-01 10:09:11 -04:00
Greg King
0e6008e9e6
Added a regression test for pointer-to-array dereferences.
2015-07-01 06:54:05 -04:00
Greg King
5d4900e179
Added comments that explain the unstable behavior of a test program.
2015-06-30 09:00:28 -04:00
Greg King
cd5935deb7
Fixed an uninitiated pointer.
2015-06-30 08:54:13 -04:00
mrdudz
18b2de1624
remove comment
2015-06-29 11:18:24 +02:00
mrdudz
5b1917d23f
remove workaround for optimizer bug
2015-06-29 02:34:12 +02:00
mrdudz
72e4c10772
added 3 more test
2015-06-29 01:57:39 +02:00
Oliver Schmidt
5a7ba692f5
Avoid "*** Recursive variable `RM' references itself (eventually)."
2015-06-27 00:33:24 +02:00
Oliver Schmidt
9bd11f161f
Made test Makefiles work with CMD.EXE
2015-06-27 00:03:45 +02:00
Oliver Schmidt
54cfd2e2a1
Avoid wrong error.
2015-06-26 23:36:14 +02:00
Greg King
f6d1234576
Added some names to the list of test-suite programs that need the --all-cdecl work-around.
...
Added a work-around for a cc65 bug that made the yacc tests fail.
2015-06-25 13:57:17 -04:00
Greg King
b24c87e61f
Changed the compiler test-suite to work with the fastcall-default version of cc65.
2015-04-22 10:05:07 -04:00
Greg King
1a0a872bd6
Made sure that parallel-building the regression-tests doesn't start a test before all of the directories are clean.
2014-12-18 14:30:35 -05:00
Greg King
244eeedcfc
Shortenned the code that creates the TESTS make variable.
...
And, fixed the variable-substitution that creates the CC65 optimization option.
2014-12-18 14:17:56 -05:00
Greg King
e414e89b64
Use simply-defined make variables.
2014-12-17 17:44:39 -05:00
Greg King
15a22bd1c8
All regression-tests subdirectories are cleaned before the first test starts, so that 'make continue' won't see debris when it moves to the next directory.
2014-12-17 17:35:18 -05:00
Greg King
d9c8c1de45
Create the makefile variable REFS in the same way that TESTS is made.
2014-12-17 16:30:09 -05:00
Greg King
ad56b6abe9
Made the makefiles' clean target remove the object files from the source directory.
2014-12-17 15:59:29 -05:00
Greg King
b9c1087cc2
Added make code to build the optimized versions.
2014-12-17 11:57:45 -05:00
mrdudz
92ed5fd64b
scan sources just once
2014-11-26 19:32:54 +01:00
mrdudz
0387b8cf1d
added note on how to continue after failure, added missing limits.ref
2014-11-26 14:22:22 +01:00
mrdudz
3e8ae54759
actually use optimization switches
2014-11-26 01:38:30 +01:00
mrdudz
5f727ea56b
removed binaries and references from git ignore
2014-11-25 14:16:39 +01:00
mrdudz
60026925ad
use testwrk for binaries, and generated reference data
2014-11-25 13:47:31 +01:00
mrdudz
9c03326360
use 'testwrk' dir for bdiff
2014-11-25 12:56:45 +01:00
mrdudz
8a558a7cef
use own naive bdiff tool instead of diff/fc
2014-11-24 20:57:58 +01:00
mrdudz
a0a03e5f73
added linefeeds
2014-11-24 20:35:35 +01:00
mrdudz
e3fdbc0a4b
removed common.h reference
2014-11-23 12:50:47 +01:00
mrdudz
0079f5f6a2
checked tests in /val
2014-11-23 12:31:47 +01:00
mrdudz
8a66605d5e
added some windows/cmd.exe stuff
2014-11-23 12:18:19 +01:00
mrdudz
198bd893f9
makefile for misc, endless.c
2014-11-22 22:22:30 +01:00
mrdudz
9fe0b38177
added readme
2014-11-22 21:29:26 +01:00
mrdudz
4a9346d631
added todo
2014-11-22 19:50:30 +01:00
mrdudz
875e0762e7
generate reference output using host compiler, compare using diff, fix yacc input file to work on both host and sim65
2014-11-22 19:45:40 +01:00
mrdudz
20cf4e1cc7
moved tests that need special care into misc dir
2014-11-22 19:42:39 +01:00
mrdudz
6144063a6d
fixed up the rest of the tests, added rudimentary makefile(s)
2014-11-22 18:28:05 +01:00
mrdudz
20072a379c
added makefile and common include
2014-11-22 17:02:46 +01:00
mrdudz
a20cb09032
added makefile and common include
2014-11-22 16:59:31 +01:00
mrdudz
d712abfe27
include s26 to get bitsize of char
2014-11-22 16:45:23 +01:00
mrdudz
f82343c484
sitest can not work
2014-11-22 16:44:48 +01:00
mrdudz
8d2ec80d5a
cleanup
2014-11-22 15:30:07 +01:00
mrdudz
ca300826cf
added tests as prepared by oliver
2014-09-25 21:38:34 +02:00