mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:09:10 +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;
|
result := false;
|
||||||
if ((left.nodetype = typeconvn) and
|
if ((left.nodetype = typeconvn) and
|
||||||
is_integer(ttypeconvnode(left).left.resultdef) 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 = ordconstn) and canbe32bitint(tordconstnode(right).value)) or
|
||||||
((right.nodetype = typeconvn) and
|
((right.nodetype = typeconvn) and
|
||||||
is_integer(ttypeconvnode(right).left.resultdef) 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(left).left.resultdef) =
|
||||||
is_signed(ttypeconvnode(right).left.resultdef)) or
|
is_signed(ttypeconvnode(right).left.resultdef)) or
|
||||||
(is_signed(ttypeconvnode(left).left.resultdef) and
|
(is_signed(ttypeconvnode(left).left.resultdef) and
|
||||||
@ -2510,13 +2510,13 @@ implementation
|
|||||||
end;
|
end;
|
||||||
if (is_signed(left.resultdef)) then
|
if (is_signed(left.resultdef)) then
|
||||||
begin
|
begin
|
||||||
inserttypeconv(left,s32inttype);
|
inserttypeconv_internal(left,s32inttype);
|
||||||
inserttypeconv(right,s32inttype);
|
inserttypeconv_internal(right,s32inttype);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
inserttypeconv(left,u32inttype);
|
inserttypeconv_internal(left,u32inttype);
|
||||||
inserttypeconv(right,u32inttype);
|
inserttypeconv_internal(right,u32inttype);
|
||||||
end;
|
end;
|
||||||
firstpass(left);
|
firstpass(left);
|
||||||
firstpass(right);
|
firstpass(right);
|
||||||
|
Loading…
Reference in New Issue
Block a user