Commit Graph

7882 Commits

Author SHA1 Message Date
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
de69f1d858 * moved files to appropriate location 2023-11-01 10:09:40 +01:00
Rika Ichinose
dba8138175 Refactor promotional features of StrUtils. 2023-11-01 09:02:27 +00:00
florian
b2a13077c0 * redefine also PPChar and PPPChar depending on the string type mode, resolves #40491 2023-10-31 23:13:22 +01:00
Rika Ichinose
e00ab51185 On i386 and x86_64, add cpu.CPUID — high-level wrapper to CPUID instruction, and cpu.CPUBrandString — convenience for CPUID leaves 80000002, 80000003, and 80000004. 2023-10-31 21:20:45 +03:00
Michaël Van Canneyt
9f3a50315b * Enable function references and anonymous functions in Delphi mode 2023-10-31 08:42:28 +01:00
J. Gareth "Curious Kit" Moreton
5e2f088a5b * "blea" test will now display the CPU name (can be disabled by removing {$DEFINE DETECTCPU}) 2023-10-29 10:26:52 +00:00
J. Gareth "Curious Kit" Moreton
a353d7c65b * New LEA bench test 2023-10-29 10:26:52 +00:00
Rika Ichinose
9382070454 Refactor and fix a bug in Boyer-Moore. 2023-10-28 06:56:15 +00: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
Pierre Muller
ad637e8f09 Fix range error in tstruth2bu.pp test 2023-10-10 16:33:44 +00:00
florian
a3f221e189 * allow set type to be a generic parameter, resolves #40453 2023-10-06 21:40:25 +02:00
Michaël Van Canneyt
ab4db7f475 * Fix OnChange being fired twice when adding an object. Fixes issue 40261 2023-10-02 22:17:59 +02:00
Frederic Kehrein
ba55932929 Fixing trying to consume ID for anonymous switch field 2023-09-28 22:42:49 +00:00
florian
803a6fea24 * throw an error if instructions which needs an operand size is used with one operand being a reference without size 2023-09-16 23:25:31 +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
Rika Ichinose
324b77f317 Let fpc_dynarray_concat(_multi) reuse the only nonempty input or append to the destination if possible.
Improve fpc_dynarray_delete.
2023-09-12 20:58:50 +00: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
Pierre Muller
64a7bc13d6 Try several ports before failing 2023-09-10 11:11:35 +00: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
7f290c27ed * fix name of test 2023-09-08 16:11:13 +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
Sven/Sarah Barth
8fa439e64d + add some tests for hint directives in context of arrays (both with the element and the index) that check that the hint is indeed generated 2023-09-08 15:23:55 +02:00
Sven/Sarah Barth
98fc58b229 + add a test that check for correct functionality of all the SwapEndian() overloads 2023-09-08 15:02:51 +02:00
Pierre Muller
0210254b2d Fix wrong index error 2023-09-07 22:54:55 +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
Rika Ichinose
1c4151d82e Remake AdjustLineBreaks.
This version is correct and supposedly better in other ways (except for a bit of clarity maybe).
2023-08-29 20:08:03 +00:00
florian
15e7dd3d9f * patch and test by Rika: Redirect StrUtils.RPos to StrUtils.RPosEx, fix a bit, improve a bit, resolves #40394 2023-08-27 22:33:00 +02:00
florian
fb391d571a * another test renamed 2023-08-27 10:48:15 +02:00
florian
e1f7b50985 * renamed tests so they are actually run 2023-08-27 10:09:40 +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
ccrause
9440b17eea [AVR] Add command line options to selectively remove portions of the RTL startup code. 2023-08-15 21:33:58 +00: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
florian
cc27a5de78 + test from Rika for merge request 458 2023-08-14 23:21:25 +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
Michaël Van Canneyt
56a906a421 * Hex2Bin Delphi-compatible overloads. Fixes issue #38712 2023-08-12 14:59:07 +02:00
Michaël Van Canneyt
fd39fd96b3 * Add enumerator for TStringBuilder. Fix issue #37088 2023-08-12 14:33:50 +02:00
Jonas Maebe
13346a42bc volatile: allow for assignments 2023-08-12 12:04:40 +02:00
Sven Barth
f258d2f498 * regenerate tests/Makefile 2023-08-03 22:35:05 +02:00
Sven Barth
82dd70e72f * fix parameter alignment on x86_64 when more than 6 parameters are involved (aka the stack is used)
+ added test
2023-08-03 22:34:28 +02:00
Jonas Maebe
45339ddc98 tw40324: fix compilation on unix platforms 2023-07-30 22:22:28 +02:00
Michaël Van Canneyt
8ca4afd2d0 * Tests for NAMESPACES directive 2023-07-26 09:55:12 +02:00
Michaël Van Canneyt
6e84d4275d * Fix for tmarshaller big endianness 2023-07-24 21:51:09 +02:00
Michaël Van Canneyt
b5433100f4 * cwstring for unix 2023-07-23 23:15:55 +02:00
Rika Ichinose
7f4420495b TMarshal & TMarshaller, strange things from Delphi. 2023-07-22 15:24:27 +02:00
J. Gareth "Curious Kit" Moreton
ae5544db4c * New test for i40358 2023-07-21 09:24:53 +01:00
Pierre Muller
e1a216a4aa Add test about bus error generated in sparc compiler 2023-07-16 02:16:56 -05:00
Michaël Van Canneyt
4beda764aa * Tests for webassembly invoke helper 2023-07-13 07:32:21 +00:00
Michaël Van Canneyt
82ed35ead0 * Test adapted: RTTI is enabled for raw interfaces 2023-07-11 08:36:57 +00:00
Michaël Van Canneyt
d472c920ba * Hidden thunk class tests for webassembly 2023-07-11 08:36:57 +00: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
a20e8b9a3d * fix #40095: when searching a suitable constructor for the custom attribute don't allow the return of a procvar which can happen in Mac/TP procvar modes (like Delphi)
+ added test
2023-06-30 17:12:56 +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
Nikolay Nikolov
adf843196a Merge remote-tracking branch 'origin/main' into wasm_js_promise_integration 2023-06-24 15:08:18 +03: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
34f1a3ee28 * don't insert anonymous functions into a withsymtable
+ added test
2023-06-23 17:02:15 +02:00
Sven/Sarah Barth
7133ad7ecc * a type helper that inherits from another type helper may extend a unique type helper of the parent's extended type (thus allowing to make the type helper of the original type available for the aliased type)
+ added tests
2023-06-23 16:15:33 +02:00
Nikolay Nikolov
5c792c438d + disallow using sizeof() and bitsizeof() on WebAssembly reference types 2023-06-20 16:56:47 +03:00
Nikolay Nikolov
fce34eb4bf + disallow WebAssembly reference types in records, objects and classes 2023-06-20 15:13:15 +03:00
Nikolay Nikolov
8bd18fc6d3 Merge remote-tracking branch 'origin/main' into wasm_js_promise_integration 2023-06-17 17:11:23 +03:00
Sven/Sarah Barth
0b7a771ca9 * fix #40221: don't allow a conversion from an anonymous function to a procvar type if compare_defs_ext already rejected them
+ added tests
2023-06-16 17:28:50 +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
Nikolay Nikolov
2f1ccd6f2a + support 'promising last' exports 2023-06-16 11:00:19 +03:00
Nikolay Nikolov
4d62764fa3 + also allow declaring an external as 'suspending first' 2023-06-13 09:56:44 +03:00
Nikolay Nikolov
0f89852908 + support 'suspending last' externals as well 2023-06-13 09:34:54 +03:00
Nikolay Nikolov
d2396a848b + added a basic JS promise test 2023-06-11 16:59:29 +03:00
Nikolay Nikolov
8eea58f649 + support WebAssembly reference types as WebAssembly globals 2023-06-11 10:31:12 +03:00
Nikolay Nikolov
64569df017 * disallow passing WebAssembly reference types as untyped out parameters as well 2023-06-11 08:58:03 +03:00
Nikolay Nikolov
6ff566350c * disallow passing WebAssembly reference types as untyped var/constref/const parameters 2023-06-11 08:56:27 +03:00
Nikolay Nikolov
acf8fe59d0 * fixed program name in test 2023-06-11 08:32:25 +03:00
Nikolay Nikolov
f670ebbb28 * disallow WebAssembly reference types to be declared as var, constref or out parameters 2023-06-11 08:17:06 +03:00
Nikolay Nikolov
8cd6606970 + support nil comparison of WebAssembly reference types (externref and funcref) 2023-06-11 07:17:04 +03:00
Nikolay Nikolov
9daabb2123 + support using nil constants for setting values of WebAssembly reference types (funcref and externref) 2023-06-11 06:23:02 +03:00
Nikolay Nikolov
7abe3eeb84 + also test that pointers cannot be converted to externref implicitly 2023-06-11 05:56:49 +03:00
Nikolay Nikolov
a47a1c093a * disallow conversion between regular pointers and WasmExternRef 2023-06-11 05:28:39 +03:00
Nikolay Nikolov
021c1a7bb4 * fixed test's program name 2023-06-11 04:29:18 +03:00
Nikolay Nikolov
fcd5ecfcce + some basic tests for WebAssembly funcref types added 2023-06-11 04:27:05 +03:00
Nikolay Nikolov
8743f72f11 + disallow taking the address of WebAssembly externref type 2023-06-11 04:01:58 +03:00
Nikolay Nikolov
65b175cebd + simple test for WasmExternRef 2023-06-11 03:35:25 +03: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
marcoonthegit
e74d89ce62 * patch by Dean Mustakinov to improve commandline quote handling on Windows, resolves #40189 2023-04-29 13:11:11 +02:00
Pierre Muller
148e4abd0a Add aarch64-freebsd c object files 2023-04-24 18:23:01 +02: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
Dmytro Bogatskyy
327aac7f24 Add aarch64-iphonesim target 2023-03-27 18:45:00 +00: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
488c389b9b + support FILEEXISTS(...) in preprocessor expressions, resolves #39527
+ tests
  * tscannerfile.readpreproc sets preproc_pattern correctly for quoted strings
2023-03-20 23:17:09 +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
c1ecfc323a * ensure that a procvar (especially a "REFERENCE TO") begins either with FUNCTION or PROCEDURE
+ added test
2023-03-15 23:39:59 +01:00
florian
f0ac02cb2e * patch by Rika: Remove wrong paranoia (and add correct one (and shorten in general (and fix a bug in))) fpc_dynarray_setlength, resolves #40193 2023-03-12 22:15:55 +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
Sergey Larin
62c24b3756 Added test to check WideChar const to UTF8String const conversion 2023-02-24 22:59:39 +00: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
783bbb66f9 Update Makefiles 2023-02-05 19:18:48 +00: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
Rika Ichinose
b38d13577f Make Utf8CodepointLen adhere to the Unicode standard somewhat more and know all of the Unicode 15.0 combining characters. 2023-01-30 13:51:31 +00:00
florian
09b435cdab * transform a/a only into 1 if fastmath is on 2023-01-29 13:49:33 +01:00
florian
8ef0f59025 * mark constant symbols used in preprocessor expressions as used, resolves #40108 2023-01-24 22:36:26 +01:00
florian
ec28b7586c + support procvar[] in tp/mac procvar mode if the procvar returns an array type 2023-01-22 16:24:29 +01:00
florian
55deefbab5 * do not crash on illegal with statement, resolves #40118 2023-01-18 23:03:28 +01:00
florian
5598ffc210 * x86_64: warn only on negative offsets if rsp is involed, second part of #40113
+ tests
2023-01-17 23:09:42 +01:00
florian
8b08486fa1 * do not warn on lea e/rsp with negative address offset, part of #40113
+ tests
2023-01-15 23:06:05 +01:00
J. Gareth "Curious Kit" Moreton
b997e41366 * New tests that evaluate CMOVcc using a reference even if IfRefSafe returns False because the previous condition reads it 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
891723111c * New test for extended CMOVcc optimisations 2023-01-10 22:23:58 +00:00
florian
899bdc0016 * first approach to fix tfrldexp on i386-win32 2023-01-06 23:03:40 +01:00
florian
cfbdf90ab0 * patch by Rika to optimize ArcCos, resolves #40078 2023-01-02 18:56:41 +01:00
Sven/Sarah Barth
e1288897f3 * fix #40031: with support for inline specializations it no longer makes sense to make the parameter symtable of a procedure variable type readonly as there *are* defs that are added to it
+ add adjusted test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
4510945465 * fix #40062: ensure that Self is only added to anonymous functions when dealing with method pointers
+ added test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
5d7e3ca240 * fix #40060: ensure that Self is not added for anonymous functions that are part of a static class method
+ added test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
4c6338207f * fix #40061: the Self of types that aren't implicit pointers (recods, TP-style objects, primitive types (for helpers)) needs to be stored as a Pointer in the Capturer so that modifications are correctly visible
+ added tests
2022-12-30 23:32:00 +01:00
florian
7affd78904 * do not throw an internal error on typed constants with wrong element count, resolves #40066 2022-12-30 21:53:04 +01:00
florian
69eebe4c0c + patch by Rika to implement missing TPointF methods, resolves #40057
+ test by Rika
2022-12-29 15:20:49 +01:00
florian
571e0c39cc * increase time out 2022-12-24 17:25:42 +01:00
florian
3203eac6d3 + missing -O4 option added 2022-12-24 17:07:27 +01:00
florian
28b4189a9a * mess cleaned up 2022-12-23 18:16:52 +01:00
florian
30e0df384d * second part of #40041 fixed
+ tests
2022-12-22 22:41:39 +01:00
florian
e0fef23d77 * properly transform a+const1-const2 into a+const1+(-const2), resolves #40041 2022-12-21 22:34:46 +01:00
Michaël Van Canneyt
68cdd7073f * Patch from Ondrej to implement SameArray 2022-12-19 09:56:50 +01:00
Ondrej Pokorny
d1f999100b Add SetToArray and ArrayToSet functions for more general RTTI Set handling 2022-12-18 13:32:15 +00:00
florian
7917cbed22 + (negative) test for cmov/j/set without condition 2022-12-12 22:56:41 +01:00
florian
c92056fcac * patches by Rika: Fix a bug in LdExp(extended), and test Math.Frexp/Ldexp implementations instead of own, resolves #40030 2022-12-11 20:04:46 +01:00
florian
bf2911a562 + test for #40025 by Rika, resolves #40025 2022-12-10 21:35:07 +01:00
Pierre Muller
96c63c4443 Fix fcmove instruction for external assemblers 2022-12-10 19:59:05 +00:00
Pierre Muller
a592636d9c Use CMOV and FCMOV with a condition, the parser should reject without a condition 2022-12-10 17:06:35 +00:00
Jonas Maebe
851af5033f Darwin/AArch64: adjust alignment info of custom-aligned paralocs
Resolves #40019
2022-12-06 21:46:26 +01:00
J. Gareth "Curious Kit" Moreton
f54917d600 * New test to catch stack overflow in compiler (#40010) 2022-12-04 05:52:08 +00:00
Sven/Sarah Barth
ebb4de1441 * mark test as NORUN 2022-12-03 19:41:34 +01:00
Sven/Sarah Barth
7a34677b2a * as long as the type passed into a TypeInfo() is not an undefined or error def the resulting value will always be constant at compile time, so it can be compared to another then no matter if typenode or not
+ added tests
2022-12-02 17:47:15 +01:00
Pierre Muller
b202fb2b0a Fix two tests for ELFV2 powerpc64 ABI 2022-12-01 00:05:05 +00:00
florian
b835005941 * proper naming for test, resolves #40013 2022-11-30 22:17:58 +01:00
florian
96d4bd19ac * use bzhi only (if at all) for in_and_assign_x_y and not other in_*_x_y operations, resolves #40016 2022-11-30 22:16:21 +01:00
J. Gareth "Curious Kit" Moreton
5704626762 * New test to catch issue identified in #40003 2022-11-28 21:43:50 +00:00
florian
247423400f * create muln with create instead of create_internal when converting "n - n mod const)" so pass1 works properly, resolves #40004 2022-11-24 22:43:27 +01:00
florian
e7fda48327 + missing halt instructions 2022-11-23 19:01:32 +01:00
Pierre Muller
d38c24fee7 Add test for avx2 support using cpu unit function avx2support 2022-11-22 22:48:35 +01:00
florian
0ba4cee279 * convert n-n mod const into n div const*const, resolves #39615 2022-11-22 22:41:58 +01:00
J. Gareth "Curious Kit" Moreton
735f297f5b * Range check fixes to BZHI tests 2022-11-21 14:44:39 +00:00
florian
3b43bd027c * calculate life info for if nodes correctly if the then branch is empty, resolves #39992 2022-11-13 22:28:08 +01:00
Pierre Muller
0f30af07e5 Fix test to succeed for big endian mips 2022-11-12 13:16:51 +00:00
florian
3e6d4bf1cc * new cpu feature tests 2022-11-09 23:09:07 +01:00
florian
12aa48602b + CMOVSupport function 2022-11-08 21:15:11 +01:00
Sven/Sarah Barth
9e3483fbeb * fix #39977: allow a capturer to access any method independant of visibility as the visibility checks are supposed to have been done before the captured symbol was converted
+ added test
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
b051e7667c * fix #39978: ensure that Self is captured when a method of the current class is captured into a function reference
+ added test
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
d221f42a57 * ensure that the correct overload is picked for function reference parameters
+ added tests
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
a714e2ff35 * fix #39981: retrieve the symbol that returns the desired procdef/procvardef not maybe the Self or something else as we need that symbol to differentiate the procdefs
+ added test
2022-11-06 22:01:48 +01:00
Rika Ichinose
7243befdb7 Better TBits. 2022-11-06 20:55:38 +00:00
J. Gareth "Curious Kit" Moreton
0dbf40a24c * Added new tests for BZHI optimisations 2022-11-06 15:42:09 +00:00
Ondrej Pokorny
05c45486e8 fcl-image/pasjpeg: handle Exif orientation flag automatically 2022-11-02 09:25:20 +00:00
florian
3f7bf0fd70 * stop generation of typed array constants if the size does not match, resolves #39980 2022-11-01 21:16:31 +01:00
florian
0eee70ac81 * fix FindUnitSymtable for exception symtables, resolves #24801 and #39974
* more consistent naming of exceptsymtable enumeration symbol
2022-10-31 20:19:10 +01:00
Pierre Muller
e1b3c03daf Add test for mips code generation bug 2022-10-29 21:34:00 +01:00
Sven/Sarah Barth
e050a019a2 * fix #29859: ensure that it's correctly passed down into generate_specialization whether a unit name was provided for the specialization and if so search the generic only in that unit
+ added tests
2022-10-28 17:40:53 +02:00
florian
c75bb80b14 * more debug messages
* better exit codes for test
2022-10-26 23:20:18 +02:00
Pierre Muller
49ddf159b2 Fix internalerror generated with riscv32 compiler.
Fix
  Compiling ./fcl-passrc/src/pscanner.pp
  pscanner.pp(2512,40) Fatal: Internal error 2006010801
  error generated for riscv32-linux target after commit #c83e6c34
  by correcting expectloc for riscv32 for 64-bit comparisons.
  Add a small test.
2022-10-25 18:42:14 +02:00
florian
3fa77a4f62 * fix life information propagation for while loops, resolves #39971
* warnings/errors fixed which are caused by the new life information propagation
  + test
2022-10-24 22:13:43 +02:00
J. Gareth "Curious Kit" Moreton
fa76baa3d4 * New test to evaluate i39918 2022-10-22 13:07:16 +00:00
florian
8f269d4540 * check for proper exception type 2022-10-22 15:05:52 +02:00
florian
2b48afe151 * check if optinfo is assigned before using it, resolves #39913 2022-10-21 21:14:39 +02:00
J. Gareth "Curious Kit" Moreton
6b77017cb9 * x86: Added two new tests for i39922 2022-10-18 20:47:42 +00:00
Jonas Maebe
0758aa1143 FPU exception mask: generlised system unit interface 2022-10-17 19:43:01 +00:00
florian
e457cdad8a * patch by avk959 to solve infinite loop in FindMatchesBoyerMoore*, resolves #39885 and #39709
+ tests
2022-10-17 21:14:32 +02:00
florian
5670a7543c * properly reset nf_write/nf_modify flags for min/max inline nodes, needed by dead store optimization, resolves #39958
* factored out nutils.node_reset_pass1_write
2022-10-16 22:51:50 +02:00
florian
65ff03f30a + test for #39955 2022-10-15 13:59:35 +02:00
florian
1c86a4bbeb * if a pointer_to_array type conversion is applied to a variable, it is not written, resolves #39957 2022-10-14 23:12:18 +02:00
Pierre Muller
d217a459aa Fix bug report #39952.
* compiler/aggas.pas: Avoid use of .long for 64bit constant
    for targets that automatically insert alignments.
  + tests/webtbs/tw39952.pp: New test from bug report 39952.
2022-10-12 21:28:16 +01:00
florian
f0c0d8a033 + test for #22809 which is meanwhile resolved 2022-10-12 21:56:30 +02:00
florian
989895c82f * patch by Bart B: FormatFloat correctly outputs NaN now, resolves #32868
+ test
2022-10-11 22:11:33 +02:00
Sven/Sarah Barth
188cac3bc6 * enable OpenStrings by default in mode Delphi
+ added test
2022-10-08 13:52:34 +02:00
Sven/Sarah Barth
6cbbf9c52a * $P/$OpenStrings is supposed to be a local switch, so change that accordingly
+ added tests
2022-10-08 13:52:32 +02:00
florian
9f293df425 * export DynArrayAssign, resolves #39897 2022-10-06 22:56:38 +02:00
florian
ad7cc0e69d * handle <dyn.array>+[] (and swapped) correctly, resolves #39919 2022-10-05 22:48:21 +02:00
marcoonthegit
2291100bbd * fix and test for bug #39884 solving daysbetween when zero date is crossed. 2022-10-05 20:46:18 +02:00
florian
d8cd4d283d * removed wrong program name 2022-10-04 22:02:59 +02:00
florian
2396b36c21 * nil =/<> dyn. array is a valid expression, so isbinaryoperatoroverloadable needs to take care of it, resolves #39933 2022-10-03 10:26:09 +02:00
florian
444fe092da * propertly check equality with the for-counter when propagating constants, resolves #39915 2022-09-24 20:39:43 +02:00
florian
960c154f48 * properly named 2022-09-22 23:00:34 +02:00
Sven/Sarah Barth
4f9acc10f0 * fix #39898: when a loadnode is captured ensure that its nf_load_procvar flag is applied to the subscript node as well
+ added tests
2022-09-20 00:01:49 +02:00
florian
af1194de4d * end of an include file works like a new line with regard to single line (//) comments, resolves #39912 2022-09-19 23:03:36 +02:00
Sven/Sarah Barth
c8fee69345 * fix #39907: only load system class types from units that are marked as a System unit
+ added test
2022-09-18 15:41:33 +02:00
florian
168016b865 * patch by Rika: Use linear file list in FInput.TInputFileManager instead of linked, resolves #39880 2022-09-17 22:46:57 +02:00
Sven/Sarah Barth
e21186cac0 * fix #39902: in case of mode ObjFPC function pointers passed to parameters need to be checked for the correct procdef as well
+ added adjusted/extended test
2022-09-16 16:20:42 +02:00
Sven/Sarah Barth
13fb30c52e * fix #39902: correctly handle assignment of procvars to properties with a field write accessor
+ added adjusted/extended test
2022-09-16 16:20:42 +02:00
Jonas Maebe
e746cf96da Overload selection: call procvars if result is compatible with parameter
Previously we only autmatically called procvars without parameters in TP/Delphi
modes if their result type was equal to the parameter type to which they were
passed. Resolves #39748.
2022-09-16 11:21:05 +02:00
Sven/Sarah Barth
62a57bf82e * fix #39903: correctly parse anonymous function references in records (and classes/objects)
+ added test
2022-09-15 22:57:05 +02:00
J. Gareth "Curious Kit" Moreton
2931b43000 * New test for #39713 2022-08-31 18:25:11 +00:00
Sven/Sarah Barth
a93942cd27 * correctly convert a single WideChar to a PChar constant with the correct code page
+ added test
2022-08-28 21:53:44 +02:00
florian
889c164f78 + new test 2022-08-28 21:49:38 +02:00
florian
8e9a019fb7 * moved tests to proper location 2022-08-28 21:44:33 +02:00
florian
0440749562 + test for #39873 2022-08-28 21:29:52 +02:00
Sven/Sarah Barth
e5957b1ef0 * fix #39875: when a WideString constant is used to initialize a PChar the constant needs to be converted to the current code page
+ added test
2022-08-26 18:05:13 +02:00
Sven/Sarah Barth
5135b586cb * fix #39857: don't trash symbols marked as vo_is_internal
+ added test
2022-08-26 17:42:22 +02:00
Sven/Sarah Barth
8595c927a8 * fix #39876: correctly Read(Str) enum types which have a size smaller than 4 Byte
+ added tests
2022-08-26 17:16:29 +02:00
florian
85c7368759 * handle also simulated flags in tmipselnotnode.second_boolean, resolves #39877 2022-08-24 21:16:23 +02:00
florian
2670eb1ce7 * improved test as proposed by Rika 2022-08-23 21:27:44 +02:00
florian
4f7dffadbb * extended test 2022-08-22 21:33:52 +02:00
florian
5af087cfc3 * experimental test for #39722, no sure if it will work this way on all platforms 2022-08-21 23:03:38 +02:00
florian
d3d4de7818 * test for #39834, previous commits resolve #39834 2022-08-20 18:11:24 +02:00
Sven/Sarah Barth
61debb1559 * fix #39869: correctly check whether the recorded token stream still needs to be parsed (the replay depth of the scanner needs to be *larger* than what it was before starting the playback)
+ added test
2022-08-18 23:09:01 +02:00
florian
9e14dee1c3 * fixed Math.Tanh as proposed by Paolo Valle, resolves #39867 2022-08-17 20:56:43 +02:00
marcoonthegit
533cd82922 * applied patch from Alexey for closes #39704
* reviewed checks at start of function to match Delphi in rangecheck errors and other exits
 * test for the above.
2022-08-17 18:38:02 +02:00
Ondrej Pokorny
55629aeb19 do not publish enums with jumps 2022-08-16 20:47:44 +02:00
florian
cc66eb27ab * patch by Rika: More numerical stability for Math, resolves #39863 2022-08-14 22:26:09 +02:00
Sven/Sarah Barth
27c1bb3bea * an objectdef also requires an init for its members if a member (or a member of one of the parents) has a complex initialization
+ added test
2022-08-14 15:42:32 +02:00
florian
8028a769f4 * ensure that the executable path used in the test is absolute 2022-08-12 22:12:11 +02:00
Sven/Sarah Barth
5e7330448d * fix #39858: correctly keep track of symbols that need to be captured into the capturer
+ added test
2022-08-12 17:44:39 +02:00
Sven/Sarah Barth
35958a9b6b * fix #39860: even if the block type is not correct for the specialization of a generic routine continue to specialize it to not trigger e.g. an internal error
+ added tests
2022-08-12 14:46:56 +02:00
florian
5afd809e88 + handle LOC_FLAGS in thlcgobj.location_force_mem, resolves #39292 2022-08-08 23:14:56 +02:00
J. Gareth "Curious Kit" Moreton
8ba76f7d0a * New test to catch i39851 2022-07-31 19:45:23 +00:00
Nikolay Nikolov
8c9a07a3e8 + added test for wasmglobals, where the globals are declared in the implementation section of a unit 2022-07-31 20:12:11 +03:00
Nikolay Nikolov
6d23d22d50 + added wasm dir to test dirs 2022-07-31 20:04:43 +03:00
Nikolay Nikolov
6d3da83611 + added test for wasm globals 2022-07-31 19:54:34 +03:00
florian
6c47f8f4d7 * do not warn on anonymous functions without captured variables about being not used, resolves #39853 2022-07-29 21:46:48 +02:00
Sven/Sarah Barth
c122e16beb * fix #39849: it's an error when the file (or string) parameter of a Read*/Write* is followed by a ":"
+ added test
2022-07-29 17:34:55 +02:00
Jonas Maebe
3d6c53ee74 parentfpstruct: explicitly trash before initialising
It's an internal sym, but it contains user data. Together with the previous
commit resolves #39845
2022-07-26 22:36:13 +02:00
florian
a16f35dcb1 + support RV32E Extension 2022-07-17 22:14:13 +02:00
florian
399e699b72 * tests for merge request 244 2022-07-16 22:13:21 +02:00
Sven/Sarah Barth
8d90cd3e64 * fix #39826: correctly handle function references that are part of generics/specializations, but are not generics/specializations themselves
+ added test
2022-07-15 16:32:02 +02:00
florian
d27c3b4b79 + test for #33559 2022-07-13 22:53:37 +02:00
florian
e25594c48e * correctly truncate rtti symbol names of enumeration types, resolves #39829 2022-07-11 22:07:57 +02:00
florian
1d32a575e7 * as correctly pointed out by Bart B, -gw instead of -g should be used in the test for #39816 2022-07-06 19:50:07 +02:00
florian
e28238da9b * handle absolute on strings correctly for dwarf debug info, resolves #39816 2022-07-05 23:04:57 +02:00
florian
a9db747eb9 + test for #39786 2022-07-04 22:52:05 +02:00
florian
a2a2a6d79e * naming fixed, it is a test for #39785 2022-07-03 16:09:09 +02:00
florian
c5a0d16c58 * experimental test for #39758 2022-07-02 23:36:14 +02:00
Michaël Van Canneyt
ff3f183eb2 * Patch from Bart to remove unneeded test 2022-07-02 13:05:00 +02:00
florian
ceda27ae25 * allow type parameters in variant parts of records as we do not now
what type is used during specialization, resolves #39805
2022-06-28 22:45:17 +02:00
Michaël Van Canneyt
ecb4a0abca * Restore display of exception type. fix issue #39811 2022-06-25 14:49:44 +02:00
Michaël Van Canneyt
b2ad1d3efd * Patch from Bart. Fix for issue #39797 2022-06-25 14:33:33 +02:00
Michaël Van Canneyt
53623d7184 * Fix test regressions 2022-06-25 12:48:10 +02:00
florian
3ef7fedfec + forgotten test file added 2022-06-24 22:34:02 +02:00
florian
8eb2cea349 * do not throw an internal error if slice is used on dyn. array paramters, resolves #39806 2022-06-23 23:11:18 +02:00
J. Gareth "Curious Kit" Moreton
2d8b10a5d8 * Improved TESTALL.BAT file for JVM tests 2022-06-23 19:12:14 +00:00
Sven/Sarah Barth
b2a5334a75 * fix #39795: when extracting make_prettystring it was forgotten to also append the const part of the name to the specialize name 2022-06-22 09:44:21 +02:00
Nikolay Nikolov
4d6e3b4e1a * Don't call secondpass(left) in twasmtypeconvnode.second_int_to_real, this fixes bug #39735. 2022-06-21 23:59:25 +03:00
florian
8c5bc91855 + tests for convutils unit by Bart B, resolves #39793 2022-06-20 22:43:16 +02:00
florian
98ec81896e * do not throw messages on potentially uninitialized internal symbols, resolves #39744 2022-06-15 23:30:33 +02:00
florian
a05aa25aad * Risc-V: allow also register aliases in register modification lists after asm blocks, last part to resolve #39738 2022-06-03 22:54:18 +02:00
Sven/Sarah Barth
a27bc236a0 * fix #39742: when assigning a function to a function reference it's not the function itself that needs to be checked to be captureable, but instead what it captures (this applies for both the non-generic and the generic case)
+ added tests
2022-05-31 23:16:41 +02:00
Sven/Sarah Barth
0874521a78 + add tests to ensure that the assignment of nested function variables to function references is forbidden 2022-05-31 22:50:14 +02:00
Sven/Sarah Barth
883cc6d697 + add tests that ensure that the overload selection works correctly when functions, methods or nested functions are assigned when overloads for function references are involved as well 2022-05-31 22:50:14 +02:00
Sven/Sarah Barth
2372a06926 * fix #39740: consider a conversion of a procedure or procedure variable to a function reference as a bit more expensive than otherwise
+ added test
2022-05-31 22:50:14 +02:00
Sven/Sarah Barth
7bb1b12b4f + add a mode Delphi equivalent for tanonfunc56 to check whether overload selection works correctly 2022-05-31 22:50:13 +02:00
Sven/Sarah Barth
5a680f0148 * fix #39745: the conversion from ordinals to pointer types in mode Delphi is not allowed for a void type (happens when using a typecast to convert a method without parameters to a function reference)
+ added test
2022-05-30 23:05:45 +02:00
florian
390084d59e * tests fixed 2022-05-29 10:37:24 +02:00
florian
b810afa193 * test also cmem unit intensively 2022-05-27 23:33:20 +02:00
Nikolay Nikolov
c9ed14f87b + enable the 64-bit SAR instruction on the WebAssembly target 2022-05-27 22:56:05 +03:00
Nikolay Nikolov
b6aaa06f83 + enable the ROL/ROR instructions for WebAssembly 2022-05-27 22:46:32 +03:00
Sven/Sarah Barth
f73fc7d566 * fix #39736: ensure that the capturer object and any converted function reference interface are considered used
+ added test
2022-05-27 07:24:46 +02:00
Pierre Muller
2c9776ac6b Remove %OS by %TARGET, as spotted by Gareth 2022-05-26 21:38:31 +00:00
Sven/Sarah Barth
39b7b07ebb + add tests for function references, anonymous functions and C-blocks 2022-05-26 21:44:25 +02:00
Sven/Sarah Barth
6a9b4a1b13 + apply patch by Blaise.ru: allow initialisation of method pointers with class methods (when class types are
known at compile time)
* adjust error message when a method pointer isn't suitable
+ add tests
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
bc4eb00a7a * apply patch by Blaise.ru: proper code generation for assigning class non-static methods, accessed via a class reference type, to method pointers
+ added test
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
6e7a82440e * apply patch by Blaise.ru: avoid internal error when assigning class methods, accessed via a class reference type, to incompatible procvars
+ added tests
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
a8cf67d73b * apply patch by Blaise.ru: reject assignments of instance methods, accessed via a type, to method pointers
+ add tests
2022-05-26 21:42:54 +02:00
Sven/Sarah Barth
7f9428eed5 * add cblock directive so that the test fails for the correct reason 2022-05-26 21:42:51 +02:00
Nikolay Nikolov
8c562995d7 * regenerate makefiles with latest fpcmake 2022-05-24 14:01:59 +03:00
Nikolay Nikolov
0f4340e659 * fix regressions after previous patch by correctly parsing output, which does not contain '##WASI-EXITCODE:' 2022-05-24 10:30:20 +03:00
Nikolay Nikolov
a8b789d183 * patch from Pierre for working around the exitcode <= 125 limitation in wasmtime 2022-05-24 10:15:44 +03:00
Jonas Maebe
0d74752b1f Fix %cpu type as spotted by Alexey Torgashin 2022-05-15 18:01:48 +02:00
Jonas Maebe
9b11509dd0 Text for merge request #226 2022-05-15 10:57:43 +02:00
Pierre Muller
8184287ec0 Fix for variables longer than 127 chars 2022-05-10 23:18:01 +02:00
florian
084a4a0563 * made checking for supported targets more fool proof 2022-05-09 22:45:01 +02:00
J. Gareth "Curious Kit" Moreton
3e11b0e870 * New tests for aligned records 2022-05-09 20:03:44 +00:00
J. Gareth "Curious Kit" Moreton
fb14bc8459 * New webtbs/tw39646.pp test to evaluate fix for
i39646
2022-05-07 20:53:35 +00:00
florian
c4e85e5d2c * made test compilable if no floating point type support is available 2022-05-06 23:25:36 +02:00
florian
29881ee675 * for now, IO is not supported on AVR 2022-05-03 19:39:09 +02:00
florian
f5742f21a0 * do not run test, it is about successful compilation and runtime on weak CPUs is high 2022-05-01 22:58:24 +02:00
florian
6d6774bcc4 * write number of iterations 2022-05-01 22:42:57 +02:00
florian
9540dc8989 * make test compiling on avr 2022-04-29 23:06:17 +02:00
florian
3fac399683 * more precise test as suggested here: 876ae56158 (note_921869640) 2022-04-24 14:41:06 +02:00
florian
876ae56158 * patch by Rika: fix for ... in iterator for TMap and TSet, resolves #39354 2022-04-23 21:51:26 +02:00
Sven/Sarah Barth
74f9523806 * in case of an implicit specialization ensure that the symbol of the generic is indeed considered as used once the final implicit specialization has been picked
+ added test
2022-04-23 16:29:13 +02:00
Sven/Sarah Barth
97c16401f7 + add test for already fixed #39677 2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
22a4cc66ec * fix #39675: consider the symbols for unnamed parameters as used so that there won't be unnecessary hints about them
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
76753438ed * fix #39681: also handle the result type of a specialized procvar when checking for a possible implicit specialization
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
c0fa45dc92 * a function can't be used to implicitely specialize a specialized procedure variable parameter and vice versa
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
a5f3040da5 * the index of the generic type parameter is not the same index of the paras list
+ added test
2022-04-22 10:40:58 +02:00