Commit Graph

2983 Commits

Author SHA1 Message Date
florian
44d9234f38 * properly unlink unused type symbols from their defs to avoid
internal errors when generating debug info, resolves #40886
2024-09-20 22:49:08 +02:00
florian
8b48127b2c * as shared libraries without glibc on linux currently don't work, link those tests
on current fpc versions and linux always against glibc, so the shared library handling is tested
2024-09-19 22:57:45 +02:00
florian
76fc3275bc * handle except blocks as normal code block with regard to specialization of generics, resolves #40890 2024-09-17 23:02:25 +02:00
florian
9d7ea2c069 * revert check for boolean type when handling LOC_FLAG in tcgassignmentnode.pass_generate_code. This makes pas boolean the default,
resolves #40908
2024-09-16 22:48:18 +02:00
florian
9146eaf083 * fixed also comment 2024-09-03 21:04:09 +01:00
florian
266662971b + cosh(800) should raise an floating point overflow 2024-09-02 21:34:58 +01:00
Nikolay Nikolov
71ada8453a + increase WebAssembly max memory limit for test tw11006.pp, because the test
runs out of memory with the default memory limit of 256 MiB
2024-08-24 13:19:08 +03:00
Nikolay Nikolov
2dd610c140 * fixed test tw0882.pp for WebAssembly's memory requirements 2024-08-18 10:17:13 +03:00
Rika Ichinose
801e14c33b Faster Insert(ansi/unicodestring). 2024-08-12 20:09:30 +00:00
Michaël Van Canneyt
342d3338e5 * Correctly pass UsePublishedOnly on to sub-contexts. Fixes issue #40828 2024-07-24 18:07:09 +02:00
Michaël Van Canneyt
1743df7b80 * Patch by Evgenii Savin to avoid IE 2010021502 when calling generic from other generic. Fixes issue #40770 2024-07-12 18:04:57 +02:00
florian
b974e4a25f * fix extension to 64 bit on aarch64, resolves #40576 2024-07-07 16:36:29 +02:00
Michaël Van Canneyt
adc66b233d * Properly release procdefs. Patch by Evgenij Savin, fixes issue #40844 2024-07-05 14:35:05 +02:00
florian
abcced55af * (lsighly, added safety check) patch by Евгений Савин, resolves #40784 2024-06-23 22:07:51 +02:00
Sven/Sarah Barth
953a4e1b64 * fix #40563: apply slightly adjusted patch by byte bites to use fixed range of 1..Length(str) for for-in loops iterating over ShortStrings
+ added test
2024-06-04 22:53:16 +02:00
Sven/Sarah Barth
485b31de21 * fix #40764: declare procsyms of a class/object also as sp_generic_dummysym if a symbol in a parent class has it set so that the parser will treat it as a potential generic
+ added test
2024-05-06 23:39:18 +02:00
florian
902c93f3c3 * do not limit the number of interfaces per class, resolves #40268 2024-04-20 22:05:18 +02:00
florian
e412f6be55 + in on an empty set is always false, resolves #40745 2024-04-19 23:43:35 +02:00
florian
2f9ed0576e * optimize x </>= length(...) also if the operands are swapped 2024-04-18 23:07:40 +02:00
florian
e130557d9f * optimize x < length(arr) and x >= length(arr) as proposed in #40292 2024-04-17 23:29:13 +02:00
florian
1222456c13 * allow [] for constant set constraints, resolves #37020 2024-04-13 22:28:54 +02:00
Sven/Sarah Barth
e76c5d96d8 * Fix #40716: only add helpers if the type doesn't belong to the current object/class/record hierarchy
+ added test
2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
7a1ef994b4 * fix #40721: correctly set up the generic defs when parsing fields, especially important when dealing with anonymous fields
+ added tests
2024-04-12 17:34:58 +02:00
Sven/Sarah Barth
550397b982 * fix #40708: when creating the sub-arraydefs for comma separated arrays, ensure that the new sub array also has the generic related information set up correctly
+ added test
2024-04-12 17:34:58 +02:00
florian
fd68d3bfbb * ensure that left and right have a result type set in tx86addnode.pass_1, resolves #40727 2024-04-08 22:53:34 +02:00
florian
5086cf7e72 * set packenum and setalloc to defined values when changing mode, resolves #40056 2024-03-08 20:12:55 +01:00
florian
1966ce7c1c + Skylake-X for i386 2024-02-26 22:41:55 +01:00
Sven/Sarah Barth
5c890b59e3 * fix #40655: apply changes to packrecords, packenum and setalloc using the recordpending*() functions so that they are applied correctly in case of them being used directly after a {$POP}{$PUSH} sequence
+ added test
2024-02-20 23:52:52 +01:00
florian
bccc0b195e * allow type = type ... ; syntax only for previously declared types, avoids also internal error for #40566 2024-02-20 23:14:31 +01:00
florian
a75e453c30 + thlcgobj.location_force_mem now supports LOC_JUMP as well, resolves #40650 2024-02-19 22:22:12 +01:00
Sven/Sarah Barth
ae06528db4 + add test for already fixed #24285 2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
60c94c50ff + add test for now fixed #40639 2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
ea102d792f * fix #40634 the 2nd: a (strict) protected symbol in a parent class of the owner is supposed to be visible
+ added test
2024-02-18 19:35:24 +01:00
J. Gareth "Curious Kit" Moreton
afd63ef0ce * New test for !40643 2024-02-18 15:37:27 +00:00
J. Gareth "Curious Kit" Moreton
068b8f9e9d * New test for i40647 2024-02-18 15:31:20 +00:00
Pierre Muller
8122defbd8 Add test for bug report 40537 2024-02-17 21:33:52 +00:00
Sven/Sarah Barth
d9903e6e16 * fix #40634: correctly check visibility for child classes in case of a mixture of specializations and non-specializations
+ added test
2024-02-16 16:54:23 +01:00
Pierre Muller
46508f6af1 Add some output to explain failure for test tests/webtbs/tw40624.pp 2024-02-06 13:09:15 +00:00
florian
b6ccf369b9 * patch by Евгений Савин to make Variant to string convertion use CurrToStr for varCurrency, resolves #40624 2024-02-04 14:10:49 +01:00
Sven/Sarah Barth
27a2a04279 * fix #40618: apply adjusted patch by Евгений Савин (@jack128a) so that a non-load case expression is loaded into a temp first when converting a single range branch into an if-clause
+ added test
2024-02-02 15:55:40 +01:00
Pierre Muller
ac4927aef7 Fix typo in %opt 2024-02-02 10:47:21 +01:00
florian
dc30431d89 * compile with stack checking 2024-01-29 23:28:21 +01:00
florian
b32573d1eb * inserting $result into the symtables should never trigger a duplicate symbol error, resolves #40608 2024-01-27 22:05:31 +01:00
florian
d901f72002 * named test properly 2024-01-26 21:43:18 +01:00
florian
14ab1cfb71 * set stack margin on windows, so there is stack space left for exception handling in case of a stack overflow, resolves #40589 2024-01-24 21:31:03 +01:00
Sven/Sarah Barth
981ec64666 * fix #40594: when assigning a nested function to a function reference don't check for the nested procvars parameter, because nested functions can be treated like anonymous functions here
+ added test
2024-01-22 22:27:33 +01:00
Sven/Sarah Barth
47c21fd1bc * fix #40593: don't check for a static method when assigning a methodpointer to a function reference
+ added test
2024-01-22 19:44:36 +01:00
Sven/Sarah Barth
21ffa221e6 * fix #40595: correctly access the list of parameters of the extended method table
+ added test
2024-01-15 23:14:38 +01:00
Sven/Sarah Barth
dd4f7e9148 * fix #40592: make the Delphi-compatible attributes usable, but in a way that makes it clear to the user that they won't work
+ added test
2024-01-15 22:29:47 +01:00
Jonas Maebe
958f30f192 webtbs/tw10641.pp: skip for Darwin (it does not support these relocations) 2023-12-04 22:52:39 +01:00
Jonas Maebe
24fcd05e8c LLVM: only round currency values when storing them back to memory
Resolves #40550
2023-12-04 22:52:39 +01:00
Sven/Sarah Barth
3f1d62af8e * fix #40504: always provide the global enum symbol for anonymous enum types (e.g. as part of a set)
+ added test
2023-11-07 20:33:55 +01:00
Sven/Sarah Barth
68668c649e * fix #40500: do a for-in on a string variable using low(strvar) to high(strvar) so that zero based strings are handled correctly
+ added test
2023-11-07 20:28:15 +01:00
Jonas Maebe
0ca260e08c LLVM: fix currency parameters passed on the stack on x86-64
Resolves #40496
2023-11-05 11:30:19 +01:00
florian
b2a13077c0 * redefine also PPChar and PPPChar depending on the string type mode, resolves #40491 2023-10-31 23:13:22 +01:00
J. Gareth "Curious Kit" Moreton
286c823e27 * Tests for i40474 and i40475 (BIC issue on AArch64 and incorrect shifter/extender mnemonics respectively) 2023-10-22 13:13:58 +00:00
J. Gareth "Curious Kit" Moreton
6b569d0ada * ARM: New test to evaluate ADR encoding error 2023-10-22 12:04:05 +00:00
Sven/Sarah Barth
287ef8e79a * fix #40410: allow specialization of a procdef also inside exception handlers + added test 2023-10-20 19:54:05 +02:00
Sven/Sarah Barth
f88ee7b2d8 * fix #40451: load the assembly symbol into a separate operand so that an offset already contained in oper isn't discarded + added test 2023-10-20 19:54:04 +02:00
Pierre Muller
8c620daf33 Remove readln and add NORUN marker for tw40453 test 2023-10-15 11:22:05 +00:00
florian
94cb1c3a49 * correctly name nested enum type debug symbols, resolves #40462 2023-10-10 23:16:31 +02:00
florian
a3f221e189 * allow set type to be a generic parameter, resolves #40453 2023-10-06 21:40:25 +02:00
Jonas Maebe
decbac8e8b Issue #40392; replaced test with correct one 2023-09-14 21:28:30 +02:00
Jonas Maebe
c96641f901 LLVM: fix double init/fini of local managed variables accessed from nested functions
resolves #40392
2023-09-14 15:38:21 +02:00
Jonas Maebe
bcf77c70fd default parameter values: fix crash
Fix crash when declaring default parameter values while current_procinfo
is not yet valid

resolves #40413
2023-09-11 21:35:07 +02:00
Sven/Sarah Barth
3b455c1cf2 * fix #40390: implement support for handling parameter names (including __SELF and __HIGH(<identifier>)) that resolve directly to registers
+ added tests
2023-09-08 17:30:32 +02:00
Sven/Sarah Barth
2df57e117b * fix #40381: also check for hints when parsing the parameters of a routine (including open array parameters) or the result type of a function
+ added tests
2023-09-08 15:54:08 +02:00
florian
7e69f399b3 * patch and test by Rika: fixes self inserts in Insert(x, dynarray) and improves Insert(x, dynarray), resolves #40417 2023-08-29 22:23:22 +02:00
J. Gareth "Curious Kit" Moreton
1bcf4a5a8c * New test to detect SSE/AVX optimisation error 2023-08-24 19:41:41 +00:00
Jonas Maebe
1be7416816 default value: fix issue with inlining
Ensure the mangled name is always the same

Resolves #40404
2023-08-20 22:08:47 +02:00
Jonas Maebe
50040a2cab default values: store as staticvarsyms in staticsymtable
Previously, they were stored as localvarsyms in either the localsymtable
(for procedures/functions) or as localvarsyms in the staticsymtable (for
init/fini code of units/main programs). The latter was a hack (staticsymtables
normally cannot contain localvarsyms) and caused the temp allocator to also
allocate them as a local in fini code even if the default was only in the init
code.

The new approach ensures at most one copy gets allocated per unit, it doesn't
require explicit initialisation (since staticvarsyms are in bss -> zeroed by
default), gets rid of the localvarsyms in staticsymtables, and as a bonus
solves an issue with inconsistent LLVM debug information for the localvarsym
in init/fini code (since the staticsymtable is shared between the init and
fini code, so was the local, and therefore we generated debug info stating
it was defined in the fini code but within the scope of the init code).

Resolves #40395
2023-08-15 21:13:48 +02:00
J. Gareth "Curious Kit" Moreton
11957d9a60 * New test, mostly for x86, to detect incorrect TEST/JNE/TEST/JNE optimisation 2023-08-12 23:43:05 +00:00
J. Gareth "Curious Kit" Moreton
6d5876a29c * New CMOV test at webtbs/tw40307.pp 2023-08-12 20:55:12 +00:00
Jonas Maebe
45339ddc98 tw40324: fix compilation on unix platforms 2023-07-30 22:22:28 +02:00
J. Gareth "Curious Kit" Moreton
ae5544db4c * New test for i40358 2023-07-21 09:24:53 +01:00
Sven/Sarah Barth
c994b5efe8 * fix #39447: when checking whether the parameters are valid for pointer arithmetic check the *correct* parameter for being valid pointer-like type (I'd say that this was a copy&paste mistake...)
+ added test
2023-06-30 17:42:39 +02:00
Sven/Sarah Barth
d5c1533377 * fix #40331: for enumeration with holes (that don't have type information) use the binary comparers
+ added test
2023-06-30 16:30:46 +02:00
Sven/Sarah Barth
8592d42afa * test added for #40332 is supposed to fail 2023-06-30 16:24:20 +02:00
Sven/Sarah Barth
d97d34ee9c * fix #40332: apply patch by Rika to avoid a crash when an overload can't be picked outside of a function (e.g. when using intrinsics inside constants)
+ added test
2023-06-30 15:35:28 +02:00
Sven/Sarah Barth
f721210638 * fix #40142 and #40324: don't alias the function name to the $result variable for anonymous functions unless an explicit result name is provided
+ added tests
2023-06-23 17:06:41 +02:00
Sven/Sarah Barth
e44a33a78b + previous commit also fixes #40143, #40144, #40145, #40308 and #40315, so add the tests for them 2023-06-16 17:03:51 +02:00
Sven/Sarah Barth
d24eeffa2b * fix #40293: have the SysUtils unit use the TArray<> declaration in the ObjPas unit instead of declaring it again 2023-06-03 18:10:45 +02:00
Pierre Muller
3bb2586269 Fix for sparc64 specific code generation bug report #40252 2023-05-26 17:10:23 +02:00
J. Gareth "Curious Kit" Moreton
0a89e68d55 * Added test to attempt to catch access violation caused by faulty optimisation (i40165) 2023-04-30 22:25:55 +00:00
Pierre Muller
11a390117c Improve test for unaligned access 2023-04-21 20:46:11 +00:00
florian
e40f997a40 * another patch to fix #40223 2023-03-31 23:45:45 +02:00
florian
6663d5ca63 * do not replace index registers with esp/rsp, resolves #40223 2023-03-30 21:36:35 +02:00
Jonas Maebe
12bde4e903 WPO: fix dead code detection, and handle procvars
Extend dead code detection to not only look for the main mangled name, but also
for any aliases before deciding that a routine has been dead-stripped.

Assume objects/classes can also be constructed if the address of one of their
constructors or of the TObject.NewInstance class method has been taken.

Resolves #40204
2023-03-24 21:22:18 +01:00
florian
3e3b96e088 * fix of Erroneous reading of the value of the StackLength variable at program start based on issue report by Sergey Larin, resolves #40211 2023-03-21 22:37:40 +01:00
florian
0d3ec87492 * also initalize default helper variables of initialization sections, resolves #40183 2023-03-19 21:19:10 +01:00
Jonas Maebe
0e46041717 WPO: also consider NewInstance to detect class instancing
Resolves #40200
2023-03-18 21:18:25 +01:00
florian
64319dc019 * PopCount takes care only of the bit pattern, so take the uvalue to avoid an internal error, resolves #40190 2023-03-17 22:30:36 +01:00
Sven/Sarah Barth
6aab856213 + add test for already fixed #37380 2023-03-15 23:39:59 +01:00
Sven/Sarah Barth
d6d693696e + add test for fixed #40077 2023-03-06 23:29:04 +01:00
Sven/Sarah Barth
4823ca7114 * fix #40074: adjust Generics.Defaults to make use of the new ConstParamIsRef<> utility function to correctly determine how a generic binary parameter needs to be compared 2023-03-06 23:24:36 +01:00
florian
99b01f6634 * second mul might get called with a zero operand if the other has a side effect,
handle this correctly in ti386addnode.second_mul64bit, resolves #40182
2023-03-06 23:19:34 +01:00
J. Gareth "Curious Kit" Moreton
090e4fea96 * New test for i40122 2023-02-19 20:22:49 +00:00
florian
811c683775 * set rangedef of dyn. arrays correctly, resolves #40149 2023-02-15 22:14:55 +01:00
Jinyang He
176462c39a add loongarch64 tests support 2023-02-05 19:18:48 +00:00
florian
a9f9996dc8 + support leap seconds in TryEncodeTime, resolves #40121 2023-01-30 22:40:15 +01:00