size does not fit in sizeint. This fixes a range check error during
compilation on small CPU targets where allowed array size is 64K, but
sizeint is 32K max.
round(comp) on platforms where currency and comp are handled using the FPU
o also fixes trunc(comp) and trunc(currency) compilation for x86 on LLVM
with -Oofastmath
* add missing removal of excess fpu precision typecasts for trunc/round
git-svn-id: trunk@47854 -
the frame of the caller rather than of the current routine, which could
cause e.g. stackframes to be missed in RTL helpers that are known to be
only called from run time error routines)
git-svn-id: trunk@44064 -
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 -
Allows compilation of compiler using -dDEBUG_NODE_XML
which will generate a NAME-node-dump.xml file for each
unit, program or library compiled,
containing a XML description of the nodes handled during
compilation of the unit, program or library.
git-svn-id: trunk@42271 -
sense as a function (the original input needed to be replaced by its
result to make any sense), and someone already mistakenly used it like that
in htypechk causing a bug/memory leak
git-svn-id: trunk@40729 -
transforming inc/dec to an addn/subn in case of range checking) from
triggering the transformation logic for accessing nested variables
on LLVM/JVM multiple times
* also prevent it from triggering errors during inlining, in case a
parameter to a nested routine gets replaced by a local variable
from a parent routine (in that case, it does not need to be
accessed via the parentfpstruct, as we are being inlined in the
parent) -> don't duplicate the check from pass_typecheck in pass_1,
but check whether it needs to be accessed via the parentfpstruct
by verifying that tloadnode.left is assigned (which pass_typecheck
will ensure if needed)
git-svn-id: trunk@40630 -
* disable matching volatile references in the assembler optimisers, so they
can't be removed (more conservative than needed, but better than removing
too many)
o the CSE optimiser will ignore them by default, because they're an unknown
inline node for it
* also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
right place
git-svn-id: trunk@40465 -
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 -