svenbarth
3d2945726a
* handle generic parameters in Ord()
...
+ added test
git-svn-id: trunk@45232 -
2020-05-03 15:08:31 +00:00
florian
b6097a0300
* correctly handle result type of string constant nodes for internally created
...
nodes
git-svn-id: trunk@45231 -
2020-05-03 12:41:17 +00:00
svenbarth
bd01182ff0
* add support for AND, OR, XOR and NOT of integer values in preprocessor directives (Delphi allows that as well)
...
+ added test
git-svn-id: trunk@45053 -
2020-04-24 14:09:04 +00:00
svenbarth
5ef9a78f5f
* fix for Mantis #36951 : B and BL can take immediate literals as well
...
+ added test
git-svn-id: trunk@44999 -
2020-04-22 20:19:14 +00:00
florian
66aa2e1416
* fixed tests for architectures with FPC_COMP_IS_INT64 defined
...
git-svn-id: trunk@44222 -
2020-02-20 20:51:46 +00:00
svenbarth
c4f3f7f453
* only resolve a dummy symbol if it is a type symbol (thus truly a dummy symbol)
...
+ added tests
git-svn-id: trunk@44172 -
2020-02-14 16:49:07 +00:00
svenbarth
9a42625cfb
* also allow by-value open array parameters for the tail recursion optimization
...
* adjusted test
git-svn-id: trunk@44012 -
2020-01-21 21:30:10 +00:00
svenbarth
4fc02d3d09
* enable tail recursion optimization also for const and constref open arrays
...
+ added test
git-svn-id: trunk@44011 -
2020-01-21 21:29:56 +00:00
svenbarth
3e7dc25667
* fix for Mantis #36496 : correctly handle the function result alias variable inside generic functions
...
+ added tests
git-svn-id: trunk@43823 -
2019-12-30 21:35:26 +00:00
svenbarth
ef6c9e930b
* correctly handle the genericdef being a procdef, otherwise no code will be generated (and no error either :/ )
...
+ added test
git-svn-id: trunk@43586 -
2019-11-25 20:28:23 +00:00
svenbarth
39f4b97ea5
+ add test for a problem reported by Michael van Canneyt which is fixed by the previous revision
...
git-svn-id: trunk@43569 -
2019-11-24 00:04:35 +00:00
florian
3de38c4894
* naming of tests fixed
...
git-svn-id: trunk@43502 -
2019-11-16 17:18:04 +00:00
florian
60b3296594
* relax conditions in tcallnode.optimize_funcret_assignment, resolves #36279
...
git-svn-id: trunk@43501 -
2019-11-16 17:16:16 +00:00
svenbarth
b4e998b3f8
+ add tests to check for correct definition of the FPC_* mode defines
...
git-svn-id: trunk@43115 -
2019-10-03 12:34:42 +00:00
Jonas Maebe
9b70c7623d
* initialise local variable to prevent random failures
...
git-svn-id: trunk@42992 -
2019-09-14 07:30:38 +00:00
Jonas Maebe
ce598c15ec
* factored out the conditions under which add nodes need to perform
...
overflow checks
o in particular ensure that cpu-specific overrides don't perform overflow
checks when nf_internal is set
git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
Jonas Maebe
15532e5277
* disabled low-level hack test for LLVM
...
git-svn-id: trunk@42102 -
2019-05-19 19:20:38 +00:00
svenbarth
b7a716cd81
* correct return a pointer to the list so that List^[x] works as it did before 3.2
...
+ added test
git-svn-id: trunk@41938 -
2019-04-26 08:13:11 +00:00
svenbarth
307ff071e6
* allow any untyped parameter to be passed to a untyped constref parameter
...
+ added test
git-svn-id: trunk@41829 -
2019-04-04 19:31:55 +00:00
svenbarth
9a9c6a3ff4
* fix for Mantis #35150 : correctly convert Int64/QWord values to OleVariant (Delphi compatible)
...
+ added test
git-svn-id: trunk@41571 -
2019-03-03 14:50:09 +00:00
Jonas Maebe
7b313a2c15
* stop searching for methods to implement interfaces in parent classes after
...
encountering a method with the correct name that does not have the
"overload" directive (same logic as when looking for a call candidate,
to avoid errors when using a Pascal-level wrapper to call interface
methods, and Delphi-compatible since it always required "overload" for
overloaded methods)
o also catches calling convention mismatches like in webtbs/tw27349
git-svn-id: trunk@40683 -
2018-12-28 18:25:58 +00:00
Jonas Maebe
c6bb85eae9
* support for compiling the objects unit methods that expect local procedure/
...
function pointers using {$modeswitch nestedprocvars} functionality, activate
this for LLVM and also activate that modeswitch for a test that uses this
o also convert the IDE units to use this functionality
o requires extra typecasts because implicit type conversions from
procvar(p: psometype) to procvar(p: pointer) are not supported; on the
plus side, even those type conversions are checked for validity
o note: requires {$modeswitch nestedprocvars} in all programs/units
that rely on this functionality
git-svn-id: trunk@40598 -
2018-12-20 21:22:40 +00:00
pierre
e7aadde92f
Modify tbs/tb0588.pp to check that a warning is issued about non-initialized return value, moved to tbf directory
...
git-svn-id: trunk@40521 -
2018-12-11 08:47:59 +00:00
yury
4682ac269d
* Further improvement for r40180:
...
An uninitialized function Result of a managed type needs special handling.
When passing it as a var parameter a warning need to be emitted, since a user
may expect Result to be empty (nil) by default as it happens with local vars
of a managed type. But this is not true for Result and may lead to serious issues.
The only exception is SetLength(Result, ?) for a string Result. A user always
expects undefined contents of the string after calling SetLength(). In such
case a hint need to be emitted.
+ Tests for this.
git-svn-id: trunk@40216 -
2018-11-04 15:37:52 +00:00
florian
352fb866ef
* is_range_test returns false if "lower" bound is greater than "upper" bound
...
git-svn-id: trunk@39837 -
2018-09-27 20:24:52 +00:00
florian
a34d4e715c
Merged riscv_new branch
...
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
svenbarth
06267006f3
* explicitely handle the boolean types to determine the bit size as all of them have the bit size 1
...
+ added test
git-svn-id: trunk@39786 -
2018-09-21 13:24:49 +00:00
Jeppe Johansen
74a7963d58
Redo overflow checking code.
...
Fix shift operators in case of unsigned subreg operations. There should be no sign extension here.
Add some unittest implementations that test stack execution and writing to readonly constants.
git-svn-id: branches/laksen/riscv_new@39762 -
2018-09-16 18:37:59 +00:00
Jeppe Johansen
fb0ef295f1
Fixed unittests that needed arch specific inline assembler.
...
git-svn-id: branches/laksen/riscv_new@39716 -
2018-09-09 09:18:58 +00:00
svenbarth
072699d38a
* protect the destructors of tabstractrecordsymtable and twithsymtable against executing when called with a refcount > 1 (this fixes Mantis #34210 )
...
+ added simplified test
git-svn-id: trunk@39693 -
2018-08-31 19:16:45 +00:00
florian
6b9f52b4f2
+ couple of { %OPT=-CE } to tests added
...
git-svn-id: branches/laksen/riscv_new@39641 -
2018-08-19 12:42:26 +00:00
svenbarth
32c307e9ce
* fix for Mantis #34021 : if one of the two operators is an array constructor try to use an operator overload for that first before converting it to a set
...
+ added tests
git-svn-id: trunk@39554 -
2018-08-03 15:24:59 +00:00
florian
0c6cf12fbf
+ support for the directive $EXCESSPRECISION
...
git-svn-id: trunk@39443 -
2018-07-12 21:39:50 +00:00
nickysn
e813a11e85
+ support TP7-compatible @proc^ (as in FillChar(@proc^,...))
...
git-svn-id: trunk@39343 -
2018-06-29 14:16:35 +00:00
svenbarth
ff407c56d9
* extend scanning of $modeswitch to support not only + and -, but also ON and OFF like other switches
...
+ added tests
git-svn-id: trunk@39280 -
2018-06-22 21:29:08 +00:00
pierre
e518bd52ba
Explicitly disabled overflow and range check for these two tests
...
git-svn-id: trunk@39266 -
2018-06-21 04:52:37 +00:00
svenbarth
7990b2e3f3
* apply patch from J. Gareth Moreton to implement Int() for SSE (currently only used on Win64)
...
+ added test
git-svn-id: trunk@38993 -
2018-05-14 21:08:04 +00:00
pierre
f28ab34f06
unicodeducet must appear before fpwidestring to set current_collation at startup
...
git-svn-id: trunk@38962 -
2018-05-09 23:11:48 +00:00
svenbarth
abd893cac4
* fix for Mantis #33635 : correctly working SSE2 based Frac() implementation by J. Gareth Moreton
...
+ added test
git-svn-id: trunk@38903 -
2018-05-04 15:44:40 +00:00
svenbarth
cfa373a8cf
* fix case of string with ranges as labels
...
+ add test
git-svn-id: trunk@38860 -
2018-04-27 21:06:33 +00:00
pierre
4a2348a38b
skip targets that do not support libraries
...
git-svn-id: trunk@38772 -
2018-04-14 16:09:50 +00:00
pierre
ab7fb33d67
Restore removed ifdef UNIX around iosxwstr/cwstring unit loading
...
git-svn-id: trunk@38763 -
2018-04-13 06:22:21 +00:00
pierre
52b830a434
Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets
...
git-svn-id: trunk@38757 -
2018-04-12 20:39:34 +00:00
pierre
e69a7489d9
Add wide string needed units for go32v2 or darwin
...
git-svn-id: trunk@38736 -
2018-04-12 10:07:16 +00:00
pierre
4cf1ac209a
Add %skiptarget=$nothread to tests using threads
...
git-svn-id: trunk@38528 -
2018-03-15 09:05:26 +00:00
pierre
cc22913a4c
Modify DoMem parameter type to SizeUInt and adapt tests using this function, to avoid run time errors with range check
...
git-svn-id: trunk@38521 -
2018-03-13 21:59:58 +00:00
florian
61053ead34
+ optimize is operator if used on sealed classes as proposed in #30097
...
git-svn-id: trunk@38387 -
2018-02-28 22:09:24 +00:00
florian
70519c0837
* do not use crt by default, reduced wrong fails hopefully
...
git-svn-id: trunk@38345 -
2018-02-25 15:34:15 +00:00
florian
8731854165
* test code for avr assembler by Christo Crause
...
* fix size of val field in TOprRec for avr, resolves #32946
git-svn-id: trunk@38291 -
2018-02-19 21:23:28 +00:00
florian
6400d612e8
+ seg(<procvardef>) returns the segment stored in the procedure variable
...
git-svn-id: trunk@38216 -
2018-02-11 22:26:01 +00:00
florian
e5ebc65cce
* if si and di are allocated on i8086, using an index in references is not possible anymore
...
git-svn-id: trunk@38203 -
2018-02-11 15:54:37 +00:00
svenbarth
640480272f
* adjust TThread.Synchronize so that it also works correctly if the passed in thread instance is not the instance of the current thread
...
+ added test
git-svn-id: trunk@38124 -
2018-02-05 21:50:00 +00:00
svenbarth
22932493b9
* if the debug info of a parent def is considered as queued then ensure that it is indeed queued (if it should already be in the list then the duplicate entry would have the state written if it's checked and thus ignored)
...
+ added test
git-svn-id: trunk@37969 -
2018-01-14 16:46:10 +00:00
svenbarth
afa6d1bdb0
* extend test a little bit to ensure that nested Concat() calls for strings work correctly
...
git-svn-id: trunk@37724 -
2017-12-12 19:54:38 +00:00
svenbarth
f6a867ef04
* move handling of Concat to tinlinenode so that it can be easily extended for dynamic arrays
...
+ added test
git-svn-id: trunk@37429 -
2017-10-08 10:39:34 +00:00
svenbarth
9619576515
+ add support for $SetPE{OS,SubSys,User}Version directives; Delphi compatible; Note: $SetPEUserVersion takes precedence to $Version
...
+ added test
git-svn-id: trunk@37364 -
2017-09-30 13:55:29 +00:00
svenbarth
81a0f88d8c
+ add Delphi compatible TThread.ForceQueue() which enqueues the method also for the main thread (at least if the RTL is in multi threading mode, otherwise it's still executed right away - whether this is Delphi compatible needs to be tested as I only have a 10.1 currently which does not yet support TThread.ForceQueue())
...
+ added test
git-svn-id: trunk@37359 -
2017-09-29 21:19:45 +00:00
maciej-izak
8b5524ac3a
* ignore is_publishable for properties in interfaces (related to $M+ directive). $M has effect on visibility of default section for classes. Interface has always only public section (fix for problem in tb0631.pp)
...
git-svn-id: trunk@37136 -
2017-09-03 19:05:21 +00:00
svenbarth
7b675b6769
* correctly write the type of open array parameters as the element def and not the array def
...
+ added test that shows the linking error if not done so (otherwise that should already be covered by trtti15.pp)
git-svn-id: trunk@37083 -
2017-08-29 20:17:24 +00:00
svenbarth
83e4585b0f
* correctly handle unit identifiers inside specializations of generic routines
...
git-svn-id: trunk@37080 -
2017-08-29 18:29:10 +00:00
Károly Balogh
13d2ae8166
m68k: disabled obsolete test which tested between FPU_NONE and FPU_SOFT defaults...
...
git-svn-id: trunk@36626 -
2017-07-01 21:29:00 +00:00
nickysn
504662826a
* fixed the rtl cpu ifdefs for the rol/ror/sar cpu support check
...
git-svn-id: trunk@36153 -
2017-05-08 10:16:15 +00:00
nickysn
4a8a7c210a
* fixed test on platforms that don't have 8-bit and 16-bit rol/ror
...
git-svn-id: trunk@36144 -
2017-05-07 13:34:26 +00:00
florian
b3f889e028
* -Ox options are incremental, so disable all optimizations first in case testing is run with -O4
...
git-svn-id: trunk@36135 -
2017-05-06 18:47:41 +00:00
nickysn
c28d533bb0
+ support the cmpsd sse instruction in the at&t inline assembly reader
...
git-svn-id: trunk@36124 -
2017-05-05 15:46:47 +00:00
nickysn
881cb790a9
+ added tests that check side effect removal behaviour for the simplifications
...
added/changed today
git-svn-id: trunk@36053 -
2017-05-01 21:01:26 +00:00
nickysn
7821d729cd
+ a very basic test for correctness for the various simplifications, implemented
...
today. It does not check for side effects and thus it should work at any
optimization level, regardless of whether each optimization is done or not.
git-svn-id: trunk@36048 -
2017-05-01 20:17:07 +00:00
maciej-izak
1d301b6dbe
More consequent writing of Rtti. Part of code related to recorddef moved from recorddef_rtti to write_child_data_rtti(). When typeinfo is used in code init Rtti is a child of the full Rtti. Commit also contains correction for code commited for mantis #31249 (r35376) and mantis #31305 (r35377) for objects. Before was impossible to compile code with usage of typeinfo() function for object without managed fields ("Undefined symbol" error).
...
+ Test attached
git-svn-id: trunk@35403 -
2017-02-06 18:52:37 +00:00
Károly Balogh
442cbed9ad
improved tb0625. boolean casting should disregard the upper bits
...
git-svn-id: trunk@35107 -
2016-12-11 13:26:04 +00:00
svenbarth
0c372f0beb
* fix compilation of Rtti unit on PowerPC: converting a Int64 to a Boolean failed (in this case with an internal error)
...
+ added a test though we should probably extend tcnvint2.pp to test converting ints to different sized boolean types...
git-svn-id: trunk@35101 -
2016-12-10 19:13:07 +00:00
svenbarth
70817baf98
* since we already allow inline specializations in mode ObjFPC due to generic functions it's only consequential to also allow specializations after pointers (they are already allowed in mode Delphi).
...
+ added tests
* tgeneric87.pp and tgeneric88.pp are no longer considered as tests that should fail
git-svn-id: trunk@35078 -
2016-12-06 21:37:22 +00:00
marco
690f784c4d
* enable 40+ tests for Haiku as per mantis #30470
...
git-svn-id: trunk@34312 -
2016-08-14 14:09:24 +00:00
Jonas Maebe
051317e82e
* load the function result from the parentfpstruct to its original location
...
in exit nodes, because the wrapping code added in
tnodeutils.wrap_proc_body() gets inserted before the exit label to which
the exit node jumps
git-svn-id: trunk@34305 -
2016-08-13 14:47:50 +00:00
pierre
358eb38ef2
* fix test for msdos compact mode
...
git-svn-id: trunk@34268 -
2016-08-10 16:25:42 +00:00
Jonas Maebe
630033c9fa
* fixed compilation on platforms where comp=int64 (should maybe fix the
...
compiler to support assigning integral floating point constants to
comp on all platforms)
git-svn-id: trunk@34082 -
2016-07-06 17:28:08 +00:00
pierre
b238b3cb8d
Fix test for compact and medium i8086 memory model
...
git-svn-id: trunk@34074 -
2016-07-05 22:42:38 +00:00
Jonas Maebe
ec5dea1092
* don't perform the "/ const" to "* (1/const)" transformation for comp-typed
...
expressions, since comp cannot represent fractions (bug reported at
http://lists.freepascal.org/pipermail/fpc-pascal/2016-June/048234.html )
git-svn-id: trunk@34035 -
2016-06-30 15:33:51 +00:00
pierre
8058f6b301
Use SizeInt type for DoMem variable argument, as it might be different from PtrInt, for instance for some msdos memory models
...
git-svn-id: trunk@34022 -
2016-06-28 16:13:24 +00:00
pierre
3253711e95
Disable expliccitly overlfow and range checks
...
git-svn-id: trunk@34014 -
2016-06-21 09:21:18 +00:00
pierre
df7e562d94
Add explicit $R- or $Q- to avoid different results if -Criot option is used
...
git-svn-id: trunk@34010 -
2016-06-20 15:55:10 +00:00
svenbarth
aaff6d0b97
Allow Delete() and Insert() to be used with generic types as arguments.
...
+ added test
git-svn-id: trunk@33897 -
2016-06-03 21:45:23 +00:00
svenbarth
9fb2a8bba9
+ added simple test to check whether Delete() and Insert() still work correctly (though a mistake there would probably have broken the cycling totally anyway...)
...
git-svn-id: trunk@33896 -
2016-06-03 21:38:29 +00:00
Jonas Maebe
8c0d9b581c
* don't write the destination register in a_load_ref_reg_unaligned() before
...
the reference has been used for the last time, as the destination
register could be the base or index register of the reference
git-svn-id: trunk@33393 -
2016-03-30 20:04:31 +00:00
svenbarth
9f2defcb7e
Adjust the test I committed yesterday so that we treat the warning we don't want to reappear as an error.
...
git-svn-id: trunk@33325 -
2016-03-25 08:35:34 +00:00
svenbarth
35f8d5427f
Revert r31262. Not doing type checking on generics leads to strange warnings (e.g. because variables are not considered as written). I better deal with the compile time errors one at a time than the warnings.
...
The added test shows such a bogus warning (sadly the test suite can handle the occurence or absense of certain messages yet :/ )
git-svn-id: trunk@33324 -
2016-03-24 20:58:04 +00:00
yury
3a5412a931
* Disabled tests which force the -Cg- option for Android since they can not be run on Android 5+ where PIE is required.
...
git-svn-id: trunk@33303 -
2016-03-20 21:52:05 +00:00
florian
37cb35d780
+ support for the .code directive in arm inline assembler
...
git-svn-id: trunk@32840 -
2016-01-03 22:08:25 +00:00
florian
c3a293b727
* test name properly
...
git-svn-id: trunk@32839 -
2016-01-03 22:05:00 +00:00
nickysn
e6d01eb3b5
* fixed a bug, which caused a function that returns a method pointer (or nested
...
procdef) to be called twice, when the result of this function is immediately
called (i.e. not stored in a temp variable).
git-svn-id: trunk@32495 -
2015-11-22 17:21:08 +00:00
nickysn
4da9296f80
* disabled the name mangling of external non-cdecl and non-cppdecl procedures
...
that don't have an import name specified explicitly. The previous behaviour
wasn't very useful, because it included the current module name in the mangled
name and that was very unlikely to be the correct name of a routine in a
different module. The new behaviour is also BP7 and Delphi compatible.
git-svn-id: trunk@32385 -
2015-11-20 23:14:53 +00:00
Jonas Maebe
e15c969cbc
* mention modified registers in assembler block
...
* prevent writes beyond the end of the record
git-svn-id: trunk@31956 -
2015-10-05 21:17:41 +00:00
yury
80e5eb0c5d
* ARM: I hope this is a final proper fix for GOT initialization. + Test.
...
git-svn-id: trunk@31730 -
2015-09-17 12:18:04 +00:00
florian
049491a573
+ fold the constructs @<record type>(nil^).<field >) and @<record point>(nil)^.<field> used to get the offset of a field into a constant
...
git-svn-id: trunk@31470 -
2015-08-31 20:03:49 +00:00
Jonas Maebe
db4119ee08
* fix test on non-Windows systems (patch by Olivier Coursière, mantis#28556)
...
git-svn-id: trunk@31368 -
2015-08-22 15:27:51 +00:00
florian
b61fd60b9d
+ support for {$I %CURRENTROUTINE%}
...
* if chain changed into case statements
git-svn-id: trunk@30873 -
2015-05-16 22:22:26 +00:00
florian
956883b0c7
* pass dyn. arrays in registers when i386 register calling conventions are used
...
git-svn-id: trunk@30870 -
2015-05-16 20:27:09 +00:00
florian
53d6f6bc55
* handle dyn. arrays and interfaces correctly in TypInfo.SetOrdProp
...
git-svn-id: trunk@30141 -
2015-03-08 09:40:36 +00:00
florian
1d2d1364c9
* fix test now that it is actually executed
...
git-svn-id: trunk@30030 -
2015-02-28 16:25:09 +00:00
Tomas Hajny
b2475353f4
* test programs previously having extension .pas renamed to .pp so that they are found during testsuite runs
...
git-svn-id: trunk@30024 -
2015-02-27 13:03:13 +00:00
Jonas Maebe
bff3feae7b
+ AArch64 support
...
git-svn-id: trunk@29948 -
2015-02-23 22:54:34 +00:00