Commit Graph

243 Commits

Author SHA1 Message Date
florian
529091f620 * fixed test runner directives 2025-01-26 10:53:22 +01:00
florian
e7ae57b0cd * skip test on RiscV64 2024-12-25 18:35:46 +01:00
florian
63734fb792 * unnecessary directives removed 2024-10-31 22:35:04 +01:00
florian
4a4eadc60e * throw an error if varargs is used without appropriate calling conventions, resolves #40342 2024-05-14 22:44:12 +02:00
Sven/Sarah Barth
61397d40ae * ensure that Insert() of a single element into a dynamic array is typechecked in a way that the user is notified of errors
+ added test
2024-04-24 23:13:36 +02: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
7917cbed22 + (negative) test for cmov/j/set without condition 2022-12-12 22:56:41 +01: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
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
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
florian
89f9ebc7b7 * throw an error if raise is called in a noreturn subroutine outside of any exception frame, resolves #39514 2022-01-06 21:13:19 +01:00
florian
2a93e65511 * seperator => separator 2022-01-02 13:12:33 +01:00
florian
d2447026de + modeswitch UNDERSCOREISSEPERATOR, active by default in delphi modes:
support _ as seperator in numbers, it is ignored while reading them, resolves #39504
2022-01-01 23:28:36 +01:00
Florian Klämpfl
25eab57a58 * allow %... for binary constants in delphi mode, resolves #39503 2021-12-29 15:37:53 +01:00
florian
c6874df5c8 * better error recovery, resolves #39485 2021-12-16 22:27:38 +01:00
florian
67e7dc0194 * consecutive naming 2021-11-07 20:03:09 +01:00
florian
d708bef92f + Aarch64: read register sets with ranges properly
+ tests
2021-11-07 20:02:29 +01:00
florian
dcb1fcd9b8 + support $lgeacyifend directive, resolves #37676 2021-11-01 23:24:42 +01:00
Jonas Maebe
15865e7602 Record variant discriminators: check types 2021-10-31 21:13:35 +01:00
florian
ce1f9cce01 * throw an error if esp/rsp are used as index register
git-svn-id: trunk@49568 -
2021-06-27 21:21:19 +00:00
florian
29a5d3267c * moved warning about suspicious comp assignment to type check pass, catches also
assignments of constants

git-svn-id: trunk@49242 -
2021-04-21 19:51:22 +00:00
svenbarth
2a897f5b6b * apply slightly adjusted patch by Blaise.ru which moves parsing of result types to a separate functions thus ensuring that File types can't be used for procedure variables (just like they already couldn't be used as a result type for normal functions)
+ added test

git-svn-id: trunk@47810 -
2020-12-18 13:50:39 +00:00
Jonas Maebe
38a059f039 * give an error when trying to define a macro/compiler variable with
an empty name

git-svn-id: trunk@47300 -
2020-11-03 21:34:19 +00:00
yury
797795e285 * Skip the test for aarch64.
git-svn-id: trunk@44049 -
2020-01-27 17:50:35 +00:00
florian
e1433adc2e * check in the internal assembler for references with incorrect use of RIP
+ test

git-svn-id: trunk@43461 -
2019-11-13 20:47:42 +00:00
svenbarth
c147debda1 * ensure that the correct amount of parameters is used for an operator overload (this is essentially important for unary operators that were declared with two arguments)
git-svn-id: trunk@41868 -
2019-04-14 20:47:43 +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
svenbarth
539ed761ba * a property access list must only consist of record or object fields; classes are not allowed
git-svn-id: trunk@40656 -
2018-12-26 11:26:01 +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
svenbarth
251dfb6776 * don't allow constants of the record type that is currently being parsed; this would fail as soon as another field is added after the constant declaration
+ added tests
Note: unlike what bug report 27880 suggests Delphi also does *NOT* allow this (at least a current Delphi Tokyo) and fails with a "type is not completely defined" error, so this test belongs into the "failure" category

git-svn-id: trunk@40285 -
2018-11-11 22:08:29 +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
6a150cdd75 * disable optimizations for proper warning
git-svn-id: trunk@39448 -
2018-07-13 21:00:34 +00:00
svenbarth
05ac42766d * fix test; it of course still fails, but now it fails with the expected warning instead of an error
git-svn-id: trunk@39351 -
2018-06-30 15:43:18 +00:00
florian
9af9658fa7 * first parameter of SetLength must be valid, as it is read
git-svn-id: trunk@39347 -
2018-06-30 11:25:43 +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
4cf1ac209a Add %skiptarget=$nothread to tests using threads
git-svn-id: trunk@38528 -
2018-03-15 09:05:26 +00:00
svenbarth
fcc1ce7a08 * fix for Mantis #30344: applied patch by Mario Ray Mahardhika to add new command line option -Sj[-|+] to control writeable typed constants (with a small adjustment to the help text)
+ added test

git-svn-id: trunk@37437 -
2017-10-09 19:19:23 +00:00
maciej-izak
8391b73206 * Virtual methods cannot be declared as static (static virtual method has no sense).
+ added tests

git-svn-id: trunk@35724 -
2017-04-03 20:45:52 +00:00
florian
0897bd154a + align(<int64>,<int64>) and align(<qword>,<qword>), resolves an issue reported on the mailing list with large records
+ tests
* trecordsymtable.insertunionst takes a asizeint parameter
* changed one aint into a asizeint

git-svn-id: trunk@35662 -
2017-03-26 09:35:56 +00:00
svenbarth
3f77ce3b12 * leave parse_proc_head() (with some error recovery) if the interface could not be found instead of running straight into an access violation
+ added test

git-svn-id: trunk@35007 -
2016-11-28 17:54:48 +00:00
florian
10132bfafa * removed accidently committed file
git-svn-id: trunk@34927 -
2016-11-20 11:26:48 +00:00
florian
56252d59f0 + support for the PREFETCHTW1 instruction based on a patch by Emelyanov Roman, resolves #30933
git-svn-id: trunk@34917 -
2016-11-18 20:19:39 +00:00
Jonas Maebe
b8ed0fac5d * give an error when trying to get the address of an element of a dynamic
string in a typed constant, like Delphi (instead of generating a bogus
    address)

git-svn-id: trunk@33958 -
2016-06-12 09:20:57 +00:00
florian
b684719f1e + give an error if allocated temps. overflow the normally max. available space
git-svn-id: trunk@30449 -
2015-04-05 20:59:34 +00:00
Jonas Maebe
e6d948470e * skip test in general for 64 bit cpus
git-svn-id: trunk@29947 -
2015-02-23 22:54:31 +00:00
svenbarth
5115c3e680 Fix for Mantis #26481. This is a regression.
nutils.pas, handle_staticfield_access:
  * generics don't have staticvarsyms for their static fieldvarsyms so we need to simulate a non-static access to avoid 1) an exception and 2) incorrect errors that instance methods can't be accessed

+ added tests

git-svn-id: trunk@29484 -
2015-01-16 16:05:53 +00:00
nickysn
84a18e57bc + added test for the error checking for nil-number; tests already exist for
nil+number and number+nil, so this was the only one missing

git-svn-id: trunk@28235 -
2014-07-18 12:09:27 +00:00
nickysn
6d54046300 * output a proper error message in case number+nil is encountered (just like
it's already done for nil+number and nil-number)

git-svn-id: trunk@28225 -
2014-07-15 22:26:58 +00:00