Commit Graph

2283 Commits

Author SHA1 Message Date
florian
bce70a5105 * test only a limited grid of surrogate pairs to avoid that tests run longer
than all other tests together when testing with -j

git-svn-id: branches/tg74/avx512@42646 -
2019-08-11 16:03:34 +00:00
Jonas Maebe
46afcbb362 * an incomplete case statement is not an error in ISO Pascal (mantis #35910)
* give a compile-time error in ISO/Extended Pascal if the compiler can prove
    the case selector value is not handled, and a warning in other modes
    (mantis #35915)
   o trigger the case node simplification at the end of the case node typecheck
     pass, like for other nodes

git-svn-id: trunk@42574 -
2019-08-03 13:47:27 +00:00
svenbarth
811d39d995 * correctly align the stream on targets that require proper alignment
git-svn-id: trunk@42522 -
2019-07-28 19:50:33 +00:00
florian
23585ded15 * fix access to ParamFlags of the tkMethod branch of type data for CPUs requiring proper alignment
git-svn-id: trunk@42511 -
2019-07-28 11:55:19 +00:00
svenbarth
5313f6e9af * fix Currency comparison... again...
git-svn-id: trunk@42490 -
2019-07-24 20:32:22 +00:00
svenbarth
0c27ea83be * we halt if the currency values are *not* equal, not if they're equal... m(
git-svn-id: trunk@42487 -
2019-07-23 20:53:50 +00:00
svenbarth
e97a2cb03e * tests with Delphi showed that an attribute class must explicitely declare a parameterless constructor if it should be used, cause TCustomAttribute.Create is private
Note: this also means that TCustomAttribute itself can not be used as an attribute
* adjusted existing tests
+ added test

git-svn-id: trunk@42471 -
2019-07-20 20:03:38 +00:00
svenbarth
c282f21b1b * don't bother finding the correct constructor if the attribute isn't a TCustomAttribute descendant anyway; simply skip the parameters in that case
+ added tests

git-svn-id: trunk@42470 -
2019-07-20 19:46:03 +00:00
svenbarth
4d6844e731 * fix test on systems where Currency is calculated using floating point types
git-svn-id: trunk@42458 -
2019-07-19 15:55:25 +00:00
svenbarth
87458a065c * allow use of multiple, comma separated attributes as Delphi allows that as well
+ added test

git-svn-id: trunk@42409 -
2019-07-12 22:08:14 +00:00
svenbarth
404b465c33 * allow custom attributes for all type declarations that are not a simple alias
+ added tests

git-svn-id: trunk@42405 -
2019-07-12 22:08:00 +00:00
svenbarth
a72553eea2 * disable [...] syntax for procedure directives if modeswitch "prefixed attributes" is enabled; they conflict otherwise and it's not easily resolveable
+ added test

git-svn-id: trunk@42402 -
2019-07-12 22:07:50 +00:00
svenbarth
b945e66e28 * store attribute information in PPU; this is less important for the compiler, but more for e.g. Lazarus when dealing with binary only units
* increase ppu version
+ added test
* adjust ppudump to handle attributes as well
ToDo: output parameter nodes as well

git-svn-id: trunk@42401 -
2019-07-12 22:07:46 +00:00
svenbarth
71fa4d1fe2 * the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
+ added test

git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
c214648224 + add a test for overloaded attribute constructors
git-svn-id: trunk@42380 -
2019-07-12 22:06:28 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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