Commit Graph

2475 Commits

Author SHA1 Message Date
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
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
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
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
yury
ff3d7862d6 * Erase the temp file.
git-svn-id: trunk@39868 -
2018-10-06 15:10:24 +00:00
yury
ddb4e37104 * Define slowcpu for android.
git-svn-id: trunk@39867 -
2018-10-06 13:58:05 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
svenbarth
bf91991bae * fix for Mantis #34332: allow 2 parameter form of Copy also for ShortString variables
+ added test

git-svn-id: trunk@39802 -
2018-09-25 19:10:06 +00:00
svenbarth
9a99ab9dda * fix for Mantis #34287: correctly handle "inherited method" calls if "method" is a generic (no matter if it's mode Delphi or not)
+ added test

git-svn-id: trunk@39787 -
2018-09-21 15:16:18 +00:00
Jeppe Johansen
74a7963d58 Redo overflow checking code.
Fix shift operators in case of unsigned subreg operations. There should be no sign extension here.
Add some unittest implementations that test stack execution and writing to readonly constants.

git-svn-id: branches/laksen/riscv_new@39762 -
2018-09-16 18:37:59 +00:00
svenbarth
00663728b5 * fix for Mantis #34239: the parent VMT is an indirect reference due to the changes for dynamic packages for quite some time already, so handle that accordingly
+ added test

git-svn-id: trunk@39715 -
2018-09-08 14:56:09 +00:00
svenbarth
c337575f69 * fix test 26481: it tests for something different than the incorrect type parameters and in fact the need to fix this highlights the need for the previous changes
git-svn-id: trunk@39704 -
2018-09-02 16:20:32 +00:00
florian
6b9f52b4f2 + couple of { %OPT=-CE } to tests added
git-svn-id: branches/laksen/riscv_new@39641 -
2018-08-19 12:42:26 +00:00
florian
9e9c2c02ed * test fails now if it causes an exception
git-svn-id: trunk@39624 -
2018-08-17 19:49:40 +00:00
florian
a825a66d01 * IntPower inverts the base first for negative exponents and multiplies then, resolves #34124
git-svn-id: trunk@39621 -
2018-08-16 20:45:35 +00:00
svenbarth
38ffcff3aa * fix program name of the test
git-svn-id: trunk@39606 -
2018-08-12 07:21:58 +00:00
svenbarth
32c307e9ce * fix for Mantis #34021: if one of the two operators is an array constructor try to use an operator overload for that first before converting it to a set
+ added tests

git-svn-id: trunk@39554 -
2018-08-03 15:24:59 +00:00
florian
93c5eae528 * accept dereferences in generics definitions, resolves #33700 properly
git-svn-id: trunk@39447 -
2018-07-13 21:00:33 +00:00
florian
96e92527e9 * constant folding of not must check if the deftype is really an orddef, resolves #33696
git-svn-id: trunk@39406 -
2018-07-07 14:17:41 +00:00
svenbarth
8df686ed2e * Mantis #33898 is fixed by the fix for String type helpers as well
git-svn-id: trunk@39401 -
2018-07-06 15:57:23 +00:00
svenbarth
ec374c196e * Mantis #33840 is fixed by the fix for String type helpers
git-svn-id: trunk@39400 -
2018-07-06 15:57:17 +00:00
florian
b70fc52874 * patch by Ondrej Pokorny: the stored property modifier does not delete the inherited default value anymore, resolves #33564
git-svn-id: trunk@39357 -
2018-07-01 20:11:13 +00:00
florian
eb61923762 * patch by Ondrej Pokorny: The nodefault is now inherited from parent class, resolves #33563
git-svn-id: trunk@39356 -
2018-07-01 19:01:41 +00:00
svenbarth
1c9ea4c120 * enable modeswitch arrayoperators for the tests
git-svn-id: trunk@39263 -
2018-06-20 19:54:09 +00:00
florian
400861a907 * fixed TBits.NotBits, it is just an Xor operation, resolves #33706
git-svn-id: trunk@39243 -
2018-06-19 20:38:15 +00:00
svenbarth
c495f10b29 + added tests for Mantis #33839 which is now fixed with the recent changes
git-svn-id: trunk@39234 -
2018-06-15 13:49:33 +00:00
pierre
7268c86602 Fix for msdos target: Use CodePointer where required
git-svn-id: trunk@39173 -
2018-06-05 11:31:42 +00:00
florian
3b3e33d863 + correctly set var state of addr and frame in raise statements, resolves #33818
git-svn-id: trunk@39162 -
2018-06-03 09:31:19 +00:00
svenbarth
199b5809a3 * optimize "dynarr := dynarr + [elem]" to "Insert(elem, dynarr, High(SizeInt))" and "dynarr := [elem] + dynarr" to "Insert(elem, dynarr, 0)" (we need to do this in the typecheck of taddnode as otherwise the array constructor is already converted)
+ added test
* adjusted test for Mantis #30463 as p1 triggers the optimization as well

git-svn-id: trunk@39119 -
2018-05-25 16:03:56 +00:00
svenbarth
b94a8c93a5 * test (for Mantis #5516; 3531 is the old bug ID) is valid now that we have dynamic array initializers
git-svn-id: trunk@39105 -
2018-05-24 19:56:35 +00:00
pierre
f28ab34f06 unicodeducet must appear before fpwidestring to set current_collation at startup
git-svn-id: trunk@38962 -
2018-05-09 23:11:48 +00:00
svenbarth
d8dd8d9978 + add test for Mantis #33635 which was fixed by r38856
git-svn-id: trunk@38857 -
2018-04-27 15:23:46 +00:00
pierre
d4ed6b0416 Restrict test to win32, as it is already i386 specific and uses Windows unit
git-svn-id: trunk@38771 -
2018-04-14 15:45:57 +00:00
pierre
3ce913f959 Remove explicit far modifier to fix msdos compilation and add error_count variable
git-svn-id: trunk@38766 -
2018-04-13 22:20:25 +00:00
pierre
ab7fb33d67 Restore removed ifdef UNIX around iosxwstr/cwstring unit loading
git-svn-id: trunk@38763 -
2018-04-13 06:22:21 +00:00
pierre
bf7cba67e0 Re-add codepage specifier removed by error
git-svn-id: trunk@38762 -
2018-04-12 22:01:04 +00:00
pierre
82624ba4cd Fix errors in last commits that prevent compilation
git-svn-id: trunk@38759 -
2018-04-12 21:26:12 +00:00
pierre
95e609cc56 Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets
git-svn-id: trunk@38756 -
2018-04-12 20:36:31 +00:00
pierre
c9f15c906e Add units required for wide strings support for go32v2 target
git-svn-id: trunk@38740 -
2018-04-12 12:53:20 +00:00
pierre
980df21fee Add fpwidestring and unicodeducet in uses clause for go32v2 target
git-svn-id: trunk@38735 -
2018-04-12 09:58:13 +00:00
Jonas Maebe
1f9d518c57 * support for non-ASCII widechar constants (mantis #31605)
* also improved type checking for converting constant strings to integers
    in MacPas mode

git-svn-id: trunk@38730 -
2018-04-10 19:24:15 +00:00
Jonas Maebe
2eeda5d06f * added test that already works (mantis #33205)
git-svn-id: trunk@38729 -
2018-04-10 18:39:19 +00:00
Jonas Maebe
cb7730a423 * fixed execution order of implicit finalization and class destructors: first
the latter, then the former

git-svn-id: trunk@38716 -
2018-04-08 15:41:00 +00:00
florian
c46cbc8411 * do not issue a hint of compiler procs are not inlined, resolves #33515
git-svn-id: trunk@38675 -
2018-04-03 21:39:47 +00:00
pierre
b8cfaeda08 Fix compilation failure for Windows targets
git-svn-id: trunk@38666 -
2018-04-03 09:13:19 +00:00
florian
25c5ee2fc3 * patch by J. Gareth Moreton to fix vectorcall (no effect) for linux,
resolves #33184 and #33542

git-svn-id: trunk@38663 -
2018-04-02 21:14:26 +00:00
Jonas Maebe
4da6039f40 * simplify empty-dynamic-string-to-pointer (non-p(wide)char) type conversions
so that they cannot result in "cmp const, const" at the assembler level
    (mantis #33548)

git-svn-id: trunk@38662 -
2018-04-02 18:35:00 +00:00
florian
b2825f2467 * scale constants if possible before currency multiplications to avoid overflows, resolves #33439
git-svn-id: trunk@38555 -
2018-03-17 21:33:07 +00:00
florian
1bc322c218 * allow generic parameters as array range, resolves #33414
git-svn-id: trunk@38532 -
2018-03-15 21:45:23 +00:00
florian
3e7af376fe * fix issue #32539 and #20551 by some ugly hack
git-svn-id: trunk@38531 -
2018-03-15 20:37:50 +00:00
pierre
4cf1ac209a Add %skiptarget=$nothread to tests using threads
git-svn-id: trunk@38528 -
2018-03-15 09:05:26 +00:00
pierre
1287eac54a Update type of mem variable after DoMem change
git-svn-id: trunk@38525 -
2018-03-14 22:02:45 +00:00
pierre
cc22913a4c Modify DoMem parameter type to SizeUInt and adapt tests using this function, to avoid run time errors with range check
git-svn-id: trunk@38521 -
2018-03-13 21:59:58 +00:00
florian
b9417cc51e * missing skiplabel added, resolves #33423
git-svn-id: trunk@38520 -
2018-03-13 18:45:32 +00:00
florian
a66016026b * handle bitpacked booleans more efficiently
git-svn-id: trunk@38509 -
2018-03-12 22:05:34 +00:00
florian
c230f81719 + support for <dyn. array>+<dyn. array>, resolves #30463
git-svn-id: trunk@38406 -
2018-03-04 16:12:43 +00:00
florian
e523865b07 * do not take the size of an open array, resolves #33230
git-svn-id: trunk@38366 -
2018-02-27 21:08:07 +00:00
florian
72efa1aa50 + test (worked already)
git-svn-id: trunk@38349 -
2018-02-25 20:04:57 +00:00
florian
14cb60e479 * set an owner for open array defs being created in property declarations, resolves #25769
git-svn-id: trunk@38348 -
2018-02-25 17:36:34 +00:00
florian
7d35ced2d9 + support {$message info ...}, resolves #30654
+ test

git-svn-id: trunk@38346 -
2018-02-25 15:50:58 +00:00
florian
808131a7d6 + forgotten test
git-svn-id: trunk@38342 -
2018-02-25 15:34:11 +00:00
florian
bf7a0c491e * test works only well if the constants have the same type as the operands of mod
git-svn-id: trunk@38336 -
2018-02-24 23:13:29 +00:00
florian
8a2cf56d51 * fixed operator mod for floats as proposed by wp in #33167, resolves #33167
git-svn-id: trunk@38332 -
2018-02-24 18:23:06 +00:00
florian
c671683e80 + patch by Denis Kozlov to add date/time tokens: %DATEYEAR%, %DATEMONTH%, %DATEDAY%, %TIMEHOUR%, %TIMEMINUTE%, %TIMESECOND%
+ test

git-svn-id: trunk@38329 -
2018-02-24 12:50:55 +00:00
florian
048c2c09fd * shorten interface wrapper names if needed, resolves #33069
git-svn-id: trunk@38319 -
2018-02-22 21:55:07 +00:00
florian
1d6e0743aa * fix test
git-svn-id: trunk@38317 -
2018-02-22 20:16:34 +00:00
florian
d0dd3bd74e * patch by Christo Crause to support ~ in att assembler
* allow -128 to 255 as a constant for instructions taking a byte sized constants (this is also what GNU As accepts), resolves #32039

git-svn-id: trunk@38316 -
2018-02-22 20:14:56 +00:00
florian
d16a22e42b * remove type case when loading constant in tattreader.BuildConstantOperand, resolves #33202, should not hurt other targets
git-svn-id: trunk@38307 -
2018-02-21 20:24:10 +00:00
florian
8731854165 * test code for avr assembler by Christo Crause
* fix size of val field in TOprRec for avr, resolves #32946

git-svn-id: trunk@38291 -
2018-02-19 21:23:28 +00:00
florian
4cb9ad7e01 * patch (indention adapted) by Christo Crause to check avr inline assembler, resolves also #32261
git-svn-id: trunk@38286 -
2018-02-18 21:58:04 +00:00
florian
c3a0a4e252 + support fmrrd/fmdrr, resolves #32398
git-svn-id: trunk@38270 -
2018-02-17 16:32:11 +00:00
florian
4d63945b8d + handle also STATUS_FLOAT_MULTIPLE_FAULTS, resolves #32822
git-svn-id: trunk@38269 -
2018-02-17 16:16:16 +00:00
florian
b421ed0db1 * fixed TranslateMxcsr
+ correctly handle sse exceptions on i386, resolves #32671
+ test

git-svn-id: trunk@38268 -
2018-02-17 15:40:49 +00:00
florian
5eb59196d5 * remove sequential moves to the same register
+ test

git-svn-id: trunk@38267 -
2018-02-17 12:45:17 +00:00
florian
15bdce0a6a * new test
git-svn-id: trunk@38262 -
2018-02-16 21:21:25 +00:00
florian
6b5a514148 * based on a patch by Christo Crause: in finalizeavrcode, ignore assembler breq statements taking an absolute value, resolves #32109
git-svn-id: trunk@38089 -
2018-01-31 18:38:33 +00:00
florian
10516f21f8 * patch by Christo Crause to resolve #33098: AVR - LDS assembler instruction with absolute address gives compiler error
git-svn-id: trunk@38082 -
2018-01-30 20:22:42 +00:00
florian
796eb542be * LDD/STD need always an offset, resolves #33086
git-svn-id: trunk@38072 -
2018-01-28 21:06:13 +00:00
florian
92e616e30c * error happens only with optimization
git-svn-id: trunk@38071 -
2018-01-28 14:41:57 +00:00
florian
10ea652493 * fix for #32576
+ test case

git-svn-id: trunk@38069 -
2018-01-28 13:26:49 +00:00
florian
52aa40c3b0 * remove explicit cast to int64 to avoid an internalerror 200706094, resolves #33004
git-svn-id: trunk@37946 -
2018-01-11 21:02:39 +00:00
Jonas Maebe
5f7d3e16f5 * increase comment nesting level when "(*" is followed by another '*'
(mantis #32019)

git-svn-id: trunk@37935 -
2018-01-07 21:05:50 +00:00
Jonas Maebe
a2217cedd5 * evaluate the lower and upper bounds of for-loops in ISO mode using the
ISO-defined range type, instead of using the type of the iteration
    variable (mantis #24318)

git-svn-id: trunk@37934 -
2018-01-07 18:51:53 +00:00
Jonas Maebe
0f0bdabb89 * if an absolute typeconversion changes the size, make the source not
regable. Normally this is done when the absolute typeconversion node
    gets created, but the size can sometimes still change afterwards (e.g.
    when removing superfluous 64 bit type conversions) (mantis #32160)

git-svn-id: trunk@37930 -
2018-01-07 15:37:23 +00:00
Jonas Maebe
53bef8d202 * fixed calculation of high parameter for arrays with non-integer bounds
(mantis #32645)

git-svn-id: trunk@37928 -
2018-01-07 13:01:14 +00:00
Jonas Maebe
ae087b92d7 * when creating a unique type alias for an object, class or interface,
create a child object/class/interface instead of a copy of the original.
    This fixes override/inheritance checks, and is also Delphi-compatible

git-svn-id: trunk@37927 -
2018-01-07 12:25:16 +00:00
Jonas Maebe
2919d97f91 * support asssigning @class.classmethod to a procvar of object in FPC modes
(mantis #14103)

git-svn-id: trunk@37925 -
2018-01-06 17:47:44 +00:00
Jonas Maebe
1934285c20 * don't convert "int64(sint32) * cardinal_const" into a 32x32->64
multiplication (mantis #32046)

git-svn-id: trunk@37921 -
2018-01-06 13:44:03 +00:00
florian
273045c295 * use the first element of the filrec._private array to track eof for typed files in iso mode (this will not hurt as iso mode does not specify the _private field), resolves #32938
git-svn-id: trunk@37915 -
2018-01-05 22:10:39 +00:00
Jonas Maebe
8cfe7e0a0c * when creating a realconstn, cast the value to the specified type
(mantis #25121)
   o note that this means that single_const1/single_const2 will now be rounded
     to single, instead of staying the at maximum precision
   o fixed FahrenheitToCelcius() to handle this change correctly

git-svn-id: trunk@37911 -
2018-01-04 20:51:36 +00:00
Jonas Maebe
c0b0fa9c0b * change the type of the -gt uninitialised result of ansistring functions to
rawbytestring so the compiler does not try to convert it to the declared
    string type of the function result, as this may not be available
    (mantis #32510)

git-svn-id: trunk@37889 -
2018-01-01 18:04:13 +00:00
Jonas Maebe
1b66995754 * factored out check to determine whether a variable can be subscripted in
inline assembly, and fixed check after r35959 (mantis #32318)
   o can also subscript parameters passed by value on the stack
   o can also subscript local variables, the parameters passed by reference
     that are subsequently copied into a local

git-svn-id: trunk@37886 -
2018-01-01 14:29:21 +00:00
Jonas Maebe
dcac6b9c6f * disallow passing a dynarray(niln/pointerconstn) as an open array
(mantis #31273)

git-svn-id: trunk@37885 -
2017-12-31 15:18:40 +00:00