mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:26:13 +02:00
* also recognize scurrency as an "originally was a 64 bit value" in
try_make_mul32to64() * when inserting a 32x32->64 multiplication, change the typeconversions of the original nodes into internal type conversions, because they may have been currency (e.g., in case of an integer-to-currency conversion, which is performed via integer*currency(10000)) and since r21097 implicit conversions from currency to ordinal are no longer allowed git-svn-id: trunk@21112 -
This commit is contained in:
parent
7f96fee752
commit
06b17111da
@ -2487,11 +2487,11 @@ implementation
|
||||
result := false;
|
||||
if ((left.nodetype = typeconvn) and
|
||||
is_integer(ttypeconvnode(left).left.resultdef) and
|
||||
(not(torddef(ttypeconvnode(left).left.resultdef).ordtype in [u64bit,s64bit])) and
|
||||
(not(torddef(ttypeconvnode(left).left.resultdef).ordtype in [u64bit,s64bit,scurrency])) and
|
||||
(((right.nodetype = ordconstn) and canbe32bitint(tordconstnode(right).value)) or
|
||||
((right.nodetype = typeconvn) and
|
||||
is_integer(ttypeconvnode(right).left.resultdef) and
|
||||
not(torddef(ttypeconvnode(right).left.resultdef).ordtype in [u64bit,s64bit])) and
|
||||
not(torddef(ttypeconvnode(right).left.resultdef).ordtype in [u64bit,s64bit,scurrency])) and
|
||||
((is_signed(ttypeconvnode(left).left.resultdef) =
|
||||
is_signed(ttypeconvnode(right).left.resultdef)) or
|
||||
(is_signed(ttypeconvnode(left).left.resultdef) and
|
||||
@ -2510,13 +2510,13 @@ implementation
|
||||
end;
|
||||
if (is_signed(left.resultdef)) then
|
||||
begin
|
||||
inserttypeconv(left,s32inttype);
|
||||
inserttypeconv(right,s32inttype);
|
||||
inserttypeconv_internal(left,s32inttype);
|
||||
inserttypeconv_internal(right,s32inttype);
|
||||
end
|
||||
else
|
||||
begin
|
||||
inserttypeconv(left,u32inttype);
|
||||
inserttypeconv(right,u32inttype);
|
||||
inserttypeconv_internal(left,u32inttype);
|
||||
inserttypeconv_internal(right,u32inttype);
|
||||
end;
|
||||
firstpass(left);
|
||||
firstpass(right);
|
||||
|
Loading…
Reference in New Issue
Block a user