florian
c0feaf1f1e
+ allow absolute to absolute symbols, resolves issue #32474
...
git-svn-id: trunk@37379 -
2017-10-01 19:54:44 +00:00
svenbarth
a1c910d892
* fix for Mantis #32108 : ensure that types are registered once there is no more specialization is going on
...
git-svn-id: trunk@37341 -
2017-09-27 20:47:16 +00:00
florian
1c69ae6a15
handle correctly "reg+const" operands in avr assembler, fixes issue #32016
...
git-svn-id: trunk@37328 -
2017-09-26 20:14:41 +00:00
svenbarth
7d47c24be2
* fix unit name
...
git-svn-id: trunk@37021 -
2017-08-21 20:45:46 +00:00
florian
a2e442e111
* keep the names of X, Y and Z in assembler files, fixes issue #32150
...
git-svn-id: trunk@36776 -
2017-07-23 19:24:45 +00:00
svenbarth
0c42b6f44a
* fix for Mantis #32118 : also provide a range for undefined defs
...
+ added test
git-svn-id: trunk@36723 -
2017-07-10 19:47:21 +00:00
svenbarth
ca78bfffae
* fix for Mantis #32111 : allow undefined defs as a for loop's counter; the specialization will decide whether it will compile or not
...
+ added test
git-svn-id: trunk@36722 -
2017-07-10 19:45:15 +00:00
svenbarth
dffe423b10
* fix for Mantis #31945 : two fixes for nested routines inside generic methods
...
a) correctly determine whether token recording is required or not (nested routines of generic routines don't need it)
b) correctly determine whether the trailing ";" needs to be parsed (nested routines of generic routines need to)
git-svn-id: trunk@36469 -
2017-06-09 15:46:10 +00:00
svenbarth
eb9b4fb71f
* fix for Mantis #31973 : resolve dummy symbols earlier and print a nice error message if a generic dummy could not be resolved to an ordinary symbol
...
+ added test
* adjusted test tw9673 which should have never worked as is (what if TList would have been "of T" instead of "of byte"?)
git-svn-id: trunk@36468 -
2017-06-09 14:41:26 +00:00
pierre
abd765da40
Explicitly disable range and overflow checking for this test
...
git-svn-id: trunk@36465 -
2017-06-09 12:22:47 +00:00
maciej-izak
751bde9792
Revert revision 36436 from trunk. Final fix for issue #31675 .
...
git-svn-id: trunk@36446 -
2017-06-07 21:06:54 +00:00
maciej-izak
d3d29fa84c
Revert revisions 36133, 36128 from trunk.
...
git-svn-id: trunk@36436 -
2017-06-06 07:12:26 +00:00
pierre
c0fd038eaa
Start getmem calls with smaller memory chuncks for CPU16 like i8086
...
git-svn-id: trunk@36240 -
2017-05-18 08:47:03 +00:00
pierre
78361f5900
Fix test for msdos targets
...
git-svn-id: trunk@36229 -
2017-05-16 20:36:49 +00:00
svenbarth
c90fbe1bf0
* fix for Mantis #31795 : append a $ to internal functions init, finalize, init_implicit and finalize_implicit as their section names otherwise look the same as those of user declared functions with the same name
...
+ added test
git-svn-id: trunk@36194 -
2017-05-12 13:32:37 +00:00
svenbarth
23ec3db057
+ added test for Mantis #30498 which is working now that array constructors are supported :)
...
git-svn-id: trunk@36193 -
2017-05-12 12:57:49 +00:00
maciej-izak
6d1ad52dc5
* for symbols used in preprocessor expressions, we don't want to increase references count (for smaller final binaries). Partial fix for problem presented in mantis 31675. Preprocessor functions like declared() in uses section will work only for symbols declared in implicytly included modules (for example like for heaptrc by option -gh, see example/test tw31675.pp)
...
+ added tests
git-svn-id: trunk@36128 -
2017-05-05 22:27:07 +00:00
michael
dff39e9ecb
* Fix test case
...
git-svn-id: trunk@36060 -
2017-05-02 14:03:56 +00:00
florian
50dba9ad66
* if both labels of a case label are equal, we still cannot skip the comparison in a jump tree, resolves #31589
...
git-svn-id: trunk@35880 -
2017-04-21 19:32:27 +00:00
maciej-izak
ff28d5c85d
* Fix usage of class operators in generics types. If we have generic type declaration/implementation then constraint in comparison to not specialized generic is not "exact" nor "incompatible". Mantis #30534 .
...
git-svn-id: trunk@35740 -
2017-04-05 13:47:21 +00:00
maciej-izak
e4565378db
* Allow for "record constraint" in Delphi mode more types like: ordinal, float, classical objects, enumerations (instead of just record). Delphi compatibility. Fix for mantis #24073 .
...
git-svn-id: trunk@35739 -
2017-04-05 13:12:30 +00:00
svenbarth
34327000d8
+ add test for Mantis #31521 which is already fixed, though I don't know which revision did it...
...
git-svn-id: trunk@35656 -
2017-03-25 13:41:27 +00:00
florian
0cf5ef459d
+ tcgtypeconvnode.second_class_to_intf supports LOC_CONSTANT as well, resolves #31596
...
git-svn-id: trunk@35655 -
2017-03-25 10:27:29 +00:00
florian
ad557a1da6
* allow call dword ptr eax in delphi, resolves #18225
...
git-svn-id: trunk@35572 -
2017-03-12 16:37:48 +00:00
florian
bb8b8f2eae
* do not set IsMultithread on windows, if no second thread is started, resolves #30535
...
git-svn-id: trunk@35567 -
2017-03-11 21:35:48 +00:00
yury
4ec547301d
* Set both DefaultSystemCodePage in runtime and source file code page to 1252 in order the test perform correctly on all systems.
...
git-svn-id: trunk@35554 -
2017-03-09 20:37:16 +00:00
svenbarth
49e78ac5df
* test doesn't need to run
...
git-svn-id: trunk@35511 -
2017-03-03 21:50:06 +00:00
svenbarth
7dc4f16db3
* fix for Mantis #31431 : allow specializations to allow private/protected variables that their generic could have accessed
...
git-svn-id: trunk@35510 -
2017-03-03 21:45:29 +00:00
maciej-izak
16a11c8b7a
Bug fix for getting pointer to function result (mantis #10933 #19861 )
...
git-svn-id: trunk@35495 -
2017-03-01 13:23:02 +00:00
Jonas Maebe
1adde89621
* copy tcallnode.right after copying the callinitblock, as right can be a
...
temprefnode referring to a temp from the init block (mantis #31421 )
git-svn-id: trunk@35478 -
2017-02-24 19:57:40 +00:00
florian
b9dba41ad0
* intel assembler reader: scale factor in references can also be a constant symbol, resolves #31165
...
git-svn-id: trunk@35473 -
2017-02-22 20:59:52 +00:00
florian
3d6d5145bf
* fix handling of const string symbols in preprocessor expressions
...
+ accept string constants in preprocessor expressions, resolves #31246
git-svn-id: trunk@35432 -
2017-02-12 17:29:45 +00:00
florian
41b028ffc0
* unpcklp* require aligned memory, so do not spill replace their first operand by a memory location, resolves #31332
...
git-svn-id: trunk@35400 -
2017-02-05 20:59:54 +00:00
Jonas Maebe
6d5339cdb6
* CP819/IBM819 should be mapped to Windows code page 28591 (ISO8859-1)
...
(mantis #30639 )
git-svn-id: trunk@35397 -
2017-02-04 22:44:36 +00:00
svenbarth
11493de99b
+ add test from Mantis #31305 for completeness sake
...
git-svn-id: trunk@35377 -
2017-01-31 18:24:00 +00:00
Jonas Maebe
382bbc1201
- removed gotderef from valid_for_assign(), and return true at every place
...
where it used to be set to true (dereferencing a pointer always means
that regardless of what the pointer was, the resut is assignable)
(mantis #22979 )
o also removed gotpointer, since it was only used in combination with
gotderef
git-svn-id: trunk@35308 -
2017-01-15 16:32:51 +00:00
svenbarth
fd465ff500
* adjusted tests as SizeOf(TParamFlags) = 1 does not need to be true anymore
...
git-svn-id: trunk@35264 -
2017-01-08 12:43:59 +00:00
svenbarth
6b641394d0
* fix for Mantis #31201 : don't write any RTTI for undefined defs (and while we're at it abort if an error def is encountered)
...
+ added test
git-svn-id: trunk@35256 -
2017-01-07 14:35:25 +00:00
svenbarth
d34acf3bc7
* fix for Mantis #31120 : check current_genericdef only if the current_procinfo isn't used
...
+ added test
Note: the test is added to webtbs although it's right now still failing, cause I'll remove the restriction for nested procedures since the compiler now supports them correctly. Due to the way we handle generics we don't have problems with them unlike Delphi.
git-svn-id: trunk@35147 -
2016-12-17 21:20:44 +00:00
svenbarth
5fa181b5d9
* second fix for Mantis #31033 : also check for df_specialization instead of is_specialization for parameters to correctly handle nested types that aren't really true specializations themselves
...
+ added additional test
git-svn-id: trunk@35103 -
2016-12-10 19:47:09 +00:00
svenbarth
52673d34f1
* fix for Mantis #31033 : don't check for is_specialization(), but for df_specialization (this way we also get pointers or nested types that aren't by themselves real specializations)
...
+ added test
git-svn-id: trunk@35092 -
2016-12-09 16:22:14 +00:00
Jonas Maebe
18077d9530
* when determining the best candidates for overloaded method calls, apply
...
the scope penalty relative to the nearest symtable that contains one of
the applicable overloads, rather than relative to the nearest symtable
that simply contains a method with this name (based on patch by
Maciej Izak, mantis #25607 )
git-svn-id: trunk@35089 -
2016-12-09 13:39:42 +00:00
sergei
8173efff3e
* x86 asm reader: Don't copy operand size to instruction size for MOVSS and VMOVSS, because it is different for source and destination. Fixes breakage caused by fixing memory size of those instructions (Mantis #29954 and Mantis #29957 ).
...
+ Tests are extended to check that both OPR_LOCAL and OPR_REF memory operands compile without warnings as source and destination, in both Intel and AT&T syntax.
git-svn-id: trunk@35081 -
2016-12-07 14:08:28 +00:00
svenbarth
d499163ef5
* provisional fix for Mantis #31076 : fail gracefully instead of with an internal error if a generic method is declared inside a generic class or record. This will change once we support nested generics however.
...
* adjusted error message to reflect that we're not only dealing with generic classes
+ added test; note: it's added in webtbs, cause the test will loose its %FAIL attribute in the future
git-svn-id: trunk@35079 -
2016-12-06 22:26:53 +00:00
svenbarth
4fb77b71ec
* fix for Mantis #31029 , based on the patch provided by Silvio Clécio: PArrayOfByte is not necessary and in fact the purpose of TArrayOfByte is a different one from reference counting (namely to ensure correct passing of the parameter), so renamed accordingly (plus a comment); similar change in SetDynArrayProp. Also Get-/SetPropValue in Variants unit has been adjusted to make use of Get-/SetDynArrayProp.
...
+ added adjusted test
git-svn-id: trunk@35025 -
2016-11-30 19:32:41 +00:00
svenbarth
d9ea6aae4d
* fix for Mantis #30761 : always return the symbol found in the helper instead of doing this dependant on the presence of the overload attribute; for this the collection of all suitable overloads is done in tcallcandidates instead.
...
+ added test
git-svn-id: trunk@35024 -
2016-11-30 17:52:25 +00:00
svenbarth
6ba85c2a70
* second fix for Mantis #30626 : also search in parent classes for a suitable pre-existing specialization
...
+ added test
git-svn-id: trunk@35014 -
2016-11-29 17:04:07 +00:00
svenbarth
ebfeb5b62a
* fix for Mantis #30830 : also remove unregistered specializations from the procsym's deflist when they're removed to avoid an access to freed data
...
+ added tests (adjusted original test plus a mode Delphi variant)
git-svn-id: trunk@35012 -
2016-11-29 14:12:02 +00:00
svenbarth
bfaa26d16a
Commit r35010 also fixed Mantis #30524 .
...
+ added tests
git-svn-id: trunk@35011 -
2016-11-28 18:37:20 +00:00
svenbarth
a535d54bcb
* fix for Mantis #30939 : Rework generation of the generic name to be less relying on the type hierarchy as a specialization inside the parameter declaration would want to have the full name of the procdef including its parameters, but those are still parsed at that stage (the pretty name is still a topic onto itself however...)
...
+ added tests (original test was only mode fpc, test for mode delphi is added as well)
git-svn-id: trunk@35010 -
2016-11-28 18:16:49 +00:00
florian
48fbd569fd
* support for the CDQE instruction, by Emelyanov Roman, resolves #30978
...
git-svn-id: trunk@34982 -
2016-11-27 12:42:22 +00:00
sergei
8f4f40d240
* Disabled running the test, because it needs SSE4.1 capable CPU to run, and there is no portable way to detect it.
...
The purpose of test is compiling MOVSS instruction without warnings, so it still fulfills its task.
git-svn-id: trunk@34950 -
2016-11-22 10:35:41 +00:00
Jonas Maebe
acaae2bf3c
* fixed test so it does not use uninitialised floating point values (that
...
could trigger exceptions)
git-svn-id: trunk@34947 -
2016-11-21 07:39:17 +00:00
sergei
ebe134febc
* Fixed memory reference size for MOVSS instruction, Mantis #29954 .
...
git-svn-id: trunk@34943 -
2016-11-21 03:31:25 +00:00
Jonas Maebe
a89a4d905f
+ test for already fixed mantis #30948
...
git-svn-id: trunk@34928 -
2016-11-20 11:44:25 +00:00
sergei
edf943a4f6
* Changed memory operand size for VMOVSS instruction to 32 bits, Mantis #29957 .
...
git-svn-id: trunk@34918 -
2016-11-18 23:37:01 +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
svenbarth
63b0024e4c
* fix for Mantis #30626 : unset current_procinfo so that further specializations don't use a symtable to specialize themselves in that they shouldn't use (cause current_procinfo takes precedence)
...
git-svn-id: trunk@34916 -
2016-11-18 16:17:09 +00:00
svenbarth
0e7a9ad375
* partial fix for Mantis #30831 (partial, because no exception has been encountered yet): when checking whether the left node of a vmtaddrnode is a generic, don't rely on df_generic, but instead use is_generic which checks for a true generic (the other will also be true if it's merely a structured type declared (or specialized) inside another generic)
...
+ added test
git-svn-id: trunk@34915 -
2016-11-18 14:43:45 +00:00
svenbarth
fc5ce63134
* fix for Mantis #30832 : instead of checking a procdef's struct for df_generic check the procdef itself, this way global generic methods or generic methods that are part of non-generic classes or records are caught as well.
...
+ added test
git-svn-id: trunk@34914 -
2016-11-18 14:01:03 +00:00
florian
67570a6262
+ patch to support assigning class procedures to procedure variables by Ondrej Pokorny, resolves #30936
...
+ additional tests
git-svn-id: trunk@34909 -
2016-11-17 19:40:42 +00:00
pierre
a4f361ad50
Fix error in header line used by dotest, use %target instead of %os
...
git-svn-id: trunk@34906 -
2016-11-16 09:29:21 +00:00
florian
3f072b3e29
* workaround for issue #30348 , FPC allowes now 65535 sections in coff object files, but as the section index is normally signed, this is only a dirty workaround
...
git-svn-id: trunk@34904 -
2016-11-15 22:06:00 +00:00
sergei
b4904deea8
* MIPS: Fixed code generation for PIC global symbols with large offset, resolves #30552 .
...
git-svn-id: trunk@34902 -
2016-11-15 20:04:27 +00:00
florian
6d6a45c034
* add/sub nodes with nf_internal set should not do overflow checking, resolves #30889
...
* do not convert succ/pred into add/sub nodes if nf_internal is set
git-svn-id: trunk@34896 -
2016-11-13 21:18:39 +00:00
florian
9bff3ac624
* copy also pushedparasize when copying call nodes, resolves #30923
...
git-svn-id: trunk@34885 -
2016-11-13 14:46:55 +00:00
florian
96858dd64d
+ additional tests which ensure that constant propagation is off
...
as the compiler optimizes the original tests too much with constant propagation
to keep them useful
git-svn-id: trunk@34796 -
2016-11-05 23:05:57 +00:00
florian
8bbd2e4030
+ test for issue #27744
...
git-svn-id: trunk@34790 -
2016-11-05 23:05:46 +00:00
svenbarth
d4e573c1e3
* fix for Mantis #27349 : nested classes might also reside inside records
...
+ added test
git-svn-id: trunk@34714 -
2016-10-13 20:40:47 +00:00
Jonas Maebe
5efb32285a
* fixed alignment for interface RTTI (patch by Alfred, mantis #30182 )
...
git-svn-id: trunk@34695 -
2016-10-09 12:34:01 +00:00
Jonas Maebe
233622157c
* don't attempt to load the VMT of a niln when taking the address of a
...
class method (mantis #30706 )
git-svn-id: trunk@34641 -
2016-10-07 16:41:32 +00:00
Jonas Maebe
a3afefc6cb
+ test for mantis #27522 (fixed in r29811)
...
git-svn-id: trunk@34601 -
2016-10-02 21:51:31 +00:00
Jonas Maebe
868370d727
+ InterlockedCompareExchangePointer() alias for InterlockedCompareExchange(pointer)
...
(mantis #29964 )
git-svn-id: trunk@34599 -
2016-10-02 12:57:07 +00:00
Jonas Maebe
94d7a7274b
* compare floating point default parameter values bytewise instead of as
...
floating point values, so that NaNs can also be compared (mantis #30299 )
git-svn-id: trunk@34597 -
2016-10-02 12:56:49 +00:00
Jonas Maebe
de60bfab9c
* make the string data of pchar constants read-only (mantis #30666 )
...
git-svn-id: trunk@34594 -
2016-10-02 12:56:40 +00:00
Jonas Maebe
ec53fdf45a
* don't try to write using standard I/O from a thread while the program is
...
shutting down, that can fail
o the test will still fail because the tthread shutdown code itself in
the classes unit cannot handle running while a program is quitting,
and that should be fixed (exposed by r34456)
git-svn-id: trunk@34554 -
2016-09-22 07:50:08 +00:00
svenbarth
ce18b10c81
* fix for Mantis #30530 : when the global/static symtable is reached defowner is Nil, so respect that in the loop condition
...
+ added test
git-svn-id: trunk@34532 -
2016-09-16 15:39:03 +00:00
svenbarth
50f2aab0ef
* fix for Mantis #22192 : handle the case that a specialization has the same name as the generic it's based on as in that case the typedef of the symbol is an errordef; therefor we need to use the symbol's real name
...
+ added test
git-svn-id: trunk@34530 -
2016-09-16 15:13:27 +00:00
svenbarth
2ea587f746
* fix for Mantis #30537 : also allow the parasymtable as a parent symtable when generating the mangled name as that is needed for generic functions
...
+ added test
git-svn-id: trunk@34527 -
2016-09-16 14:10:53 +00:00
svenbarth
0500c678e5
* fix for Mantis #30534 : don't consider all types with generic constraints as equal, but at least ensure that they have the same basetype (Note: this still needs a bit more improvement)
...
+ added test
git-svn-id: trunk@34526 -
2016-09-16 13:24:28 +00:00
Jonas Maebe
98020a9b57
* fixed test compilation
...
git-svn-id: trunk@34508 -
2016-09-11 09:42:15 +00:00
Jonas Maebe
d19bf787a0
* added -gh option required to test correctness
...
git-svn-id: trunk@34491 -
2016-09-10 18:28:10 +00:00
michael
e3076da0a1
* Testcase for bug #30310
...
git-svn-id: trunk@34488 -
2016-09-10 18:07:07 +00:00
Jonas Maebe
1e506ce1d5
* call beforedestruction if an exception happens in afterconstruction
...
(mantis #30570 )
git-svn-id: trunk@34453 -
2016-09-08 14:18:59 +00:00
Jonas Maebe
5ffd06392d
* don't optimize "x:=f(x)" whereby the function result of f() is passed
...
by reference in case x is a temp (mantis #30572 )
git-svn-id: trunk@34445 -
2016-09-07 19:37:35 +00:00
Jonas Maebe
f64556c125
* when taking the address of a class method via an instance, create a procvar
...
with the VMT of the instance as self instead of the self instance pointer
(mantis #29491 )
git-svn-id: trunk@34395 -
2016-08-30 07:25:16 +00:00
Jonas Maebe
3669419bb3
* fixed tcasenode.simplify() in case we have to pass via a "less" branch of
...
of a tcaselabel that also has a valid "greater" branch to arrive at the
correct entry (mantis #30522 )
git-svn-id: trunk@34379 -
2016-08-26 13:02:10 +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
20cbdf75ea
+ test for mantis #24189 (already works in trunk, still broken in 3.0)
...
git-svn-id: trunk@34290 -
2016-08-12 13:40:19 +00:00
Jonas Maebe
8e0ee6599c
* store parameters to inline routines that are already in a temp into a new
...
temp if the original temp was marked as ti_const, and the new parameter
gets modified (mantis #30015 )
git-svn-id: trunk@34289 -
2016-08-12 13:35:56 +00:00
Jonas Maebe
b17f90d183
* test for mantis #26402 (already fixed in 3.1.1, still broken in 3.0)
...
git-svn-id: trunk@34282 -
2016-08-12 13:35:37 +00:00
Jonas Maebe
c752050728
* don't print "parameter not used" hints for abstract methods (mantis #30431 )
...
git-svn-id: trunk@34281 -
2016-08-12 13:35:34 +00:00
pierre
5abbe42115
Add fpwidestring and unicodeducet units for go32v2 OS for wide string tests
...
git-svn-id: trunk@34259 -
2016-08-10 06:24:20 +00:00
Jonas Maebe
de97285393
* fixed conformsToProtocol() declaration (the protocol is not a changeable
...
parameter, and it's already declared as a pointer type)
git-svn-id: trunk@34246 -
2016-08-03 14:35:32 +00:00
svenbarth
685f820622
* switch class'/object's parent reference in the VMT to an indirect reference
...
(this also requires the adjustment of a test)
git-svn-id: trunk@34172 -
2016-07-22 12:53:51 +00:00
pierre
1e58b6d944
Use %skiptarget=$nothread for tests using thread capabilities
...
git-svn-id: trunk@34105 -
2016-07-13 15:21:23 +00:00
pierre
2b3ef31505
Correct previous commit: %skiptarget needs equal sign
...
git-svn-id: trunk@34104 -
2016-07-13 15:20:31 +00:00
pierre
f8cdabfadb
Skip test tw3157 for go32v2 target as it genrates problems on ntvdm.exe under windows
...
git-svn-id: trunk@34100 -
2016-07-12 14:43:06 +00:00
svenbarth
54b6cacf36
Fix for Mantis #30357 .
...
Reset tstoredsymtable.init_final_check_done when a symbol is added or removed as otherwise property getters in a record *before* any managed field would trigger it, thus leading to the record being considered as "non-managed".
git-svn-id: trunk@34088 -
2016-07-08 18:20:47 +00:00
pierre
c8b1ca59d5
Fix test for compact and medium i8086 memory model
...
git-svn-id: trunk@34071 -
2016-07-05 22:11:28 +00:00
Károly Balogh
0e54f616b5
merged i386 int64 mod helper fix by Max Nazhalov (Mantis 30240)
...
git-svn-id: trunk@34059 -
2016-07-03 21:20:07 +00:00
Jonas Maebe
db77aad2cc
* support LOC_MMREGISTER for paralocs when loading 128 bit function results
...
into integer registers (a record that consists of 4 32 bit floats is
returned in 2 xmm registers on x86_64) (mantis #30329 )
git-svn-id: trunk@34058 -
2016-07-03 21:18:23 +00:00
Jonas Maebe
8df1d1f9b8
* fixed compilation of tw15391 with range checking enabled after r34034:
...
support maybe_call_procvar() on internal block nodes, which return
their result via the last statement
git-svn-id: trunk@34051 -
2016-07-02 21:09:59 +00:00
Jonas Maebe
996e325175
* converted range checking for open arrays/array of const from the code
...
generator to the typecheck pass, so that it also works for platforms
that use the parentfpstruct way to handle accesses to nested frames
in case the array has been migrated to such a parentfpstruct
o additionally, the number of comparisons for such range checks
has been reduced from 3 (for signed indices) or 2 (for unsigned
indices) to 1 in all cases
o the range checking code is disabled for the JVM target, as the
JVM automatically range checks all array accesses itself anyway
git-svn-id: trunk@34034 -
2016-06-30 15:33:47 +00:00
pierre
544d33bf48
Range and overflow check explicitly disabled
...
git-svn-id: trunk@34013 -
2016-06-21 08:18:22 +00:00
pierre
40292a476f
Expicitly disable range check on old test and add new test with and changes
...
git-svn-id: trunk@34012 -
2016-06-21 08:14:43 +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
Jonas Maebe
0ed6c3d80e
* also use the last floating point parameter register on AArch64 in case of
...
a HFA type (which in practice also applies to plain floating point types)
(patch by Alfred, mantis #30207 )
git-svn-id: trunk@33922 -
2016-06-05 20:18:24 +00:00
florian
49f63d67b2
* correctly check left.location instead of left.expectloc when generating
...
code for not nodes, resolves #30208
git-svn-id: trunk@33906 -
2016-06-04 15:54:17 +00:00
svenbarth
8c96fbed8f
Fix for Mantis #28832
...
ninl.pas, tinlinenode:
* pass_typecheck: let code pass on to simplify() for undefineddefs in Low() and High()
* simplify: create a constant 0 as fallback
+ added test
git-svn-id: trunk@33884 -
2016-06-03 12:14:30 +00:00
svenbarth
04adcf2a12
Fix for Mantis #30179 and #30203 .
...
pexpr.pas:
* handle_factor_typenode: rework code for records and objects so that Delphi style specializations are handled as well
* sub_expr.generate_inline_specialization: also do a typecheck pass on pload to be sure that we have a resultdef
+ added tests
git-svn-id: trunk@33876 -
2016-06-01 20:06:40 +00:00
svenbarth
c3c345d569
Fix for Mantis #30202 .
...
pexpr.pas, sub_expr.generate_inline_specialization:
* do_member_read() needs to happen independently of whether we're calling a method of the same object (was incorrectly copypasted code... :/ )
+ added test
git-svn-id: trunk@33875 -
2016-06-01 20:03:59 +00:00
florian
57f93ed40d
* correctly generate accesses to jump tables if it contains negative entries, resolves issue #30119
...
git-svn-id: trunk@33760 -
2016-05-22 21:02:49 +00:00
Károly Balogh
963c4aa1f8
* fixed the sign handling of i386 fpc_div_int64 helper (Mantis 30166)
...
git-svn-id: trunk@33753 -
2016-05-22 16:57:30 +00:00
Jonas Maebe
14bab6c85d
* fixed ppc jump table generation in case a jump table has cases for the
...
lowest and highest element of the type of the case expression, and the
lowest element <> 0 (mantis #29906 )
git-svn-id: trunk@33630 -
2016-05-03 09:00:52 +00:00
Jonas Maebe
eabcabe329
* fixed test in case a widestringmanager is installed
...
git-svn-id: trunk@33611 -
2016-05-02 08:23:14 +00:00
Jonas Maebe
2bbab60c92
* when simplifying a constant string concatenation that gets assigned to a
...
rawbytestring, ensure the resulting constant string does not get CP_NONE
as codepage, but the default system code page (mantis #30082 )
git-svn-id: trunk@33597 -
2016-05-01 13:16:02 +00:00
Jonas Maebe
130d9fee91
* don't take the address of element 0 of a dynamic array in
...
tcallparanode.copy_value_by_ref_para() if the array is empty
(mantis #30007 )
git-svn-id: trunk@33595 -
2016-05-01 12:35:09 +00:00
Jonas Maebe
44682f9f4d
* ensure that if we create a temp for the funcretnode in a call node,
...
the funcretnode field keeps a reference to this temp even after we
assign it to the call-by-reference return parameter if it is deleted
by changing it into a normal temp (after which it will be freed when
the result of the call node is used), because in that case getcopy
for the callnode must copy this reference after copying the
tempdeletenode in order to reset tempinfo^.hookoncopy (mantis #29891 )
git-svn-id: trunk@33569 -
2016-04-28 20:33:12 +00:00
svenbarth
d07b49270f
Fix for Mantis #30030 .
...
pgenutil.pas:
* parse_generic_specialization_types_internal: ignore the parasymtable of procvars (as before the addition of generic routines) and instead use the type's hierarchy name
* generate_specialization_phase2: specialize types of procvars into the parameter symtable as they don't have a local one
+ added test
git-svn-id: trunk@33544 -
2016-04-22 13:07:48 +00:00
Jonas Maebe
1850cb4ccc
* don't look at the resultdef, but at the defs of the operands to decide
...
whether a multiplication needs to be signed or unsigned (can be different
in case of a 32x32->64 multiplication) (mantis #30035 )
git-svn-id: trunk@33539 -
2016-04-20 22:17:15 +00:00
Jonas Maebe
2a1f2b9fd9
* fixed a_load_regconst_subsetreg_intern() when loading a 32 bit register
...
to a non-zero bit offset in a subsetreg (mantis #29933 )
git-svn-id: trunk@33498 -
2016-04-13 17:09:31 +00:00
Jonas Maebe
08d63e3408
* allow default parameters for constref (mantis #29992 )
...
git-svn-id: trunk@33480 -
2016-04-10 21:27:29 +00:00
florian
406e3c4ac1
+ support xgetbv instruction, resolves issue #29958
...
git-svn-id: trunk@33418 -
2016-04-03 20:53:10 +00:00
Jonas Maebe
1e1b36515e
* don't narrow expressions that contain a mod/div followed by an "and",
...
since the mod/div get a different result if calculated using fewer
bits (mantis #29930 )
git-svn-id: trunk@33413 -
2016-04-02 22:09:34 +00:00
Jonas Maebe
a5dba44fd3
* fixed sign extension for unaligned loads (mantis #29891 , although that
...
code shouldn't use unaligned loads in the first place)
git-svn-id: trunk@33382 -
2016-03-29 14:52:27 +00:00
Jonas Maebe
322493c195
* fixed overflow checking on AArch64 for signed multiplications with zero
...
(mantis #29912 )
git-svn-id: trunk@33380 -
2016-03-29 09:50:42 +00:00
florian
8d5cc3dfa4
* (extended and modified) patch by Emelyanov Roman to add suport of RDRAND, RDSEED and TSX instructions set, resolves issue #29893 .
...
In comparison with the original patch, support for a i386 has been added as well as a test program.
Further, a small issue with xbegin has been fixed
git-svn-id: trunk@33375 -
2016-03-28 19:08:13 +00:00
yury
d4d70d3865
* Evaluate currency constant expressions when the currency type is 64-bit integer. Issue #28749 .
...
git-svn-id: trunk@33334 -
2016-03-26 17:48:50 +00:00
yury
d7cc0064d3
* Disabled test for android.
...
git-svn-id: trunk@33304 -
2016-03-20 22:09:45 +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
svenbarth
e9fab1bfee
Fix for Mantis #29080 .
...
psub.pas, tcgprocinfo.parse_body:
* ensure that parse_generic and current_genericdef are set correctly when parsing a generic routine
pgenutil.pas, generate_specialization_phase2:
* when we're specializing inside a generic we don't want to have the routine definitions, so let the compiler assume that the routine is no longer a forward definition
+ added test
git-svn-id: trunk@33275 -
2016-03-18 16:31:23 +00:00
florian
bb1f2b8062
* make NativeInt and NativeUInt unique types, resolves #29444
...
git-svn-id: trunk@33234 -
2016-03-13 15:30:38 +00:00
svenbarth
27ab1c61c5
Fix for Mantis #29745 .
...
symdef.pas, getansistringdef:
* use a temporary, non-defaware symtablestack to create the ansistringdef
+ added test
git-svn-id: trunk@33214 -
2016-03-10 19:43:45 +00:00
svenbarth
e58488dc3e
Fix for Mantis #29792 .
...
htypechk.pas, tcallcandidates:
* create_candidate_list: check the correct tableoptions for sto_has_overload flag
+ added test
git-svn-id: trunk@33211 -
2016-03-09 20:45:26 +00:00
Jonas Maebe
c93e8a51cd
* fixed test result after r33201
...
git-svn-id: trunk@33204 -
2016-03-07 19:59:05 +00:00
Jonas Maebe
70cd8f6e59
- removed overflow, so the test also works with constant propagation and -Co
...
git-svn-id: trunk@33201 -
2016-03-07 14:40:52 +00:00
Jonas Maebe
0e97811b50
+ initialise managed string function results with an error string when
...
compiling with -gt (mantis #28948 )
git-svn-id: trunk@33198 -
2016-03-06 17:22:11 +00:00
Jonas Maebe
315b32918e
+ Tconstexprint-version of ispowerof2() to correctly deal with constants
...
> high(int64) (mantis #29620 )
git-svn-id: trunk@33191 -
2016-03-06 14:16:47 +00:00
Jonas Maebe
096e1c45d6
* don't keep records in registers if they contain a field that spans the
...
boundary between two awords, as our subscript code does not handle
them correctly (second part of mantis #29669 )
git-svn-id: trunk@33180 -
2016-03-06 13:20:25 +00:00
Jonas Maebe
9788bb1316
* fixed check regarding whether a field is in the first or second word of
...
of 2*sizeof(aword) bitpacked record that's kept in registers
(mantis #29669 )
git-svn-id: trunk@33177 -
2016-03-06 13:20:16 +00:00
Jonas Maebe
4039c1835c
+ test from mantis #29547 , fixed in r30168 as mantis #27580
...
git-svn-id: trunk@33164 -
2016-03-05 19:01:47 +00:00
Jonas Maebe
a100309350
* made utf8tostring() Delphi-compatible (mantis #29585 ):
...
o removed utf8string overload
o always ignore any code page information from the input, and interpret the
contents of the input directly as utf8-encoded bytes
* made utf8tostring() compatible with the JVM backend (mantis #29497 )
git-svn-id: trunk@33159 -
2016-03-05 15:32:22 +00:00
svenbarth
25744dd3f1
Fix for Mantis #29609 .
...
pexpr.pas, factor.factor_read_id:
* don't use a cloadvmtaddrnode for accessing class properties in records
+ added test
git-svn-id: trunk@33110 -
2016-02-19 21:37:02 +00:00
Jonas Maebe
f3df3a7a67
+ test for mantis #28668
...
git-svn-id: trunk@33104 -
2016-02-18 22:03:46 +00:00
Jonas Maebe
001417bb47
+ test from mantis #28667
...
git-svn-id: trunk@33103 -
2016-02-18 21:58:34 +00:00
sergei
2861362780
* Reuse binary search routine from rgbase.pas to look up AT&T register names, removes need in regnumber_count_bsstart constant. Resolves #29471 .
...
git-svn-id: trunk@33076 -
2016-02-09 16:48:32 +00:00
svenbarth
05174f3e67
Fix for Mantis #29546 .
...
htypechk.pas, tcallcandidates:
* create_candidate_list: don't check whether the pd is a specialization if the owner is valid; happens if a generic method is used more than once (which should happen here and then :P )
+ added test
git-svn-id: trunk@33037 -
2016-01-31 17:14:44 +00:00
svenbarth
d2a7f17d8c
Fix for Mantis #29372 .
...
compiler/ncgcal.pas:
* tchcallnode.release_para_temps: don't release temps of a constructor's self parameter
+ added test
git-svn-id: trunk@32990 -
2016-01-23 22:19:00 +00:00
Jonas Maebe
a65ab73e8b
* support unicodestring constants in "case string of" (mantis #29353 )
...
git-svn-id: trunk@32970 -
2016-01-20 21:11:26 +00:00
svenbarth
82788b4995
tw20821.pp:
...
* test program attached to the bug report was incorrectly transformed to a test for the test suite
git-svn-id: trunk@32962 -
2016-01-17 12:14:54 +00:00
florian
df82921cd8
* fix test after r32820
...
git-svn-id: trunk@32855 -
2016-01-05 13:46:06 +00:00
florian
a4d2f71d3d
* better estimation of compatibility of array constructors with open arrays, resolves issue #29244
...
git-svn-id: trunk@32846 -
2016-01-04 23:10:45 +00:00
svenbarth
61b12af82b
Fix for Mantis #29321 .
...
pexpr.pas, postfixoperators:
* also handle type helpers for static arrays
+ added test
git-svn-id: trunk@32845 -
2016-01-04 22:02:24 +00:00
florian
a7f1ce2e98
* patch by Dmitry Boyarintsev: initialize dyn. arrays more cleverly in a setlength call with ref. count>1, resolves issue #29250
...
git-svn-id: trunk@32721 -
2015-12-26 08:53:56 +00:00
Jonas Maebe
0df558af36
* disabled pic
...
* mark eax as used in assembler block in main program
git-svn-id: trunk@32689 -
2015-12-20 20:56:13 +00:00
Jonas Maebe
b4e857e9c4
* skip for darwin because it always requires/expects a 16 byte aligned stack
...
* mark ebx as modified in the assembler blocks
git-svn-id: trunk@32688 -
2015-12-20 20:56:11 +00:00
sergei
272e3db1db
* Fixed test on x86_64 ('nostackframe' modifier ensures that no prologue/epilogue code is added on fixed-stack targets).
...
git-svn-id: trunk@32673 -
2015-12-16 16:46:23 +00:00
sergei
31623565cb
* Skip test for Win64, since *nix-style PIC is not supported on that system.
...
git-svn-id: trunk@32672 -
2015-12-16 16:37:41 +00:00
florian
a3964d9ee0
+ support for RDTSCP, resolves issue #28916
...
git-svn-id: trunk@32652 -
2015-12-13 13:28:51 +00:00
Jonas Maebe
092a0af0ec
* removed special-purpose code for constant chars while parsing typed string
...
constants: it did not properly handle ansistring code pages, and was just a
hack to speed things up a bit (mantis #29153 )
git-svn-id: trunk@32636 -
2015-12-11 15:33:28 +00:00
Jonas Maebe
ed03286be5
* simplify "div -1" to unaryminusn, not just for performance reasons but
...
also because "div -1" is not handled correctly by the div-to-mul/shift
transformation on x86 (mantis #28702 )
git-svn-id: trunk@32619 -
2015-12-08 15:57:07 +00:00
Jonas Maebe
0b4f3f01b3
* fixed another case of endless recursion in
...
tabstractrecordsymtable.has_single_field(), due to always looking in the
symlist of the original record rather than properly recursing into those
of nested ones (mantis #28641 )
git-svn-id: trunk@32618 -
2015-12-08 15:35:19 +00:00
Jonas Maebe
01d93b61c3
* save/restore the type (and hence code page) of ansistring constsyms in/from
...
the ppu (mantis #28964 )
* also save/restore the type of constnil, constresourcestring and constguid
in/from the ppu
git-svn-id: trunk@32617 -
2015-12-08 14:27:23 +00:00
florian
19a7bc0aee
* fix test for 64 bit targets
...
git-svn-id: trunk@32613 -
2015-12-07 21:48:19 +00:00
florian
cad29a4e19
* set nf_write flag correctly for subscript nodes, resolves issue #28713
...
git-svn-id: trunk@32602 -
2015-12-06 19:17:50 +00:00
Jonas Maebe
03067f240c
+ added already working test for mantis #27149
...
git-svn-id: trunk@32577 -
2015-12-04 14:00:37 +00:00
Jonas Maebe
2e0fea94b8
* set operand size information when accessing fields in assembly
...
(mantis #29096 )
git-svn-id: trunk@32567 -
2015-12-02 15:53:22 +00:00
Jonas Maebe
0c4edd2aa9
* fixed getting address of interface methods after r32414: interfaces are not
...
a pointer to a vmt, but a pointer to a pointer to vmt (mantis #29086 )
o also adjusted the llvm type for interfaces accordingly
git-svn-id: trunk@32530 -
2015-11-25 19:28:17 +00:00
Jonas Maebe
9ea38f4577
* support static fields in nested types in records, by always including
...
support for nested types when generating an access to a static fied;
we also always do that when generating the mangled name of a static
field declaration in symcreat.make_field_static() (mantis #29030 )
git-svn-id: trunk@32517 -
2015-11-24 16:04:19 +00:00
Jonas Maebe
9dc5f1acb4
* support LOC_(C)SUBSETREG in tcgvecnode.pass_generate_code, can also occur
...
for function results (patch by Do-wan Kim, mantis #29064 )
git-svn-id: trunk@32516 -
2015-11-24 15:03:34 +00:00
svenbarth
6ff3226e3c
Fix for Mantis #29066 .
...
git-svn-id: trunk@32459 -
2015-11-22 11:17:15 +00:00
svenbarth
318b69600c
Fix for Mantis #29065 .
...
+ add an ObjFPC variant of the test for 29053.
git-svn-id: trunk@32453 -
2015-11-22 10:44:03 +00:00
nickysn
79336c59de
* fixed test for PIC code on i386
...
git-svn-id: trunk@32434 -
2015-11-21 15:02:04 +00:00
svenbarth
fcae436177
Add test for Mantis #29053 to make sure it doesn't get broken by accident.
...
git-svn-id: trunk@32432 -
2015-11-21 14:35:35 +00:00
nickysn
82eb67cd24
* fixed test for PIC code on x86_64
...
git-svn-id: trunk@32431 -
2015-11-21 14:34:28 +00:00
nickysn
ba66456bdb
* properly determine the operand size for inline assembler references to procvar
...
variables without a manually specified size override such as 'dword ptr'.
Mantis #29010 .
git-svn-id: trunk@32379 -
2015-11-20 16:29:40 +00:00
Jonas Maebe
fd0c2f36e5
* don't parse "flags" as a register name in the Intel assembler reader
...
(mantis #29040 )
git-svn-id: trunk@32368 -
2015-11-19 19:40:06 +00:00
Jonas Maebe
f004227d91
* ignore the name of class con- and destructors (patch by Ondrej Pokorny,
...
mantis #28801 )
git-svn-id: trunk@32223 -
2015-11-03 18:10:08 +00:00
Jonas Maebe
8087389f63
* support assigning static methods to regular procvars in (obj)fpc mode
...
(patch by Ondrej Pokorny, mantis #27414 )
git-svn-id: trunk@32216 -
2015-11-01 18:02:46 +00:00
Jonas Maebe
4decb81ac4
* correctly handle code page names specified in upper case (mantis #28934 )
...
git-svn-id: trunk@32202 -
2015-10-30 15:10:26 +00:00
sergei
be6bcb71dc
* Fixed test on 64-bit targets, was always using i386 code due to incorrect CPU selection symbol (must be "cpux86_64", not "x86_64").
...
git-svn-id: trunk@32087 -
2015-10-18 10:02:21 +00:00
Jonas Maebe
1294dc1ede
* when inserting a non-empty ansistring into an empty ansistring, the
...
destination must get the code page of the source (mantis #28850 )
git-svn-id: trunk@32066 -
2015-10-16 19:15:40 +00:00
yury
9431648b6c
* Fixed conversion from float to currency when the currency type is 64-bit integer. Issue #28748 .
...
git-svn-id: trunk@32054 -
2015-10-13 22:30:46 +00:00
svenbarth
d4635f10df
Remaining fix for Mantis #28674 .
...
ptype.pas, resolve_forward_types:
* in case of the def of the forward being the same as the genericdef of the def the forwarddef belongs to the typesym needs to be changed to the one of the specialization
tests/webtbs/tw28674.pp:
* adjusted text
git-svn-id: trunk@31987 -
2015-10-09 13:18:35 +00:00
svenbarth
3afc18f277
Fix for Mantis #28766 .
...
ncgrtti.pas, write_persistent_type_info:
* do not generate RTTI information for generics
git-svn-id: trunk@31911 -
2015-10-02 13:06:51 +00:00
svenbarth
c25e7491e7
Fix for Mantis #28674 .
...
ptype.pas, resolve_forward_types:
* fix an access violation in case of inline pointer declarations
* fix the check whether it's a valid use of a generic (parse_generic is useless here...)
+ added test
git-svn-id: trunk@31910 -
2015-10-02 12:46:13 +00:00
Jonas Maebe
2cf8e50771
* fixed unwanted disabling of a codepage set via -FcXXX/{$codepage XXX}
...
when {$modeswitch systemcodepage} gets disabled without having been
enabled first (such as when initially setting the syntax mode)
(mantis #28718 )
git-svn-id: trunk@31831 -
2015-09-25 18:31:58 +00:00
yury
34efa0e9a9
* Skip tests for android since they must be run locally.
...
git-svn-id: trunk@31727 -
2015-09-16 18:22:00 +00:00
yury
95aa8cf453
* delete test file.
...
git-svn-id: trunk@31726 -
2015-09-16 18:19:57 +00:00
Jonas Maebe
6ffd8f0201
* finalize managed data passed to untyped "out" parameters after r31328
...
(mantis #2863 )
git-svn-id: trunk@31624 -
2015-09-12 23:31:57 +00:00
svenbarth
2cf8cdd885
Fix for Mantis #28650 .
...
rtl/objpas/sysutils/sysstrh.inc:
* forward PString to ObjPas.PString to avoid potential type conflicts
+ added test
git-svn-id: trunk@31603 -
2015-09-11 15:38:59 +00:00
Jonas Maebe
85403876cd
* fixed UCS4Decode() for #$ffff (patch by Inoussa OUEDRAOGO, mantis #28593 )
...
git-svn-id: trunk@31480 -
2015-09-02 12:10:45 +00:00
svenbarth
66781b5526
Fix for Mantis #28530 .
...
ptype.pas:
* record_dec: if parse_generic is given set current_genericdef
+ added test
git-svn-id: trunk@31437 -
2015-08-28 15:46:18 +00:00
marco
70df08d5be
* patch from #28557 by Oliver, correct libroot for Haiku
...
git-svn-id: trunk@31361 -
2015-08-22 12:21:46 +00:00
Jonas Maebe
e06181749c
* guarantee the order of parameter pushes again after r31201 on platforms
...
that don't use a fixed stack (mantis #28454 )
o moved the code to finalise managed out parameters from ncgcal to ncal,
and add it to the init code of the call node (so it's evaluated before
any parameters are processed, ensuring that mantis #28390 stays fixed)
git-svn-id: trunk@31328 -
2015-08-16 12:47:09 +00:00
svenbarth
39016c032e
Fix for Mantis #28442 . Do not generate the VMT record definition for generic classes. It isn't used anyway.
...
nobj.pas, TVMTBuilder:
* generate_vmt_def: check for df_generic (not is_generic!) and abort if set
+ added test
git-svn-id: trunk@31301 -
2015-08-07 15:02:55 +00:00
florian
9a55e8fa3c
* do not call typecheckpass unncessarily in generic definitions, it might cause only errors, resolves #28058
...
git-svn-id: trunk@31262 -
2015-08-02 20:29:30 +00:00
Jonas Maebe
9118146bc1
* ensure that managed out-parameters are processed before any other
...
parameters:
1) since they are finalised on the caller side, if that same value
is passed as a value parameter as well and its reference count
was 1, then the value parameter will contain an invalid pointer
2) since finalisation involves a call, for optimal code generation
purposes they should also be evaluated first
(mantis #28279 , #28390 )
git-svn-id: trunk@31201 -
2015-07-10 22:04:35 +00:00
Jonas Maebe
af2c7bf00f
* don't perform CSE on typeconversion nodes inserted for absolute
...
references, or anything below them (mantis #27210 )
git-svn-id: trunk@31193 -
2015-07-04 22:28:31 +00:00