Commit Graph

2283 Commits

Author SHA1 Message Date
svenbarth
5971e1327e * fix for Mantis #31756: have array constructors prefer open array parameters instead of dynamic array parameters for backwards compatibility
+ added test

git-svn-id: trunk@36175 -
2017-05-10 21:01:23 +00:00
svenbarth
c552b2957a * implement support for 4 Byte UTF-8 codepoints that result in a surrogate pair for UTF-16
git-svn-id: trunk@36116 -
2017-05-05 14:03:57 +00:00
svenbarth
52ddce608f + add test for enumerating a set without ranges
git-svn-id: trunk@36105 -
2017-05-04 22:00:29 +00:00
svenbarth
c349151504 + add test for array constructors
git-svn-id: trunk@36104 -
2017-05-04 21:59:49 +00:00
nickysn
5393daa994 + added compile time const evaluation for Bsf/Bsr(const) as well
git-svn-id: trunk@35941 -
2017-04-24 20:35:08 +00:00
nickysn
32395bbcbb + added compile time const evaluation optimization for PopCnt(const)
git-svn-id: trunk@35937 -
2017-04-24 16:11:43 +00:00
nickysn
256dc546ac + implemented the in_neg_assign_x and in_not_assign_x inline nodes, which will
be used (TBD in a future commit) for optimizing x:=-x and x:=not x on CPUs
  that support performing these operations directly in memory (such as x86)

git-svn-id: trunk@35749 -
2017-04-07 16:02:40 +00:00
nickysn
f19ebe2acf * fixed compiler internal error in the in_[and/or/xor]_assign_x_y inline nodes
when their second parameter is a large 64-bit unsigned constant

git-svn-id: trunk@35684 -
2017-03-29 14:55:07 +00:00
sergei
8ae0864c9a * x86 Intel asm reader: handle special variables "self" and "result" similar to regular ones in terms of subscripting. This makes fix from r34911 apply to these special variables. Resolves #31542.
git-svn-id: trunk@35669 -
2017-03-27 19:58:55 +00:00
nickysn
fc59649a98 + added inline nodes for handling and/or/xor in place (i.e. x:=x op y, where
op=and/or/xor). They generate more optimal code on certain architectures
  (including x86). The new inline nodes aren't generated by the compiler yet,
  but will be used in the future, at certain optimization levels, whenever the
  pattern x:=x op y is detected by the compiler.

git-svn-id: trunk@35666 -
2017-03-26 23:16:53 +00:00
florian
e8f7c9dfdd + test for large case statements
git-svn-id: trunk@35646 -
2017-03-23 17:57:31 +00:00
sergei
2357ca1fe6 * Fixed size suffix generated for CVTSI2SS, CVTSI2SD, VCVTSI2SS, VCVTSI2SD instructions. Mantis #31550.
* tasm2.pp already detected this bug if run with -al option. Added a copy of tasm2.pp and configured it with -al, so it is run daily on all suitable machines.

git-svn-id: trunk@35626 -
2017-03-19 10:29:28 +00:00
florian
5dd6232c0e * fix test for case sensitive file system, resolves #31452
git-svn-id: trunk@35543 -
2017-03-08 20:18:25 +00:00
michael
9787c44c78 * Additional tests from Karl-Michael Schindler
git-svn-id: trunk@35521 -
2017-03-04 17:06:27 +00:00
michael
cc81abdd83 * Patch from Michal Gawrycki to implement streaming interface properties (IComponent) Bug ID
git-svn-id: trunk@35474 -
2017-02-22 21:14:35 +00:00
maciej-izak
533c89e128 * New test for management operators to detect regressions like regression fixed in r35461 (many times initialized global variables)
git-svn-id: trunk@35463 -
2017-02-21 14:20:15 +00:00
florian
a80fcb74d8 * make test working for architectures with no float and ansistring support
git-svn-id: trunk@35460 -
2017-02-19 22:29:52 +00:00
maciej-izak
92c0e57c59 * Test suite for management operators. We have management operators on trunk! Enjoy ^^
git-svn-id: trunk@35452 -
2017-02-19 14:34:09 +00:00
Jonas Maebe
265c8e7bbc + support for specifying ms_abi_default, ms_abi_cdelc, sysv_abi_default, and
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
    Microsoft ABI on platforms that don't use it by default (mainly to ease
    porting pure assembler routines)

git-svn-id: trunk@35425 -
2017-02-11 19:57:12 +00:00
svenbarth
58abeb4a34 * also test IIDStr of raw interfaces
git-svn-id: trunk@35414 -
2017-02-10 16:06:47 +00:00
svenbarth
9ead39404b + print headers for the tested interfaces
git-svn-id: trunk@35413 -
2017-02-10 16:06:18 +00:00
svenbarth
6418f22ae0 * enable raw interface testing
git-svn-id: trunk@35412 -
2017-02-10 16:05:35 +00:00
svenbarth
c1390b3442 * fix for Mantis #31249: applied (adjusted) patch provided by Maciej Izak
Commit message:
[PATCH] More consistent RTTI (also better performance) for classic
 objects (reference to initrtti from fullrtti).

git-svn-id: trunk@35376 -
2017-01-31 18:21:53 +00:00
svenbarth
c2d68e35b5 * also assume register calling convention for m68k
git-svn-id: trunk@35352 -
2017-01-28 14:55:41 +00:00
svenbarth
26135d605f + implement interface RTTI inspired by the changes from Steve Hildebrandt, yet not exactly the same. Like his implementation this one isn't Delphi compatible either.
+ added test

git-svn-id: trunk@35341 -
2017-01-27 17:00:15 +00:00
svenbarth
25842d70c8 * adjust test so it also checks the full ParamFlags instead of only the reduced one
git-svn-id: trunk@35263 -
2017-01-08 12:42:17 +00:00
florian
1bea9e36eb + entropy test for random
git-svn-id: trunk@35260 -
2017-01-08 10:26:12 +00:00
florian
29a2c433f7 * -Sr option for iso mode: in case no command line parameter is passed, the file name for program parameters is derived from their variable name
git-svn-id: trunk@35257 -
2017-01-07 14:50:58 +00:00
svenbarth
150441627a + add test for Boolean RTTI
git-svn-id: trunk@35187 -
2016-12-23 16:05:57 +00:00
svenbarth
73ed1a9bf1 * fix for Mantis #31140: applied patch by Maciej Izak; this way it's clear what purpose ManagedFldCount has in FPC compared to Delphi
Commit message of patch:

+ New field TotalFieldCount for TTypeData
* Mark ManagedFldCount as deprecated
* Adjusted test trtti12.pp

git-svn-id: trunk@35180 -
2016-12-23 15:32:44 +00:00
svenbarth
8e765ef807 * extend test for 64-bit subranges
git-svn-id: trunk@35179 -
2016-12-23 15:11:38 +00:00
svenbarth
2acf542737 * extend TParamFlag by pfConstRef which is set for constref parameters
* extend test trtti9.pp accordingly

git-svn-id: trunk@35175 -
2016-12-20 21:37:07 +00:00
svenbarth
a9d14fe30b * extend TOrdType by entries for 64-bit values
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)

+ added test

git-svn-id: trunk@35135 -
2016-12-16 14:22:04 +00:00
svenbarth
460f309035 * fix for Mantis #31123, applied patch by Maciej Izak
* adjusted test trtti10.pp due to renamed RecInitTable field

Original commit message:

Public interface for init table for records in TypInfo:

* Rename RecInitTable to RecInitInfo (because it is special kind of PTypeInfo for init table of record). Has more sense in practical usage.
+ New structure TRecInitData (and related PRecInitData) to handle data for (init) type info for records (aka init table)
+ New structure TInitManagedField and pointer type PInitManagedField (for init table)
+ Special helper property RecInitData to get PRecInitData for tkRecord

+ test attached

git-svn-id: trunk@35134 -
2016-12-16 13:43:12 +00:00
svenbarth
121a857af8 * fix for Mantis #31118: applied patch by Maciej Izak to fix usage of wrong variable
+ added test

git-svn-id: trunk@35133 -
2016-12-15 13:47:26 +00:00
svenbarth
12dba952f0 * integration of Part 2 patch of Mantis #30687 with a few adjustments:
- indentation in ncgrtti.pas
  - fewer ifdefs in rtti.inc
  - InitTable/Terminator field as first field to avoid padding on targets that require proper alignment and have SizeOf(Pointer) > 4

Original message by Maciej Izak:

Breaking change for rtti layout for record rtti. Init table
is always accessible from regular rtti. Rtti table contains indirect
reference to init table, additionally init table contains nil-terminator (for
rtl purposes - the only way to determine kind of info : init or rtti). Pros:

* will be possible to create more Delphi compatible code for RTTI, finally end-user can access to *real* managed fields of records (some work on TypInfo.pp is still required but is not necessary).
* important step forward for management operators (anyway this commit is not directly related to management operators)
* much more optimal memory allocation/initialization/finalization for records created/destroyed by InitializeArray/FinalizeArray, for example:

type
  TBar = record
    f1,f2,f3,f4,f5,f6,f7,f8,f9: byte;
    s: string;
  end;

previously:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE was executed 10 times

now:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE is executed just once

+ test attached

git-svn-id: trunk@35125 -
2016-12-13 23:03:11 +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
florian
bfb6d4d1b7 * enable test to work also with small targets taking only a shortint as longjmp argument
git-svn-id: trunk@34972 -
2016-11-26 18:42:15 +00:00
florian
f66ee3628c * CPU bitness dependent counter sizes for faster testing on slow CPUs
git-svn-id: trunk@34959 -
2016-11-24 20:59:53 +00:00
sergei
133fcb5ab2 * Fixed VMOVQ instruction encoding, now assembles correctly also in 32-bit code.
+ Test

git-svn-id: trunk@34949 -
2016-11-21 13:59:44 +00:00
florian
0dbcd5daa9 * do not run test, if no stack checking is available
git-svn-id: trunk@34932 -
2016-11-20 16:02:37 +00:00
florian
13de8c6808 * -Or => -Ooregvar
git-svn-id: trunk@34931 -
2016-11-20 15:45:01 +00:00
Tomas Hajny
ff02b2dfb5 + added test based on bug #24504
git-svn-id: trunk@34850 -
2016-11-08 22:24:22 +00:00
florian
a27b07b342 + more restrictions on pred/succ to dec/inc optimization
o check if the argument can be used as a call by reference parameter
  o check if the argument has no side-effects
+ tests

git-svn-id: trunk@34816 -
2016-11-06 16:36:02 +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
9c81e90e08 + extension to iso mode: reset/rewrite can take a file name as a second parameter
git-svn-id: trunk@34726 -
2016-10-16 07:55:08 +00:00
Jonas Maebe
265923a2ee * several fixes for TMultiReadExclusiveWriteSynchronizer, based on patch by
Derek (mantis #28830)
   o ability for a thread to acquire a readlock when it already holds a
     write lock, or vice versa
   o detect when thread1 releases a lock while it hadn't acquired one
   o correct result of beginwrite (return true only when another thread
     held/acquired a write lock before the current thread got it)
   o extra compared to Derek's patch: replaced some additional
     (mostly pre-existing) interlocked*() hacks with proper memory
     barriers, made formatting consistent, fixed compilation on platforms
     where tthreadid is not an integer type, improved tthreadid hashing
     function for 64 bit platforms, fixed some comments

git-svn-id: trunk@34678 -
2016-10-08 20:45:45 +00:00
Jonas Maebe
e5a1231931 * updated FSF address (mantis #30198, patch by Paul Gevers)
git-svn-id: trunk@34598 -
2016-10-02 12:56:59 +00:00
svenbarth
246de84ef3 * ensure that a finalization section is parsed before the generation of specializations as otherwise specializations in such sections would result in unresolved forward declarations
git-svn-id: trunk@34582 -
2016-09-30 15:41:35 +00:00
Jonas Maebe
775f86d216 * made cthreads the first unit, as the initialisation code of sysutils now
apparently already triggers threading-related code

git-svn-id: trunk@34516 -
2016-09-11 18:17:41 +00:00
svenbarth
6b93f09567 * fix test
git-svn-id: trunk@34458 -
2016-09-08 17:43:04 +00:00
svenbarth
26a2ddd3d6 + extend Delete() intrinsics with Delphi compatible support for dynamic arrays. Also fixes Mantis #30306
git-svn-id: trunk@34455 -
2016-09-08 17:15:10 +00:00
Jonas Maebe
2d051f89f7 * don't increase refcounts for variants assigned to (ti_)const nodes, fixes
memory leak after r34288 and should have been done as part of r34287
    (mantis #30546)

git-svn-id: trunk@34440 -
2016-09-06 21:28:34 +00:00
svenbarth
8b853571c6 * don't generate a warning if a "generic" token follows while parsing procedure directives (let's hope we'll never have to add a "generic" directive :/ )
+ added test

git-svn-id: trunk@34343 -
2016-08-19 14:07:36 +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
pierre
d957595842 Fix for msdos, local variable SaveExit must be a CodePointer
git-svn-id: trunk@34267 -
2016-08-10 16:16:17 +00:00
pierre
4b17961dd4 * Skip some tests for msdos
git-svn-id: trunk@34266 -
2016-08-10 16:10:25 +00:00
yury
f08d136290 * Fixed test for non-Windows targets.
git-svn-id: trunk@34236 -
2016-07-30 16:37:47 +00:00
yury
980c4741ac * Fixed conversion from PWideChar to ansistring.
+ test. 

git-svn-id: trunk@34219 -
2016-07-29 09:43:05 +00:00
pierre
e9a1ed9446 Add fpwidestring and unicodeducet units for go32v2 tests related to unicode support
git-svn-id: trunk@34168 -
2016-07-22 06:26:17 +00:00
pierre
d4945f4fd0 Avoid range check error for Win64 by correcting type of parameters for GetModuleFileNameA WinAPI function
git-svn-id: trunk@34148 -
2016-07-19 11:35:21 +00:00
pierre
d1a610a2fc Avoid range check error on win64 target in comparison of THandle to -1
git-svn-id: trunk@34147 -
2016-07-19 09:48:34 +00:00
pierre
ffe2940b01 Fix test for compact and medium i8086 memory model
git-svn-id: trunk@34073 -
2016-07-05 22:32:19 +00:00
pierre
bc839068de Fix test for compact and medium i8086 memory model
git-svn-id: trunk@34072 -
2016-07-05 22:30:12 +00:00
pierre
360f2734eb Improve targ1a and targ1b to really check content of args passed to called executable
git-svn-id: trunk@34067 -
2016-07-04 21:03:40 +00:00
pierre
1cbc526501 Reduce NumIterations for I8086 cpu to avoid timeout
git-svn-id: trunk@34052 -
2016-07-03 07:45:45 +00:00
pierre
16477c598d Fix huge memory model failure by adding nostackframe modifier needed to avoid DS reloading at proc entry
git-svn-id: trunk@34049 -
2016-07-02 15:12:18 +00:00
pierre
ef6a8009cf Add {$goto on} for FPC to avoid compile time error
git-svn-id: trunk@34048 -
2016-07-02 15:10:51 +00:00
pierre
2ca06538d6 Limit alignment requirement for I8086 CPU to 2 even if pointer is 4 byte long
git-svn-id: trunk@34047 -
2016-07-02 14:58:49 +00:00
pierre
d2113f5ead 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@34021 -
2016-06-28 15:59:09 +00:00
pierre
dfeadf89e9 Modify test to take into account the specific prologue for Huge model
git-svn-id: trunk@34016 -
2016-06-24 15:13:37 +00:00
pierre
f079701302 Also disable range check error that can happen on 64-bit processors
git-svn-id: trunk@34011 -
2016-06-21 08:02:19 +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
pierre
27119cad3c Disable range checks explicitly as THandle is unsigned at least for win32 OS
git-svn-id: trunk@34009 -
2016-06-20 15:26:50 +00:00
Jonas Maebe
580cf73e64 * align the variables passed to InterlockedCompareExchange128() to a
multiple of 16 bytes

git-svn-id: trunk@33962 -
2016-06-12 09:21:08 +00:00
Jonas Maebe
5af40f22e8 * handle enums with a packenum setting that is larger than necessary to store
all of their values, when kept in a bitpacked array, properly via
    pass_typecheck rather than hacking location.size in pass_generate_code:
   o the old fix was incomplete (it didn't handle non-constant indices)
   o the old fix didn't work for llvm (since it uses defs rather than
     location.size)

git-svn-id: trunk@33943 -
2016-06-09 22:00:14 +00:00
svenbarth
f27ce0b159 Rework the way the method bodies for specializations are generated: instead of walking the global and local symboltable all pending specializations are kept in a list of the current module which is (for now) walked at the end of a unit/program to generate the method bodies as before.
fmodule.pas, tmodule:
  + new list pendingspecializations which keeps track of all pending specializations of the current module
psub.pas:
  * move generate_specialization_procs and related routines to pgenutil
  + new procedure read_proc_body to read a routine's body, cause generate_specialization_procs needs it (unlike the already existing overload in the implementation section, this one can only handle bodies of non-nested routines) 
pgenutil.pas:
  * generate_specialization_phase2: add the newly specialized generic to the current module's pending specializations
  * generate_specialization_procs: reworked so that it uses the new pendingspecializations field instead of walking the global and local symboltable of the current unit
pmodules.pas:
  + add pgenutil to uses due to the moved generate_specialization_procs

+ added test

git-svn-id: trunk@33826 -
2016-05-26 18:56:16 +00:00
pierre
345361beef Revert commit 33771 and directly replace cpu8086 by cpui8086 which is always defined by ppc8086 compiler
git-svn-id: trunk@33773 -
2016-05-24 06:52:17 +00:00
pierre
ba509152b8 Also define CPUSMALL macro if CPUI8086 is defined
git-svn-id: trunk@33771 -
2016-05-23 21:07:11 +00:00
pierre
6646a0d29f Correct tseg.pp test for i8086 CPPU for which seg/cseg/dseg/sseg should NOT return zero values
git-svn-id: trunk@33770 -
2016-05-23 20:58:37 +00:00
pierre
74b3481918 Use small number for Blocks constant for i8086 CPU also
git-svn-id: trunk@33769 -
2016-05-23 20:51:07 +00:00
nickysn
bffe9480f4 + added the winapi functions, structures and constants for raw keyboard and mouse input
git-svn-id: trunk@33746 -
2016-05-22 01:59:27 +00:00
Jonas Maebe
f0753d85ad * fix the Upgrade to Unicode version 7 and CLDR 27 from r32814
(mantis #29659, fixes tuca* tests)

git-svn-id: trunk@33708 -
2016-05-19 15:44:22 +00:00
michael
8e75ac64f1 * Patch from Graeme GeldenHuys to implement UnicodeString versions of MatchStr() and IndexStr() (bug ID 30113)
git-svn-id: trunk@33700 -
2016-05-16 16:40:27 +00:00
yury
511f5b5ded * trwsync test: Increased timeout to 60 seconds. Trying to fix random failures due to the timeout on busy machines.
git-svn-id: trunk@33487 -
2016-04-12 08:38:18 +00:00
yury
a37cd66a87 * trwsync test: Increased timeout to 30 seconds. Should prevent failures on busy machines.
git-svn-id: trunk@33313 -
2016-03-22 10:16:25 +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
yury
d43e5dcab8 * tests: Fixed string comparison.
git-svn-id: trunk@33302 -
2016-03-20 21:25:18 +00:00
nickysn
759a4f8258 * don't try to build lnfodwrf on i8086-msdos, because it causes internal error
200309041 and thus breaks building i8086-msdos snapshots entirely. Added test
  that reproduces the bug in a small program, so it can be fixed eventually.

git-svn-id: trunk@33276 -
2016-03-18 19:56:37 +00:00
Jonas Maebe
2b210335a1 * fixed pointer arithmetic errors in WideStrAlloc/StrBufSize/StrDispose
(patch by Iks, mantis #29710)

git-svn-id: trunk@33271 -
2016-03-18 13:12:11 +00:00
Jonas Maebe
697aed738c * replaced test directory names with ones that doesn't contain decomposable
characters, so the test's success doesn't depend on getdir returning a
    string using the same composition as the used name (fixes test on
    OS X 10.11)

git-svn-id: trunk@33270 -
2016-03-18 12:43:47 +00:00
Jonas Maebe
5919ca84bb * fixed string code page after setstring(rawbytestring,..) (mantis #29833)
git-svn-id: trunk@33268 -
2016-03-18 12:43:42 +00:00
florian
45807056c5 * factored out SymbolCandidateForWarningOrHint
* do not issue a hint if a normal parameter is passed to another procedure by var
+ test

git-svn-id: trunk@33248 -
2016-03-13 19:14:26 +00:00
florian
234990b73c + fma test program extended to support arm
git-svn-id: trunk@33185 -
2016-03-06 13:33:22 +00:00
Jonas Maebe
87f46dcafd * updated pos() for Java with an offset parameter (equivalent of r31464 etc)
(mantis #29626)

git-svn-id: trunk@33160 -
2016-03-05 15:32:25 +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
8775897621 * fix copy & paste error (didn't influence the test as str3 isn't changed, but at least it's consistent that way...)
git-svn-id: trunk@33090 -
2016-02-12 16:09:32 +00:00
svenbarth
8287773b16 Reverted revision 33036. This feature is too controverse to be left in.
git-svn-id: trunk@33048 -
2016-02-04 19:26:51 +00:00
svenbarth
ed94ca4b24 Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed.
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).

compinnr.inc:
  + add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas: 
  + create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
  * statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
  + new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
  * pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
  * pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass

+ added tests

git-svn-id: trunk@33036 -
2016-01-31 14:29:12 +00:00
pierre
3300f51ed6 * Adjust test for win64
git-svn-id: trunk@32957 -
2016-01-16 01:15:40 +00:00
pierre
238040afdd * Fix compilation for JVM cpu
git-svn-id: trunk@32956 -
2016-01-16 01:15:12 +00:00
Jonas Maebe
cc197a5593 * extended test
git-svn-id: trunk@32900 -
2016-01-10 14:01:32 +00:00
pierre
de7a79f497 Use SizeInt type for GlobalStartMem and StartMem variables to avoid compilation error for msdos compact memory model
git-svn-id: trunk@32874 -
2016-01-07 17:33:36 +00:00
pierre
80a7b909e4 Add $goto on for FPC compilation to avoid compile time error
git-svn-id: trunk@32873 -
2016-01-07 17:12:13 +00:00
florian
b7786d0849 * fix test parameter
git-svn-id: trunk@32793 -
2015-12-29 21:12:28 +00:00
florian
a03d992cc0 * doing fastmath is not useful when testing currency calculation accuracy (test fails with fastmath enabled on some targets)
git-svn-id: trunk@32790 -
2015-12-29 15:22:55 +00:00
michael
464e40bfd9 * Applies patch from Laco (bug ID 29113)
git-svn-id: trunk@32723 -
2015-12-26 11:27:13 +00:00
Jonas Maebe
c4b347c271 * support anonymous procvar definitions for jvm outside parameter lists (in a
parameter list they represent nested procvars, which aren't supported yet)

git-svn-id: trunk@32454 -
2015-11-22 10:52:20 +00:00
svenbarth
1d72397c19 Add tests for generic functions/procedures/methods
git-svn-id: trunk@32440 -
2015-11-21 16:53:11 +00:00
michael
13cfc4ac8f * Added test for NormalizedBCD
git-svn-id: trunk@32358 -
2015-11-18 14:39:29 +00:00
nickysn
a19c506b46 + added a very simple test for i8086-msdos for linking an external TASM
assembler .obj module. Note that TASM modules aren't fully supported yet,
  because our OMF internal linker doesn't support all features of the OMF object
  format. This test works, because it's really simple. As more OMF features are
  supported, this test will be extended.

git-svn-id: trunk@32353 -
2015-11-17 17:08:25 +00:00
michael
dfedc081e0 * Test for scandatetime (bug ID 28952)
git-svn-id: trunk@32347 -
2015-11-16 19:51:14 +00:00
florian
70b8789262 o basic extended pascal support:
+ automatically loaded helper unit
  * Makefiles adapted
  * mode switch
  * mode switches reorganized
+ TimeStamp support

git-svn-id: trunk@32330 -
2015-11-15 15:13:36 +00:00
nickysn
1e7a0838d7 + added test for the 'SEG @CODE' and 'SEG @DATA' i8086 inline assembler directives
git-svn-id: trunk@32284 -
2015-11-10 21:21:17 +00:00
nickysn
8c81e93a96 * replaced setintvec(x,@proc) in i8086 tests with the memory model independent version setintvec(x,ptr(seg(proc),ofs(proc)))
git-svn-id: trunk@32249 -
2015-11-05 14:18:55 +00:00
nickysn
c25585daee * fixed addr(procedure), mantis #28775
git-svn-id: trunk@32204 -
2015-10-30 15:17:48 +00:00
nickysn
500743c65d + extended test with many more reference syntaxes, accepted by TP7
git-svn-id: trunk@32190 -
2015-10-29 15:48:18 +00:00
nickysn
1eaa77d2f9 + added test for i8086 inline asm access to procedure data
git-svn-id: trunk@32186 -
2015-10-29 14:47:26 +00:00
nickysn
ce7672b750 + added test for local label data access from i8086 inline asm
git-svn-id: trunk@32178 -
2015-10-28 17:00:35 +00:00
nickysn
83d90c7888 + extended test with call/jmp [d]word ptr const, which produces an indirect call or jump under BP7
git-svn-id: trunk@32177 -
2015-10-28 15:22:33 +00:00
nickysn
a7a71f8b9f + extended test with many more variants, supported by BP7 for specifying an indirect call/jmp
git-svn-id: trunk@32176 -
2015-10-28 14:57:35 +00:00
nickysn
1fc1739c1d + added calls to local labels in a far procedure to the test as well
git-svn-id: trunk@32175 -
2015-10-28 14:33:32 +00:00
nickysn
85f4b8aa5e + added calls to labels to the tests
git-svn-id: trunk@32174 -
2015-10-28 13:59:35 +00:00
nickysn
fe3711bf6a + added interrupt procedures to the tests
git-svn-id: trunk@32173 -
2015-10-28 13:49:48 +00:00
nickysn
13441261f2 + extended tests with some additional ways to produce call relative near/absolute far in BP7's inline asm
git-svn-id: trunk@32172 -
2015-10-28 13:32:18 +00:00
nickysn
30718a2601 + added i8086 inline asm near relative and far absolute call tests (TP7
compatible, but not yet working under FPC, unfortunately)

git-svn-id: trunk@32164 -
2015-10-27 14:39:02 +00:00
nickysn
6b89ea1af2 + added an i8086 inline assembler test for the near and far ret instructions
git-svn-id: trunk@32158 -
2015-10-26 17:06:17 +00:00
yury
05ecee1895 * tinterlockedmt test: Ensure all threads have started.
git-svn-id: trunk@32156 -
2015-10-26 10:14:47 +00:00
yury
1127689dba * tinterlockedmt test: Reduced the thread count.
git-svn-id: trunk@32148 -
2015-10-25 17:35:36 +00:00
nickysn
1491d9655c + fixed the emitting of non-nil far and huge pointer constptrs in typed
constants on i8086

git-svn-id: trunk@32141 -
2015-10-24 20:25:49 +00:00
yury
4ae1d23909 * tinterlockedmt test: Increased timeout.
git-svn-id: trunk@32111 -
2015-10-21 09:02:16 +00:00
nickysn
520f7226aa + added test for i8086 inline asm far and near indirect jmps as well
git-svn-id: trunk@32110 -
2015-10-21 01:26:15 +00:00
nickysn
2fbcdaf7d5 * fix typo
git-svn-id: trunk@32109 -
2015-10-21 01:22:23 +00:00
nickysn
bdf719c4df * updated comment to inform that 'call far reg' is not a valid x86 instruction
at all, and not just that we don't expect it

git-svn-id: trunk@32108 -
2015-10-21 01:19:23 +00:00
nickysn
c5aa64bc2c + added an i8086 inline asm test for the indirect near and far call instructions
git-svn-id: trunk@32107 -
2015-10-21 01:07:00 +00:00
yury
9bece502a0 * tinterlockedmt test: Reworked test for InterlockedCompareExchange to be more robust.
git-svn-id: trunk@32101 -
2015-10-20 12:43:52 +00:00
yury
325a79b81b * tinterlockedmt test: Another fix to improve threads synchronization. Should fix slow execution on some systems.
git-svn-id: trunk@32095 -
2015-10-19 11:34:52 +00:00
pierre
89f5b65bbf New aarch64-linux gcc compiled objects generated on GCC Compile Farm gcc115 machine
git-svn-id: trunk@32094 -
2015-10-19 10:40:35 +00:00
sergei
72f60de3c4 * Added two test cases from Mantis #28584. The issue itself has been fixed with r31475 and r31582.
git-svn-id: trunk@32092 -
2015-10-18 14:48:36 +00:00
yury
3344188f3e * tinterlockedmt: Minor improvement.
git-svn-id: trunk@32091 -
2015-10-18 12:41:35 +00:00
yury
3fcbb7d2d4 * tinterlockedmt: Fix race conditions in the InterLockedCompareExchange test.
git-svn-id: trunk@32089 -
2015-10-18 11:07:29 +00:00
yury
44777f3797 * Use ThreadSwitch.
git-svn-id: trunk@32076 -
2015-10-17 16:03:18 +00:00
yury
e3d06cdba7 + Stress test for Interlocked* functions using multiple threads.
git-svn-id: trunk@32073 -
2015-10-17 14:48:04 +00:00
yury
a4f63a07d2 * Skip this test for android.
git-svn-id: trunk@32007 -
2015-10-10 21:57:08 +00:00
Jonas Maebe
e25c5b809e * use cextended instead of clongdouble, so that the tests keeps compiling
for platforms where we don't support the "long double" type

git-svn-id: trunk@31883 -
2015-09-29 07:44:07 +00:00
yury
bbb1cae57f * Use "clongdouble" instead of "extended" in libc printf tests.
git-svn-id: trunk@31864 -
2015-09-27 21:14:04 +00:00
Jonas Maebe
84b47dc92c * fixed test on systems not using UTF-8 as defaultsystemcodepage. This test
was correct before the ansistrings with codepage support had been
    implemented, and by accident kept working afterwards on platforms that
    don't use UTF-8 as defaultsystemcodepage, but after r31831 it started
    failing. This commit fixes it again, in combination r31847 (by ensuring
    that the string data passed to ansistart/endtext is encoded in
    defaultsystemcodepage).

git-svn-id: trunk@31848 -
2015-09-27 14:46:44 +00:00
svenbarth
17a0ac7fc0 pdecsub.pas:
* extend parse_proc_head() with support for /parsing/ generic functions (at least in mode Delphi, mode ObjFPC depends on the new isgeneric parameter to be set)
  * adjust parsing of interface mappings with a generic interface (note: in mode ObjFPC this now requires a "specialize" directly before the generic interface's name, which is more in line with other uses of "specialize")
pexpr.pas, factor:
  * don't call postfixoperators() if hadspecialize is set

tests/test/tgeneric79.pp:
  * adjust test to changed syntax

git-svn-id: trunk@31769 -
2015-09-18 16:24:07 +00:00
yury
6e638e31d7 * Use cp1251 on Android.
git-svn-id: trunk@31725 -
2015-09-16 17:49:38 +00:00
yury
d106fc9823 * Use cp1251 on Android.
git-svn-id: trunk@31723 -
2015-09-16 17:35:22 +00:00
michael
a687cc1469 * Add tests for offset argument to pos
git-svn-id: trunk@31465 -
2015-08-31 13:06:14 +00:00
Jonas Maebe
c27807ee63 * resolve formal/anonymous external classes before comparing parameters to
overloaded routines

git-svn-id: trunk@31458 -
2015-08-30 14:33:01 +00:00
Jonas Maebe
945fd4fcf5 * wait till the end of typecheckpass before we load a call context's self
parameter instead of immediately doing it in the constructor of the call
  node, and then only create it if we actually need it.

  It was previously created in the call node constructor because it needs to be
  done before pass_1 (which is where it is actually used) due to pass_1 possibly
  being performed in the context of inlining (and then a wrong self parameter
  may be found, or none at all), and it was done unconditionally because at that
  point we don't know yet whether or not a self parameter will be necessary (as
  we haven't resolved the overloads/procdef yet).

  The problem with this is that if we use the parentfpstruct way of handling
  accesses to outer scope locals/parameters, we need to know all locals/
  parameters that will be accessed from nested routines after typecheckpass,
  otherwise we get crashes. The problem was that if a call to an RTL routine was
  generated by the compiler in a routine nested inside a method during pass_1,
  and this nested routine itself did not access self of the method (so self was
  not added to its parentfpstruct during the typecheckpass), then the
  unconditional reference to self when creating the call caused a compiler
  crash (introduced in r30908)

git-svn-id: trunk@31197 -
2015-07-07 16:34:14 +00:00
Jonas Maebe
8e406cc7bd * fixed bug in test exposed by r31038
git-svn-id: trunk@31044 -
2015-06-13 22:12:45 +00:00
Jonas Maebe
26044b604f * don't import org.freepascal.rtl.* as this also includes our System
class, which conflicts with java.lang.System in recent jdk javac's
    (and we don't access any of the RTL classes explicitly in the
    test program)

git-svn-id: trunk@30952 -
2015-05-31 16:50:53 +00:00
Károly Balogh
99421ba032 tfexpand: fixed some AMIGA vs. HASAMIGA defines, fixed DriveSep definition for Amiga systems
git-svn-id: trunk@30774 -
2015-05-03 11:35:07 +00:00
florian
fbd6d2a0f9 + check for FPUNONE
git-svn-id: trunk@30750 -
2015-05-01 14:46:37 +00:00
Tomas Hajny
3ded26a774 * correction of tests for Amiga (volumes, exclusion of some '.'/'..' related tests)
git-svn-id: trunk@30654 -
2015-04-18 18:48:42 +00:00
michael
46a0eced9e * Adapted test to test for 27831
git-svn-id: trunk@30641 -
2015-04-18 07:16:02 +00:00
Jonas Maebe
faf3efe139 + Linux/ppc64le test object files
git-svn-id: trunk@30228 -
2015-03-14 18:37:01 +00:00
Jonas Maebe
5b3c511467 * don't crash when "return exitvalue" is used in a procedure
git-svn-id: trunk@30177 -
2015-03-13 08:35:26 +00:00
Jonas Maebe
2dcd42d4f1 * fixed detection of an objcprotocols descending from a forward-defined
objcprotocol

git-svn-id: trunk@30169 -
2015-03-12 19:37:43 +00:00
Jonas Maebe
00642288b8 * extended bsf/bsr tests with values in which more than one bit is set
git-svn-id: trunk@30151 -
2015-03-09 16:48:26 +00:00
Jonas Maebe
ff020a3be4 + "Utf8CodePointLen(pansichar,MaxLookAhead,IncludeCombiningDiacriticalMarks):
sizeint"  function that returns:
   <0: invalid sequence detected after processing "-result" bytes
   0:  incomplete (may still be valid if MaxLookAhead is increased)
   >0: sequence of result bytes forms a codepoint (+ combining diacritical
       marks if that parameter was true)

git-svn-id: trunk@30047 -
2015-03-01 17:12:17 +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
b5b7e0f338 * ensure that 64->32 bit truncations cannot be optimized away by the
register allocator on AArch64 + test (did not get caught by existing
    tests)

git-svn-id: trunk@29965 -
2015-02-23 22:55:54 +00:00
Jonas Maebe
c6daaa28d0 * enable all Objective-C tests for Darwin/AArch64
git-svn-id: trunk@29945 -
2015-02-23 22:54:24 +00:00
Jonas Maebe
41fba0c4f7 * switched to using the stack pointer as base register for the temp allocator
instead of the frame pointer register:
      1) we exactly know the offsets of the temps from the stack pointer
         after pass 1 (based on the require parameter stack size for called
         routines), while we don't know it for the frame pointer (it depends
         on the number of saved registers)
      2) temp offsets from the stack pointer are positive while those from
         the frame pointer are negative, and we can directly encode much
         bigger positive offsets in the instructions
   o move the stack pointer register to a virtual register in
     loadparentfpn, because many instructions cannot directly operate
     on/with the stack pointer
   o add the necessary register interference edges for the stack pointer
     register

git-svn-id: trunk@29938 -
2015-02-23 22:54:03 +00:00
Jonas Maebe
62fb05b7c4 + Darwin/AArch64 test object files
git-svn-id: trunk@29924 -
2015-02-23 22:53:11 +00:00
Jonas Maebe
f9647b661f + Darwin/AArch64 test object files
git-svn-id: trunk@29918 -
2015-02-23 22:52:52 +00:00
Jonas Maebe
3f5e95791b * use iosxwstr instead of cwstring on Darwin (for iOS 7+ testing)
git-svn-id: trunk@29829 -
2015-02-23 22:48:15 +00:00
svenbarth
5a344ee263 Rework the way how "specialize" is handled. Instead of initializing the specialization of a full type declaration (including unit name and parent types) it is now considered part of the specialized type itself. This means that for example the following code:
type
  TTestLongInt = specialize SomeOtherUnit.TTest<LongInt>;

will now have to read as

type
  TTestLongInt = SomeOtherUnit.specialize TTest<LongInt>;

While this is not backwards compatible this situation should arise seldomly enough and the benefits especially in context with generic functions/procedures/methods outway the drawbacks.

pbase.pas:
  * try_consume_unitsym: add a allow_specialize parameter that allows to parse "specialize" in front of a non-unit symbol; whether it was a specialization or not is reported using a new is_specialize parameter
  + add a new overload try_consume_unitsym_no_specialize that calls try_consume_unit sym with allow_specialize=false and a dummy is_specialize parameter
  * switch calls to try_consume_unitsym to try_consume_unitsym_no_specialize
pstatmnt.pas, try_statement:
  * switch call to try_consume_unitsym to try_consume_unitsym_no_specialize
  * adjust call to parse_nested_types
ptype.pas:
  + extend id_type with the possibility to disallow unit symbols (needed if a specialize was already parsed) and to report whether a specialize was parsed
  + extend parse_nested_types with the possibility to tell it whether specializations are allowed
  * have parse_nested_types specialize generic defs if one is encountered and local type defs are allowed
  * id_type: only allow "unitsym.specialize sym" or "specialize sym", but not "specialize unitsym.sym"
  * single_type: correctly handle specializations with "specialize" keyword
  * read_named_type.expr_type: there is no longer a need to check for "specialize" keyword
pexpr.pas:
  + new function handle_specialize_inline_specialization which tries to specialize a type symbol
  * handle_factor_typenode: handle specializations after a point that follows a record or object (why isn't this part of postfixoperators anyway? O.o)
  * postfixoperators: handle "specialize" after records and objectdefs
  * factor_read_id: handle "specialize" in front of an identifier (and after unit symbols)

+ added tests
* adjusted test webtbs/tw16090.pp

git-svn-id: trunk@29768 -
2015-02-20 16:23:40 +00:00
Jonas Maebe
071282b286 * add methods of objcprotocols to the list of visible "helper" methods when
loading them from ppu (like was already done when they were initially
    compiler), so they can be called via the "id" type even if no classes are
    in scope that implement them

git-svn-id: trunk@29686 -
2015-02-13 15:43:34 +00:00
Tomas Hajny
cd166e6ff6 * modified according to outcomes of discussion with Jonas
git-svn-id: trunk@29677 -
2015-02-12 23:16:13 +00:00
Tomas Hajny
bd719052fa * test updated according to results of discussion with Jonas to work properly also on platforms not using UTF-8 as their default system codepage (and be safe to ignore characters possibly unsupported with current system codepage)
git-svn-id: trunk@29676 -
2015-02-12 23:02:20 +00:00
Tomas Hajny
08a3c45aa3 * test fixed because the original version was wrong (as confirmed by Jonas)
git-svn-id: trunk@29675 -
2015-02-12 17:48:00 +00:00
Tomas Hajny
da21fe94fa * this test can never work correctly on operating systems not providing Unicode support at filesystem API level unless the current codepage happens to support all the characters used within the test (which is unlikely at least)
git-svn-id: trunk@29674 -
2015-02-12 00:55:18 +00:00
Tomas Hajny
8c20ff7f91 * fix for AllowOneTrailingSeparator and AllowMultipleTrailingSeparators checks and tests using these variables according to the passed parameters
git-svn-id: trunk@29671 -
2015-02-11 21:22:01 +00:00
pierre
82f751d51a Handle one trailing separator separately from multiple
git-svn-id: trunk@29670 -
2015-02-11 10:58:04 +00:00
Tomas Hajny
2cf9d18b14 * invalid DosError display improved
git-svn-id: trunk@29665 -
2015-02-10 16:43:15 +00:00
Tomas Hajny
3caf47d756 * display the wrongly obtained invalid DosError value too
git-svn-id: trunk@29664 -
2015-02-10 16:40:06 +00:00
pierre
488024ea5c Fix for failures on FileNameCaseSensitive systems
git-svn-id: trunk@29609 -
2015-02-02 21:49:36 +00:00
Jonas Maebe
5d4837329b * changed {$modeswitch blocks} to {$modeswitch cblocks} to avoid confusion
with the Pascal meaning of the term "block"

git-svn-id: trunk@29594 -
2015-02-01 15:50:06 +00:00
Tomas Hajny
caa749f6a0 * UTF-8 may not be the system codepage on OS/2 - skipped
git-svn-id: trunk@29566 -
2015-01-27 16:47:40 +00:00
Tomas Hajny
693a239842 * information about GCC version used for compiling the OS/2 object files added
git-svn-id: trunk@29565 -
2015-01-27 16:24:24 +00:00
pierre
84bb209ce8 Add some missing C compiler information found inside C objects
git-svn-id: trunk@29564 -
2015-01-27 13:48:44 +00:00
Tomas Hajny
5a03b52801 * compiled object files for OS/2
git-svn-id: trunk@29563 -
2015-01-27 09:20:55 +00:00
Tomas Hajny
d3ee7d4999 * there is no wchar.h included in EMX GCC port (but it is fortunately not needed for our testsuite)
git-svn-id: trunk@29562 -
2015-01-27 09:17:05 +00:00
pierre
ddee662665 Add i386 specific check that fpu stack is completely empty in CheckStack function
git-svn-id: trunk@29554 -
2015-01-26 13:13:55 +00:00
pierre
9af030ba9e Add missing x86_64-solaris gcc compiled objects
git-svn-id: trunk@29536 -
2015-01-23 14:23:47 +00:00
pierre
16262bb10e Add missing i386-solaris gcc compiled objects
git-svn-id: trunk@29535 -
2015-01-23 14:18:18 +00:00
Tomas Hajny
150ead4546 * skipping wrAbandoned test unsupported on OS/2 similarly to MS Windows
git-svn-id: trunk@29528 -
2015-01-22 23:52:22 +00:00
Tomas Hajny
33856b9f7b * fix typo in message and deallocate all previously allocated memory
git-svn-id: trunk@29527 -
2015-01-22 23:49:04 +00:00
Tomas Hajny
054ada1191 * skip this test for os2 and emx targets because it tries to link in a resource file in MS Windows format (rather than the OS/2 format) which is not supported
git-svn-id: trunk@29523 -
2015-01-22 21:24:21 +00:00
Jonas Maebe
dc172ef55b * disabled blocks tests for Darwin/ppc(64), as the blocks runtime is only
only shipped with Mac OS X 10.6 and later (and the last version supporting
    ppc was 10.5)

git-svn-id: trunk@29522 -
2015-01-22 19:56:34 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
8fe981cccb * also give a warning when a field masks an identifier from a category
* also give a warning when a field/parameter/local variable masks an
    identifier from a class helper that's in scope

git-svn-id: trunk@29498 -
2015-01-17 15:38:29 +00:00
Jonas Maebe
990e47f2d3 * give a warning instead of an error if a parameter or local variable in a
an Objective-C method masks an identifier from a category, because due
    to the fact that all standard categories are imported at the same time via
    the CocoaAll unit, this can often happen with categories you don't know/
    care about. These errors also didn't happen in 2.6.x

git-svn-id: trunk@29497 -
2015-01-17 15:27:42 +00:00
svenbarth
a4e8f00399 Allow the usage of type aliases of generic type parameters outside of the generic. Besides being useful by itself it will also be needed in the future when the visibility of the type parameters is changed from public to strict private.
ptype.pas, id_type:
  * don't generate an error if the undefineddef typesym is an explicit rename that belongs to a generic

+ added test

git-svn-id: trunk@29485 -
2015-01-16 16:38:51 +00:00
svenbarth
5848637db3 Fix generation of class names for specializations.
symdef.pas, tstoreddef:
  * is_specialization: fix exit condition to correctly recognize specializations

+ added test

git-svn-id: trunk@29328 -
2014-12-26 18:14:52 +00:00
sergei
ba61a9f95c * Fix bug #26370: A multi-dimensional variant array is "empty" when any of its dimensions has zero range, range of other dimensions does not matter.
git-svn-id: trunk@29324 -
2014-12-25 16:59:52 +00:00
svenbarth
27f398851b The assumptions of test tthlp22 have changed.
tests/test/tthlp22.pp:
  * this test fails no longer as Mode Delphi by default also contains modeswitch TypeHelpers
  * adjust program name for consistency

git-svn-id: trunk@29274 -
2014-12-12 17:20:13 +00:00
svenbarth
7b216d7fa6 Fix for Mantis #27120.
pdecobj.pas, parse_object_members:
  * also allow class fields for helper types

+ added tests

git-svn-id: trunk@29270 -
2014-12-12 13:57:43 +00:00
florian
dd967eb136 * handle records in iso mode properly if no tag-field is given
git-svn-id: trunk@29259 -
2014-12-11 19:21:13 +00:00
Jonas Maebe
cec82a1540 * translate placeholder code page numbers into actual code pages in
fpc_ansistr_to_widechararray(), so that CP_ACP/CP_OEM etc are properly
    handled (fixes assign/assignfile with non-ansi characters in source files
    that don't explicitly specify the code page)

git-svn-id: trunk@29218 -
2014-12-08 12:11:33 +00:00
pierre
437272a037 Add check that close on non-open files generate IOresult=103
git-svn-id: trunk@29201 -
2014-12-04 15:22:45 +00:00
sergei
3f2022cba7 + Commit test for bug #27044.
git-svn-id: trunk@29110 -
2014-11-22 17:36:36 +00:00
florian
7180d184c5 + implements TExtended80Rec, TDoubleRec, TSingleRec
+ test

git-svn-id: trunk@29084 -
2014-11-16 20:47:33 +00:00
Jonas Maebe
3355d0eea0 + jvm setstring test
git-svn-id: trunk@28827 -
2014-10-15 20:50:14 +00:00
Jonas Maebe
5a8c007b73 * added missing errorlevel checks for latest added tests
git-svn-id: trunk@28826 -
2014-10-15 20:50:10 +00:00
Jonas Maebe
d5188ba48a * fixed duplicate field name
git-svn-id: trunk@28819 -
2014-10-14 20:30:08 +00:00
Jonas Maebe
ff583bde6c * made setstring() a compiler intrinsic so it can set the compile-time
code page of ansistrings (mantis #26735)

git-svn-id: trunk@28813 -
2014-10-12 20:27:06 +00:00
nickysn
c279efc9a5 + added normalization and alignment test for HeapOrg and HeapEnd in the
taddint1.pp test

git-svn-id: trunk@28785 -
2014-10-07 14:02:47 +00:00
nickysn
2843194124 + added check for HeapOrg<=FreeList and HeapPtr<=HeapEnd in test ttheap1.pp
git-svn-id: trunk@28784 -
2014-10-07 13:30:34 +00:00
nickysn
445017fab4 + added a TP7 heap compatibility test
git-svn-id: trunk@28656 -
2014-09-14 12:01:09 +00:00
svenbarth
684c8842e7 Fix for Mantis #26599.
pgenutils.pas, check_generic_constraints:
  * correctly handle forward defs if the constraint is either a single IInterface/IUnknown or a TObject/class

+ added tests

git-svn-id: trunk@28601 -
2014-09-05 14:42:22 +00:00
nickysn
d553e4572a + added checks for HeapOrg and HeapEnd to the i8086 compact and large memory
layout tests

git-svn-id: trunk@28469 -
2014-08-19 16:59:54 +00:00
sergei
ff5410b152 + Expanded test also for qword->double and int32->single conversions.
git-svn-id: trunk@28311 -
2014-08-04 21:45:34 +00:00
sergei
586a9aafe8 * The test must have '.pp' extension, of course.
git-svn-id: trunk@28303 -
2014-08-03 00:16:09 +00:00
sergei
8910e2f74d + Added a test checking that conversion of 64-bit integers to double-precision floats depends on current rounding mode when integer has more than 53 bits set.
git-svn-id: trunk@28301 -
2014-08-02 22:42:47 +00:00
Jonas Maebe
2bc8afaa63 + support for calling a method via a block: we capture the method as a
procvar in the local state of the block, and then call it insde the
    generated invoke routine. We can't call it directly there, because
    due to visibility reasons it may not be accessible from a regular
    procedure (e.g. if it is a strict private method)

git-svn-id: branches/blocks@28234 -
2014-07-18 09:15:35 +00:00
Jonas Maebe
c730e16031 * changed the syntax for block procvars from "xxx is block" to
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
    uses for anonymous function references. The "cdecl;" indicates that this
    is for the C-variant of such references, which is what blocks are

git-svn-id: branches/blocks@28233 -
2014-07-18 09:15:29 +00:00
Jonas Maebe
bd09b88a5b + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
o blocks are implemented as a variation of procedure variables
   o declaration of a block variable: "test: procedure(c: char) is block;"
     (C equivalent: (void)(^test)(char c) )
   o the compiler automatically converts procedures/functions whose address
     is passed to a block parameter or assigned to a block variable into
     a "block". This consists of
    1) generating a block descriptor (containing the size of the "block
       literal" (see below) and the signature of the invocation function
       encoded as an Objective-C selector)
    2) generating a wrapper function around the original funcion (with C
       calling convention), that has an extra first hidden parameter
       (marked as vo_is_parentfp in the compiler) whose type is a pointer
       to the describing "block literal"
    3) generating the "block literal", which contains a pointer to an
       external variable indicating whether this block captures context or
       not, some flags (see compiler/blockutl.get_block_literal_flags for
       info), a pointer to the wrapper function and a pointer to the
       descriptor. In the future, it will also contain captured variables.
   o right now, only global procedures/functions can be converted to blocks
     (because they don't require state capturing). The next steps are (Object
     Pascal) methods (not Objective-C methods, because Objective-C method
     procvars don't exist) and finally nested functions
   o on Mac OS X, the functionality will only work on Mac OS X 10.7 and later,
     because we have to use the so-called "ABI.2010.3.16" to ensure that
     our blocks aren't called as variadic functions by the runtime (which
     came out after the Mac OS X 10.6 release)
   o while the currently implemented functionality does not require any
     library support at all, there's no use enabling it on other platforms
     because unless it has been confirmed to work with a blocks runtime,
     there's no point in using blocks (they're just somewhat bulky procvars
     right now). Enabling it on other platforms (in combination with the
     GNUStep Objective-C run time), should simply be a matter of adding
     the right {$linklib xxx} statement to rtl/inc/blockrtl.pp file, adding
     that file to Makefile.fpc for that platform and adding that platform
     to the compiler/systems.systems_blocks_supported set

git-svn-id: branches/blocks@28232 -
2014-07-18 09:15:22 +00:00
nickysn
6770301fe7 + added a normalized huge pointer comparison test
git-svn-id: trunk@28215 -
2014-07-13 13:07:01 +00:00
nickysn
ba1ee49b64 + added non-normalized huge pointer comparison test
git-svn-id: trunk@28213 -
2014-07-13 12:39:24 +00:00
nickysn
8604372da3 + implemented far pointer comparison operating only on the offset (+ added test)
git-svn-id: trunk@28179 -
2014-07-06 22:45:19 +00:00
sergei
94796e9e7e * Output divisor in all diagnostic messages, not just some of them.
git-svn-id: trunk@28172 -
2014-07-06 08:26:37 +00:00
nickysn
18246bd9ed + added tests for >, <, >= and <= with equal pointers in the thugeptr2.pp and
thugeptr2a.pp tests

git-svn-id: trunk@28168 -
2014-07-05 15:52:14 +00:00
nickysn
c8c842b857 + added tests for >, <, >= and <= with equal pointers in the tfarptr2.pp test
git-svn-id: trunk@28165 -
2014-07-05 15:15:23 +00:00
nickysn
5097b90e39 + enabled the huge pointer size test in the tptrsize.pp test
git-svn-id: trunk@28164 -
2014-07-05 10:30:55 +00:00
nickysn
6e9720e830 + added tests for huge pointer normalized and non-normalized equality comparison
git-svn-id: trunk@28163 -
2014-07-05 10:19:26 +00:00
nickysn
fda9cfea12 + extended test tfarptr2.pp with far pointers which are different, but point to
the same linear address

git-svn-id: trunk@28162 -
2014-07-05 10:01:45 +00:00
nickysn
5093c573dc + added huge pointer assignment and far->huge conversion tests
git-svn-id: trunk@28091 -
2014-06-27 16:56:02 +00:00
nickysn
82d393014b + added a test for the tiny memory layout
git-svn-id: trunk@28079 -
2014-06-26 17:38:38 +00:00
nickysn
835fb1d157 + added memory layout tests for the small and medium memory models
git-svn-id: trunk@28078 -
2014-06-26 17:30:32 +00:00
nickysn
57de15e071 + added checks for the Program Segment Prefix's relative position to the code
segment in the compact and large memory layout tests

git-svn-id: trunk@28074 -
2014-06-26 09:58:12 +00:00
nickysn
be0afd9625 + added checks for the pointer and procvar sizes in the compact and large memory
layout tests

git-svn-id: trunk@28073 -
2014-06-26 09:20:51 +00:00
nickysn
d00c67f9d3 * limit the heap to 16kb in the i8086 far data memory models for the dos unit
tests that execute a child process. Otherwise, by default, all DOS memory is
  reserved in these memory models, there's no DOS memory left for the child
  process and exec() fails.

git-svn-id: trunk@28061 -
2014-06-25 13:43:44 +00:00
nickysn
a9ddf18779 + call SwapVectors before and after Exec under FPC as well. SwapVectors is
implemented on two FPC platforms (go32v2 and msdos). On the platforms that
  don't need it, it does nothing, so it's safe to call on all platforms.

git-svn-id: trunk@28060 -
2014-06-25 13:35:11 +00:00
nickysn
3952f8830c + added test for the i8086 compact model memory layout
git-svn-id: trunk@28050 -
2014-06-24 19:48:37 +00:00
nickysn
57b233e724 + added test for the memory layout of the i8086 large memory model
git-svn-id: trunk@28040 -
2014-06-23 21:08:51 +00:00
Jonas Maebe
8634aa8ad2 * fixes for the support for overriding properties on the JVM target:
o only create an accessor wrapping the inherited accessor at a
     potentially lower visibility level if the overriding property
     itself does not specify a different accessor to use
   o simplified code
   o tests

git-svn-id: trunk@27954 -
2014-06-14 10:35:35 +00:00
Jonas Maebe
2075dc5a53 * support for raising the visibility of inherited properties on the JVM
target (generate new getters/setters with increased visibility that
    call the inherited ones, if necessary)

git-svn-id: trunk@27940 -
2014-06-12 11:08:44 +00:00
sergei
886159e73a * Renamed testdll2.pp into ttdllex1.pp so it falls into same chunk with ttdllexe.pp and can be located at runtime.
git-svn-id: trunk@27850 -
2014-06-04 12:30:35 +00:00
sergei
128cdd2a65 * Renamed testdll.pp into ttdlltes1.pp so it falls into same chunk with ttdlltest.pp and can be located at runtime.
git-svn-id: trunk@27849 -
2014-06-04 12:10:51 +00:00
sergei
bdb2993277 * Renamed tlib* tests so all file names of dependent tests differ only in last letter. This fixes failures caused by inability to locate dlls at runtime.
git-svn-id: trunk@27848 -
2014-06-04 11:53:07 +00:00
michael
6c7ab322a1 * Applied patch from Laco to fix bug ID #25939
git-svn-id: trunk@27846 -
2014-06-03 11:45:22 +00:00
florian
bb129a6d6c * renamed overloaded fma functions into functions encoding explicitly the type
git-svn-id: trunk@27766 -
2014-05-11 11:51:41 +00:00
Jonas Maebe
2075bf157e * insert JVM checkcast instructions when a voidpointer is implicitly
converted to an incompatible type

git-svn-id: trunk@27744 -
2014-05-10 12:47:34 +00:00
Jonas Maebe
675498a53e * javaa -> java
git-svn-id: trunk@27743 -
2014-05-10 12:47:31 +00:00
Jonas Maebe
20b8ade8ce * added readbarriers as counterparts for the writebarriers (see
"SMP BARRIER PAIRING"
    in https://www.kernel.org/doc/Documentation/memory-barriers.txt ), should
    fix sporadic crashes of the test

git-svn-id: trunk@27726 -
2014-05-03 16:16:17 +00:00
florian
8207e0ef22 + make use of vfnmsub*/vfmsub*/vfnmadd* instructions if possible
git-svn-id: trunk@27721 -
2014-05-02 21:07:46 +00:00
nickysn
8c86d64866 * fixed 'data structure too large' error in test tcall1.pp in the i8086 large
memory model

git-svn-id: trunk@27710 -
2014-05-01 18:27:01 +00:00
nickysn
4bbf2e8618 + enabled {$hugecode} for the test tcalcla1.pp in i8086 large memory model,
because in this model, the code of the test exceeds 64kb

git-svn-id: trunk@27699 -
2014-04-30 21:45:04 +00:00
Jonas Maebe
02ce2e6029 * moved to correct directory
git-svn-id: trunk@27695 -
2014-04-30 19:25:02 +00:00
Jonas Maebe
8ac4a770a9 * check whether file/text is assigned in erase/rename (mantis #25932)
git-svn-id: trunk@27694 -
2014-04-30 18:31:22 +00:00
florian
33602db802 * try to registers more cleverly during fma code generation
git-svn-id: trunk@27671 -
2014-04-26 18:11:13 +00:00
nickysn
c5badc8a7c * fixed test cg/tvec.pp for small CPUs
git-svn-id: trunk@27652 -
2014-04-25 12:12:51 +00:00
nickysn
2de6edc44e * skip the large mem move test (which requires 4MB of memory) in tmem.pp on 16
and 8-bit CPUs

git-svn-id: trunk@27649 -
2014-04-25 09:18:04 +00:00
pierre
d57d816744 powerpc64-aix C objects files added using gcc 4.8.1
git-svn-id: trunk@27585 -
2014-04-16 06:24:07 +00:00
florian
0a312a783e * avoid generation of avx code before the check if avx is supported
git-svn-id: trunk@27582 -
2014-04-14 18:18:29 +00:00
sergei
07e90aaa24 + Implemented IEEE 754-compliant checking for unordered results of floating-point compares on x86 targets. Mantis #9362.
git-svn-id: trunk@27581 -
2014-04-14 12:36:11 +00:00
florian
d88d644925 + support for FMA intrinsic: if there is no hardware support, the compiler throws an error.
Currently it is implemented only for x86-CPUs supporting the FMA extension. While it would
  be possible to implement it in software or simulate fma(<single>,<single>,<single>) using
  double operations, it makes no sense in my opinion to do so.

git-svn-id: trunk@27564 -
2014-04-13 19:21:54 +00:00
Jonas Maebe
4a0528399e * check all overloaded routines for mangled name conflicts on the JVM
platform, as different Pascal declarations are mapped to the same
    JVM representation

git-svn-id: trunk@27520 -
2014-04-10 21:07:14 +00:00
Jonas Maebe
3a5e675a2b * fixed typo in last change (javaa instead of java)
git-svn-id: trunk@27519 -
2014-04-10 21:07:09 +00:00
nickysn
a9cfd647ae + added i8086-msdos tests for interrupt procs, intr, getintvec and setintvec
git-svn-id: trunk@27503 -
2014-04-07 22:26:45 +00:00
nickysn
bf1e15fd39 + added another far pointer arithmetic test
git-svn-id: trunk@27490 -
2014-04-06 15:36:17 +00:00
nickysn
cef4092f3d - rm some unneeded assignments from the test
git-svn-id: trunk@27489 -
2014-04-06 15:27:53 +00:00
nickysn
a11c7fe476 + report the number of the failing test in the exit code
git-svn-id: trunk@27488 -
2014-04-06 15:15:22 +00:00
nickysn
cd90154b9c + added pointer const tests to the far pointer arithmetic test tfarptr3.pp
git-svn-id: trunk@27486 -
2014-04-06 15:11:49 +00:00
nickysn
8d1ed088c8 + implemented far pointer arithmetic (operating only on the offset, without
touching the segment)

git-svn-id: trunk@27485 -
2014-04-06 13:12:29 +00:00
Jonas Maebe
54964d92eb + forgot to commit, part of r26472
git-svn-id: trunk@27382 -
2014-03-30 16:55:03 +00:00
sergei
1744988962 * Modified behavior of CExtended type in overload selection: it is made more compatible to Extended than to Double and Single. Also an Extended parameter selects a CExtended overload (if available) instead of Double.
+ Test.

git-svn-id: trunk@27366 -
2014-03-30 07:31:58 +00:00
florian
775ac591df * fix test: fma support does not necessarily mean that there is avx2 support
git-svn-id: trunk@27294 -
2014-03-27 09:41:59 +00:00
florian
ff6afe27cd * enabled fma instruction as the compiler knows them since r27209
git-svn-id: trunk@27210 -
2014-03-20 20:08:58 +00:00
florian
5d57f38619 + functions for FMA and AVX2 detection
git-svn-id: trunk@27202 -
2014-03-20 15:47:51 +00:00
nickysn
1ef9a0509b - rm packset 1, because that's already the default in delphi mode
git-svn-id: trunk@27160 -
2014-03-16 15:32:35 +00:00
nickysn
015c7e951a * Changed the default packset setting to 1 and disabled the padding of 3-byte
sets to 4 bytes on 16 and 8-bit CPUs. This is compatible with Turbo Pascal 7
  and Delphi 1.

git-svn-id: trunk@27140 -
2014-03-14 23:51:14 +00:00
nickysn
19a39cde4a * 16-bit objpas.integer type fixes in Math.DivMod
git-svn-id: trunk@27052 -
2014-03-09 16:46:49 +00:00
nickysn
5ac193dfc3 * fixed test tbsx1.pp for a 16-bit objpas.integer type
git-svn-id: trunk@27050 -
2014-03-09 16:45:15 +00:00
florian
c9f7c7d88c + test for windows which tests if an .rc file can be really compiled into an .res file
git-svn-id: trunk@27042 -
2014-03-09 10:54:33 +00:00
florian
08a4e1efe1 * handle for ... in on arrays of constant correctly, resolves also #25838
+ tests

git-svn-id: trunk@27039 -
2014-03-09 09:03:22 +00:00
nickysn
30b1aa1d96 * document the known delphi xe3 64-bit test failures
git-svn-id: trunk@26903 -
2014-02-28 14:08:50 +00:00
Jonas Maebe
9315c121d4 - removed cwstring again, it's not needed and breaks compilation of the test
on non-Unix platforms

git-svn-id: trunk@26896 -
2014-02-27 11:54:48 +00:00
michael
7593696a03 * Fixed all tests to be D2009+ compatible
git-svn-id: trunk@26894 -
2014-02-27 09:07:56 +00:00
nickysn
888ecdaee4 * fixed the type conversions of the 'and' operator to be Delphi compatible. Fixes Mantis #25179
git-svn-id: trunk@26882 -
2014-02-25 18:06:29 +00:00
michael
9faea4e757 * Fixed test so the same result as in Delphi
git-svn-id: trunk@26877 -
2014-02-25 10:35:39 +00:00
michael
ff2b6a90d9 * Added tests for various strutils functions by Karl-Michael Schindler (bug ID 25756)
git-svn-id: trunk@26833 -
2014-02-22 12:40:31 +00:00
svenbarth
ddb78fefdc Add a modeswitch for type helpers as discussed in core on 24th October 2013. It is disabled by default in all modes (afterall type helper support in Delphi started only beginning with XE3)
+ globtype.pas: add new modeswitch to modeswitch enum and name array
* ptype.pas & pdecobj.pas: check for new modeswitch instead of modeswitch class
* ppu.pas: increase ppu version as we've added a new modeswitch which requires correctly compiled units

* adjusted tests to enabled the modeswitch when necessary
+ added three new tests that check for correct functionality of modeswitch typehelpers

git-svn-id: trunk@26796 -
2014-02-16 12:58:24 +00:00
florian
711c533573 * moved test because it tests a certain functionalty and was made solely to test strutils.IsWild
git-svn-id: trunk@26788 -
2014-02-15 15:32:50 +00:00
florian
5dcb59c2d4 * renamed test, resolves #25696
git-svn-id: trunk@26733 -
2014-02-08 19:21:08 +00:00
yury
78304dde66 * mipsel-android: Added C object files for tests.
git-svn-id: trunk@26710 -
2014-02-07 14:40:25 +00:00
sergei
a1dfaa54dd * Fixed exception handling in constructors of TP-style objects to correctly handle cases of statically allocated objects (must call destructor but do not free memory) and objects without destructor (must free memory if it was allocated dynamically).
+ Test extended.

git-svn-id: trunk@26676 -
2014-02-05 18:19:13 +00:00
sergei
a5d5ce8eb2 * TP-style object destructors do not need actual VMT in hidden parameter, a constant flag indicating need to free memory is sufficient.
* Destructor called from exception block in constructor must have this flag set in order to free memory.
+ Test.

git-svn-id: trunk@26656 -
2014-02-03 00:20:42 +00:00
florian
be17962748 * delete test file immediately after they were used, external tools might get into trouble trying deleting them due to the uncommon names
git-svn-id: trunk@26655 -
2014-02-02 19:10:42 +00:00
florian
ecdfe75841 * tests fail if dead values are optimized so disable dead value optimization for the tests
git-svn-id: trunk@26631 -
2014-01-30 19:44:12 +00:00
nickysn
1faf138667 + fixed mistyped call to BsfWord in test tbsx1.pp
git-svn-id: trunk@26594 -
2014-01-26 23:50:30 +00:00
florian
0e67ca6419 * fixed output of test if a failure happens
git-svn-id: trunk@26505 -
2014-01-18 12:08:02 +00:00
Jonas Maebe
a5653916e0 * convert array indices always to s32int, because that is the index type used
by java arrays (otherwise we may get unwanted sign extensions after
    performing e.g. an s16bit operation, see the test)

git-svn-id: trunk@26472 -
2014-01-15 20:36:52 +00:00
florian
b90db73fbc * fixed test
git-svn-id: trunk@26440 -
2014-01-12 20:17:59 +00:00