Commit Graph

6595 Commits

Author SHA1 Message Date
svenbarth
5532ac3355 * fix test
git-svn-id: trunk@42372 -
2019-07-12 22:05:58 +00:00
svenbarth
e060a43d70 * rename TAttributeData to the more appropriate TAttributeTable
git-svn-id: trunk@42371 -
2019-07-12 22:05:55 +00:00
svenbarth
38fad4b5cf * also check for invalid attribute data in tests
git-svn-id: trunk@42364 -
2019-07-12 22:05:25 +00:00
svenbarth
24c4b90343 * instead of declaring another type with a 'attribute' suffix, *search* for another type with a 'ATTRIBUTE' suffix (Delphi allows declaring both a TFoo and TFooAttribute in the same unit)
+ added test

git-svn-id: trunk@42362 -
2019-07-12 22:05:18 +00:00
svenbarth
869664c6da * rename custom attributes related tests to something more sensible
git-svn-id: trunk@42361 -
2019-07-12 22:05:12 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
svenbarth
1607e15e48 * ensure that the toString constant is used instead of TObject's ToString method
git-svn-id: trunk@42352 -
2019-07-12 16:25:30 +00:00
Jonas Maebe
40082100e1 * fixed range test optimization for signed types and enabled it for them
git-svn-id: trunk@42332 -
2019-07-06 09:57:32 +00:00
svenbarth
433f07c407 * forgot to commit tests in r42329
git-svn-id: trunk@42330 -
2019-07-05 15:30:53 +00:00
svenbarth
d0eddbcbb9 * fix for Mantis #35735: also handle "generic" keyword inside helper types
+ added test

git-svn-id: trunk@42328 -
2019-07-05 14:12:13 +00:00
Jonas Maebe
c038e4c3f2 * relaxation of r42272: again only show warnings rather than errors for
out-of-range constants, because of the comments mentioned in #35753
    (except for enums, as apparently Delphi does the same)
  * added range check warnings about explicit type casts that throw away
    bits (e.g. byte($fff)), without giving warnings for most common cases
    (like cardinal(-1))
  * fixed masking/sign exting constant array indices (must be based on index
    range type size/signedness rather than on array size/"signedness")

git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
Jonas Maebe
3a2fe24f49 * report range errors for assigning out-of-range constants to enums in
Delphi mode (mantis #35671)
  * always give an error (rather than only a warning in case range checking
    is disabled) when assigning an out-of-range constant to an ordinal variable
    whose type does not span the entire range that its bits can hold (because
    the result is undefined and FPC's optimisers rely on variables only
    holding values that are valid for the type)

git-svn-id: trunk@42272 -
2019-06-22 17:30:42 +00:00
Jonas Maebe
fb387da807 * use variables of correct size with movd (test checks whether movd only
reads 32 bit even when destination is xmm register) (mantis #35701,
    as noted by J. Gareth Moreton)

git-svn-id: trunk@42268 -
2019-06-22 13:31:02 +00:00
Jonas Maebe
c262c5dbc9 * synchronised with trunk till r42256
git-svn-id: branches/debug_eh@42257 -
2019-06-20 17:21:34 +00:00
svenbarth
89e454aca8 * rework/extend SetToString/StringToSet so that sets with a size > 4 can be converted as well (this is Delphi compatible)
+ added test

git-svn-id: trunk@42240 -
2019-06-16 21:36:25 +00:00
Jonas Maebe
faf75095cd * synchronised with trunk till r42189
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
pierre
471cb73c5f Add {$goto on} if FPC macro is defined
git-svn-id: trunk@42186 -
2019-06-07 07:55:40 +00:00
nickysn
914426e703 * fixed an i8086 inline assembler bug, where 'call word ptr [label]' (an
indirect call) was assembled as 'call near label' (direct call) instead of
  'call near [label]' and 'call dword ptr [label]' was assembled as
  'call near label' instead of 'call far [label]'

git-svn-id: trunk@42176 -
2019-06-05 15:49:39 +00:00
Jonas Maebe
eab079c7bd * fixed cbool "and" with full boolean evaluation, and cbool "xor"
(mantis #35272)

git-svn-id: trunk@42167 -
2019-06-02 20:04:06 +00:00
olivier
353da84b74 + Added test object files for x86_64-haiku.
git-svn-id: trunk@42145 -
2019-05-31 10:10:05 +00:00
Jonas Maebe
a0e35fd1bc * synchronised with trunk till r42118
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b * disable regular array -> dynamic array type coversion support unless
{$modeswitch arraytodynarray} is active (mantis #35576)
   o changed compiler to compile without this modeswitch
   o added the modeswitch to a test that depends on it

git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
Jonas Maebe
0cd0e1614b * synchronised with trunk till r42105
git-svn-id: branches/debug_eh@42106 -
2019-05-19 19:24:25 +00:00
Jonas Maebe
23428dbf4c * replaced non-breaking space with space (patch by J. Gareth Moreton,
mantis #35602)

git-svn-id: trunk@42105 -
2019-05-19 19:20:51 +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
Jonas Maebe
eb0f02348d * fixed loading parent frame pointer for nested procvars on targets that
that use explicit parentfp structs (fixes webtbs/tw17379 for llvm)

git-svn-id: trunk@42100 -
2019-05-19 19:20:29 +00:00
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
Jonas Maebe
7e51c5e856 * DFA now takes case-completeness into account (mantis #35598)
git-svn-id: trunk@42091 -
2019-05-18 12:01:41 +00:00
Jonas Maebe
6d597e1286 * synchronised with trunk till r42053
git-svn-id: branches/debug_eh@42054 -
2019-05-12 21:09:23 +00:00
Jonas Maebe
883d1f2a79 - removed test that shortstring is aligned to a multiple of pointer size,
as the compiler does not guarantee any such thing

git-svn-id: trunk@42053 -
2019-05-12 21:08:42 +00:00
Jonas Maebe
0227c55b53 - removed explicit linking of ptest.o, as that happens already automatically
due to the "uses ptest" and breaks LTO (then both ptest.o and ptest.bc
    get linked, resulting in duplicate symbols)

git-svn-id: trunk@42052 -
2019-05-12 21:08:39 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
ba1b4b1c92 + support for verifying whether a case statements handles all possibilities
(based on patch by Martok)
   o enabled by default in ISO and Extended Pascal: compile-time error if not
     the case in ISO mode, warning and run-time error in Extended Pascal mode
   o warning enabled by default in all other modes for boolean, enumeration and
     subrange integer types with ranges different from the default ones
     (i.e., different from 0..255, -128..127, 0..65536, etc)
   o warnings for all ordinal types can be enabled in all modes with
     -CC

git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
svenbarth
251c559662 * fix for Mantis #35533: when searching for helpers on types that usually don't support a point operator, don't use automatic dereferentiation
+ added tests

git-svn-id: trunk@42036 -
2019-05-10 20:56:41 +00:00
svenbarth
5a5b47fa24 + add support for MultiHelpers modeswitch by Ryan Joseph for Mantis #35159
+ added tests

git-svn-id: trunk@42026 -
2019-05-10 14:04:45 +00:00
pierre
aa8a7f5130 Do not use BSD system tar option -I if TARPROG is gtar for OpenBSD
git-svn-id: trunk@42022 -
2019-05-08 09:38:43 +00:00
pierre
3f39fe75f3 Fix test_c_objects rule (by removal of extra closing braces)
git-svn-id: trunk@41983 -
2019-05-04 12:45:02 +00:00
pierre
b4baf9b49c Link against libstdc++ and libc to avoid linking error for openbsd OS
git-svn-id: trunk@41982 -
2019-05-04 12:41:46 +00:00
pierre
e7e96f98b2 Link against libc to avoid __guard_local not found symbol failure at link time for OpenBSD target
git-svn-id: trunk@41981 -
2019-05-04 12:38:23 +00:00
Jonas Maebe
3a1fb45315 * synchronised with trunk till r41976
git-svn-id: branches/debug_eh@41977 -
2019-05-02 19:44:41 +00:00
pierre
b365fdd478 Fix compilation of testsuite program
git-svn-id: trunk@41959 -
2019-04-29 09:09:41 +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
Jonas Maebe
128bf046b4 * regenerated Makefiles with LLVM bitcode installation support
git-svn-id: branches/debug_eh@41914 -
2019-04-20 18:56:45 +00:00
pierre
8ff0aaa369 Avoid arithmetic overflow inside heaptrc unit on this test
git-svn-id: trunk@41883 -
2019-04-16 15:10:40 +00:00
svenbarth
e6add40495 * fix for Mantis #35348: correctly handle symbols that aren't parameter types (e.g. default values)
+ added test

git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +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
svenbarth
18519c9559 * fix for Mantis #34526: rely on tc_arrayconstructor_2_set instead of manually converting an array constructor to a set, this way assignment operator overloads are taken into account as well
Note: there is still a conversion to a set if the types were determined to be incompatible, so that the error is still "set of X is incompatible to Y" instead of "array of Z is incompatible to Y"
+ added tests

git-svn-id: trunk@41844 -
2019-04-05 15:24:39 +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
f7817d25ff * parameter type needs to be Nil for formal parameters (Delphi compatible)
* adjusted test trtti15
+ added test trtti19

git-svn-id: trunk@41770 -
2019-03-22 22:29:20 +00:00
Jonas Maebe
bde560dac2 * also accept {$elsif} after {$if(n)def} (mantis #34858)
git-svn-id: trunk@41724 -
2019-03-17 15:20:22 +00:00
pierre
74fed2a4cd Regenerate Makefile's after fpcmake change in commit #41721
git-svn-id: trunk@41723 -
2019-03-17 14:45:03 +00:00
Jonas Maebe
d78dbd5d59 + test from mantis #35224 (already works)
git-svn-id: trunk@41718 -
2019-03-16 20:01:57 +00:00
Jonas Maebe
fd42c3fb01 * only enable tw35187 for Windows and Linux, since it uses syscalls under unix
(which are not supported on all unix targets; feel free to re-enable for
     specific unix targets if the test has been verified to compile there)
   o also fixed placement of dotest directives: they have to come before any
     part of the program code

git-svn-id: trunk@41717 -
2019-03-16 19:14:17 +00:00
Jonas Maebe
ed2ae508d0 * only add hidden parameters for objectdef methods after generating the vmt,
so that they take into account inherited calling conventions (mantis #35233)
   o don't needlessly calculate the paraloc info when generating a JVM mangled
     name

git-svn-id: trunk@41716 -
2019-03-16 19:14:14 +00:00
nickysn
a32e69bf72 * the i386-openbsd C and C++ test modules recompiled with -fPIC
git-svn-id: trunk@41688 -
2019-03-12 16:04:57 +00:00
nickysn
dd41651e36 * recompiled OpenBSD x86_64 C external modules with -fPIC
git-svn-id: trunk@41673 -
2019-03-10 18:18:47 +00:00
nickysn
0d7ee960cc * recompiled the OpenBSD x86_64 C and C++ .o test files; GCC version is the
same (so, no need to update readme.txt), but OpenBSD's default compile
  settings have changed (PIC is enabled by default)

git-svn-id: trunk@41672 -
2019-03-10 17:38:07 +00:00
florian
d657373933 * patch by J. Gareth Moreton which avoids that the optimizer causes reads of invalid memory, resolves #35187
git-svn-id: trunk@41667 -
2019-03-10 10:48:50 +00:00
Jonas Maebe
cb5b407e89 * fixed taarch64abi.pp so it doens't rely on undefined behaviour between the
end of an inline assembly block and the end of a routine

git-svn-id: trunk@41651 -
2019-03-09 16:11:34 +00:00
pierre
a7d45c0ca0 Commit patch submitted by J. Gareth Moreton in bug report 35180
git-svn-id: trunk@41589 -
2019-03-04 21:53:22 +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
aba3f8f162 * fixed over-eager rejection of tobjecttype.fieldname expression after r40785
(mantis #35149)

git-svn-id: trunk@41474 -
2019-02-25 21:17:24 +00:00
florian
38a7f7c975 * casing fixed
git-svn-id: trunk@41428 -
2019-02-24 09:54:05 +00:00
pierre
c1e93bd2c2 + compiler/symdef.pas: Add missing call to tderef.reset methods in all tdef constructors.
+ compiler/sysmsym.pas: Do the same for for all tsym constructors.
  + compiler/symtype.pas: Generate internalerror in  tcompilerppufile.putderef
    if a deref field has index -1, as this means that buildderef was not called
    while it should have been called.
  + compiler/symtable.pas: Fix bug report itself by adding an extra local variable
    CHANGED to add extra cycles in tstoredsymtable.buildderef_referenced method.

New tests for this bug report: tests/webtbs/tw35139.pp and  tests/webtbs/tw35139a.pp

git-svn-id: trunk@41425 -
2019-02-23 23:03:29 +00:00
pierre
1a564de6e6 Add testing of use of variable of class
git-svn-id: trunk@41417 -
2019-02-23 15:37:39 +00:00
joost
42204977f8 * Patch from Bart Broersma to fix writing unicode strings in the Windows
registry + test (modified, bug #35060)

git-svn-id: trunk@41415 -
2019-02-22 22:26:21 +00:00
yury
382d5060a0 * aarch64: According to ARM64 ABI, function's arguments and the result are not required to be sign/zero extended to a full register size. Obey this rule for all targets except iOS where sign/zero extension is required.
git-svn-id: trunk@41412 -
2019-02-22 17:59:54 +00:00
joost
cd03f5326d * Fixed bug #35060, proper unicode-handling of registry-keynames. With test
(modified) from Bart Broersma

git-svn-id: trunk@41325 -
2019-02-15 21:25:05 +00:00
svenbarth
7364cd59b5 * always enable threads on Unix-like targets
git-svn-id: trunk@41308 -
2019-02-11 20:33:29 +00:00
svenbarth
b810d8f32b * fix for Mantis #35027: ensure that the synchronize event entry is reset correctly in case of an exception
+ added test

git-svn-id: trunk@41281 -
2019-02-10 15:43:03 +00:00
svenbarth
1502a13e7c * fix for Mantis #35028: when the mainthread executes a queued ThreadMethod make sure that the queue entry is released even if an exception is raised
+ added test

git-svn-id: trunk@41280 -
2019-02-10 15:42:58 +00:00
svenbarth
b1ee29c836 * fix for Mantis #30205: (adjusted) patch by Do-wan Kim to only use the default calling convention for exception handlers
+ added test

git-svn-id: trunk@41277 -
2019-02-10 11:26:46 +00:00
nickysn
b0ca862f32 + implemented IntroSort (hybrid between QuickSort and HeapSort) in unit SortAlgs
git-svn-id: trunk@41258 -
2019-02-08 15:34:29 +00:00
nickysn
8b17af1f89 + added test for unit sortalgs, that tests the heapsort and randomized quicksort algorithms
git-svn-id: trunk@41247 -
2019-02-07 14:41:33 +00:00
nickysn
5c4af27a7a + added test for the sortbase unit
git-svn-id: trunk@41195 -
2019-02-03 19:16:48 +00:00
nickysn
2a0eb54fd5 + added a simple test that tests TList.Sort
git-svn-id: trunk@41181 -
2019-02-02 23:56:24 +00:00
Jonas Maebe
20c4992ac9 - removed data race test with mixed and writers, because the modifications
to the global variable in the read-locked sections could cause
    false positives regarding detecting whether nothing got changed
    during a write-locked section due to lack of read/write dependencies

git-svn-id: trunk@41165 -
2019-02-02 15:17:12 +00:00
Jonas Maebe
56fd8e1208 * fixed tinterlockedmt*.pp for architectures with weak memory consistency
models

git-svn-id: trunk@41164 -
2019-02-02 14:28:48 +00:00
Jonas Maebe
0db9ff5c39 * fixed packed bitsize calculation for types with a negative lower bound and
and upper bound just below the next power of two (mantis #34971)

git-svn-id: trunk@41161 -
2019-02-01 17:31:53 +00:00
florian
4f0da5fcc3 + patch by Marģers to support the x86 assembler instructions blsi, blsr, blsmsk, adcx, adox, movbe, pclmulqdq, resolves #34815 and #34799
+ avxopcodes tests also movbe and pclmulqdq

git-svn-id: trunk@40951 -
2019-01-20 18:50:12 +00:00
florian
8c66e9a2eb + support for 16 bit registers
git-svn-id: trunk@40950 -
2019-01-20 18:50:10 +00:00
florian
fc7ecf3206 * usage example for linux
git-svn-id: trunk@40949 -
2019-01-20 18:50:09 +00:00
florian
e24449bcfd * if sub nodes of a commutative node contain conditionally executed nodes, these sub nodes might not be swapped
as this might result in some nodes not being executed, like temp. create nodes with init. code, see e.g. issue #34653, resolves #34653

git-svn-id: trunk@40934 -
2019-01-20 12:55:20 +00:00
florian
925531b99c * constrained generics are also compatible with formaldefs, resolves #34893
git-svn-id: trunk@40921 -
2019-01-19 21:23:36 +00:00
florian
644c47e121 * when deciding about the case code generation in case of size optimization, the number of labels is relevant, not the covered range, resolves #34818
git-svn-id: trunk@40851 -
2019-01-13 10:32:00 +00:00
florian
dd072ce76b + seek for typefiles in iso mode, resolves #34848
git-svn-id: trunk@40850 -
2019-01-12 23:29:20 +00:00
pierre
193df0204a Add x86_64-haiku target to some Makefile's
git-svn-id: trunk@40820 -
2019-01-09 22:43:56 +00:00
Jonas Maebe
b2b34338e5 * give an error when trying to call an object instance method via a type node
(mantis #34821)

git-svn-id: trunk@40785 -
2019-01-06 15:21:36 +00:00
Károly Balogh
078d8e9d2a tarray15: the conditions added in r40779 should be or, instead of and (thanks Pierre)
git-svn-id: trunk@40784 -
2019-01-06 14:08:35 +00:00
Károly Balogh
cae98304f8 tarray15: no rodata support on a bunch of m68k platforms
git-svn-id: trunk@40779 -
2019-01-06 10:50:02 +00:00
Károly Balogh
59aef99f52 haiku-x86_64: regenerated all Makefiles
git-svn-id: trunk@40757 -
2019-01-04 03:17:19 +00:00
svenbarth
04bbfd1746 * fix for Mantis #27378: save and (more importantly) restore verbosity when switching a unit
+ added test

git-svn-id: trunk@40750 -
2019-01-03 20:31:34 +00:00
florian
22365a1f57 + test for #27543 which is fixed meanwhile
git-svn-id: trunk@40731 -
2019-01-01 16:16:54 +00:00
florian
1641585655 * updated bcase.pp benchmark by Gareth Moreton, now used also as test
git-svn-id: trunk@40710 -
2018-12-30 22:21:03 +00:00
svenbarth
dada756828 * also enable published for TObjA so that the test fails for the correct reason
git-svn-id: trunk@40704 -
2018-12-29 19:23:19 +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
florian
7f5c2fa3aa * (modified) patch by Gareth Moreton: Speed improvement in case blocks, resolves #0034762
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
  * If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
  * If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
  * On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
    label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
    thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
  * Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
    individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
    utilised in situations where it is more efficient than a linear list.
  * For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
    the initial range check is removed and the gaps included in the jump table (pointing to the else label).

git-svn-id: trunk@40676 -
2018-12-27 18:31:55 +00:00
svenbarth
0f83458513 * previous Invoke() related commit also correctly fixed Mantis #34509
git-svn-id: trunk@40670 -
2018-12-26 22:59:48 +00:00
svenbarth
93e0cd9e1a * fix for Mantis #34496: correctly align stack so that SSE operations work correctly
git-svn-id: trunk@40666 -
2018-12-26 22:59:36 +00:00
svenbarth
e28dff523a * with the change regarding property access lists this test is no longer considered correct
git-svn-id: trunk@40658 -
2018-12-26 11:26:08 +00:00
svenbarth
60adebfe28 * Mantis #34691 is fixed by previous change regarding property access list
git-svn-id: trunk@40657 -
2018-12-26 11:26:04 +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
Jonas Maebe
acfa2088ef + test for previous commit
git-svn-id: trunk@40646 -
2018-12-25 17:52:56 +00:00
Jonas Maebe
70cadc7694 * fixed string constant length when going from utf-8 to single-byte code page
(mantis #33666, patch by engkin)

git-svn-id: trunk@40637 -
2018-12-24 22:21:40 +00:00
pierre
430ec7bbe4 Try to ix compilation failures in units/fpcunit directory
git-svn-id: trunk@40601 -
2018-12-20 22:39:40 +00:00
pierre
e9e5b05caa Remove Unicode $180E (Mongolian Vowel Separator), as it is not anymore a whitespace character
git-svn-id: trunk@40600 -
2018-12-20 21:30:44 +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
0846456ce4 * Skip all surrogate values in for loops from low(word) to high(word)
git-svn-id: trunk@40560 -
2018-12-15 21:06:01 +00:00
pierre
0fafe640c5 Change tstringlistexchange test code to give different error values and check that sort is done properly instead of requiring a given number of exchanges
git-svn-id: trunk@40547 -
2018-12-14 09:51:45 +00:00
pierre
bf7af550c8 Add mode objfpc to units/character/tutf32convert test
git-svn-id: trunk@40546 -
2018-12-14 09:32:01 +00:00
nickysn
99528f9774 + added all the missing test/units/* subdirectories: classes character dateutil fpcunit softfpu variants
git-svn-id: trunk@40538 -
2018-12-13 16:00:23 +00:00
pierre
f8563772c5 Always accept empty string as meaning zero is TryRomanToInt, fixes intermittent errors in tromantoint test
git-svn-id: trunk@40537 -
2018-12-13 10:21:58 +00:00
nickysn
da5868b668 + added method TBits.CopyBits for fast copying
git-svn-id: trunk@40524 -
2018-12-11 15:52:09 +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
Jonas Maebe
52fec8a94a * when optimising subsetreg moves for aarch64, take into account the fact
that the subsetreg itself can be 32 or 64 bit (mantis #33607)

git-svn-id: trunk@40512 -
2018-12-09 14:46:52 +00:00
Jonas Maebe
8846041b23 * use volatile() to prevent wrong optimizations by llvm
git-svn-id: trunk@40466 -
2018-12-04 19:53:23 +00:00
pierre
044fae62ea Fix bug report 34605 and add corresponding test
git-svn-id: trunk@40377 -
2018-11-27 10:19:36 +00:00
Jonas Maebe
d1361ca6ed * fixed adjustments of lower/upper bounds in range test optimization in case
of strictly smaller/greater comparisons (mantis #34385)

git-svn-id: trunk@40344 -
2018-11-17 22:38:31 +00:00
pierre
122fd55564 + Add TEST_PARALLEL, adds -L option to DOTESTOPT
git-svn-id: trunk@40308 -
2018-11-13 15:12:22 +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
florian
c45806c84f * made test more verbose
git-svn-id: trunk@40283 -
2018-11-11 17:32:21 +00:00
florian
95acf20544 * address output updated
git-svn-id: trunk@40273 -
2018-11-07 22:03:03 +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
34d11046e0 * wrapcomplexinlinepara takes care of function results which need different temp. handling, resolves #34438
* tw34438 failed with -O3, fixes also dfa for inline functions returning results as "complex" parameter

git-svn-id: trunk@40202 -
2018-11-03 17:31:10 +00:00
florian
47c9bca7f2 * number of cycles slightly increased for better measurements
git-svn-id: trunk@40161 -
2018-11-01 20:49:19 +00:00
pierre
89ee644919 Replace aint (which is a compiler specific type) by ptruint type, which is defined in system unit
git-svn-id: trunk@40102 -
2018-10-31 09:07:57 +00:00
florian
cd209cea53 * fix test for windows
git-svn-id: trunk@40091 -
2018-10-29 19:16:14 +00:00
Jonas Maebe
9bd931e931 * make "formal const/var" parameters the least preferred conversion
(mantis #32179)
  - removed code to handle conversion to formaldef parameters that are not by
    reference (so the default conversion preference is kept)

git-svn-id: trunk@40012 -
2018-10-21 21:02:17 +00:00
Jonas Maebe
2a3eeab96d * support for constant char/bool/enum indices in typed constant
index expressions (mantis #34055)
  * prevent all indirect structure indexing instead of only
    ansi/wide/unicodestrings

git-svn-id: trunk@40010 -
2018-10-21 18:48:41 +00:00
Jonas Maebe
2c7c0d1144 * handle widechar constants directly in the scanner, instead of in the
overload selection (where you can't even know whether the string is
    a valid widechar constant) (mantis #33875)

git-svn-id: trunk@40009 -
2018-10-21 17:34:00 +00:00
Jonas Maebe
60277dda09 * fix crash when checking load nodes during inlining in case they don't
have a symtable set (happens for internally generated labels, like
    $raiseaddr) (mantis #34442)

git-svn-id: trunk@40008 -
2018-10-21 15:53:46 +00:00
pierre
92acd38f40 Fix for bug report #34380
git-svn-id: trunk@39986 -
2018-10-18 20:21:54 +00:00
yury
7b7e4e4f66 * Disabled the 'constant propagation' optimization ( -OoNOCONSTPROP ) for this test. Otherwise the compiler throws the overflow error during compilation with -O3 or better.
git-svn-id: trunk@39982 -
2018-10-18 17:07:37 +00:00
yury
a9972b4309 * Disabled some tests for android.
git-svn-id: trunk@39981 -
2018-10-18 16:42:05 +00:00
yury
bcf03a52d8 * Disabled some tests for android since they turn PIC off.
git-svn-id: trunk@39972 -
2018-10-18 13:05:45 +00:00
yury
aa6f6423b2 * tests: On x86_64-android long double is 128-bit. There is no support for 128-bit floats in FPC yet. So disable long double tests for x86_64-android for now.
git-svn-id: trunk@39970 -
2018-10-18 12:31:23 +00:00
svenbarth
c0c602f76d * fix tests as depending on the platform the first parameter in the RTTI data might *not* be $self
git-svn-id: trunk@39965 -
2018-10-17 20:53:51 +00:00
yury
7b150102bf + Added test object files for x86_64-android.
git-svn-id: trunk@39964 -
2018-10-17 19:39:17 +00:00
yury
a29290202f * Regenerated makefiles to support x86_64-android.
git-svn-id: trunk@39958 -
2018-10-17 17:12:20 +00:00
florian
eea088c5f5 * allow nil to be assigned to generic types, resolves #34037
* niln is also a constant node

git-svn-id: trunk@39934 -
2018-10-14 07:38:13 +00:00
yury
9ef7a17390 * Delete temp files after test.
git-svn-id: trunk@39918 -
2018-10-12 15:08:30 +00:00
yury
9f32b99ea6 * dotest: When executing a remote test, prevent overwrite of the test's result and log by final cleanup commands.
git-svn-id: trunk@39911 -
2018-10-11 18:58:19 +00:00
tg74
1ef9cc01e6 avx512 disp8*N
git-svn-id: branches/tg74/avx512@39909 -
2018-10-09 21:19:52 +00:00
yury
da39d06d80 + Added test object files for aarch64-android.
git-svn-id: trunk@39902 -
2018-10-08 08:29:23 +00:00
svenbarth
2f6b15b1e2 * fix tests now that the RTTI of method pointer variables also contains the hidden parameters
git-svn-id: trunk@39901 -
2018-10-08 05:43:44 +00:00
svenbarth
a8b2ad31d1 * fix for Mantis #34355: correctly check whether the array constructor is empty (aka []) or not
git-svn-id: trunk@39882 -
2018-10-07 12:25:24 +00:00
florian
40598944f8 + support fpc include output in avx test generation code
git-svn-id: trunk@39876 -
2018-10-07 10:10:20 +00:00
florian
8943c0584e + patch by J. Gareth Moreton to support BMI2 instructions
+ extended avx test generator with the newly added BMI2 instructions

git-svn-id: trunk@39875 -
2018-10-07 10:10:19 +00:00
florian
172384fedd * fix to write correct output file name
git-svn-id: trunk@39874 -
2018-10-07 10:10:17 +00:00
florian
5604e98b1c + lazarus project files for the avx assembler test generators
git-svn-id: trunk@39873 -
2018-10-07 10:10:16 +00:00