mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 14:27:59 +02:00
--- Merging r44055 into '.':
U compiler/ncnv.pas --- Recording mergeinfo for merge of r44055 into '.': U . --- Merging r44098 into '.': G compiler/ncnv.pas --- Recording mergeinfo for merge of r44098 into '.': G . --- Merging r44099 into '.': G compiler/ncnv.pas --- Recording mergeinfo for merge of r44099 into '.': G . # revisions: 44055,44098,44099 git-svn-id: branches/fixes_3_2@44223 -
This commit is contained in:
parent
fd191a9d57
commit
8172b79be1
@ -1491,11 +1491,13 @@ implementation
|
||||
begin
|
||||
result:=caddnode.create(muln,getcopy,cordconstnode.create(10000,resultdef,false));
|
||||
include(result.flags,nf_is_currency);
|
||||
include(taddnode(result).left.flags,nf_internal);
|
||||
end
|
||||
else if is_currency(left.resultdef) then
|
||||
begin
|
||||
result:=cmoddivnode.create(divn,getcopy,cordconstnode.create(10000,resultdef,false));
|
||||
include(result.flags,nf_is_currency);
|
||||
include(taddnode(result).left.flags,nf_internal);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -2902,6 +2904,7 @@ implementation
|
||||
function ttypeconvnode.simplify(forinline : boolean): tnode;
|
||||
var
|
||||
hp: tnode;
|
||||
v: Tconstexprint;
|
||||
{$ifndef CPUNO32BITOPS}
|
||||
foundsint: boolean;
|
||||
{$endif not CPUNO32BITOPS}
|
||||
@ -3088,6 +3091,15 @@ implementation
|
||||
result:=left;
|
||||
left:=nil;
|
||||
exit;
|
||||
end
|
||||
else if (convtype=tc_int_2_int) and
|
||||
is_currency(resultdef) then
|
||||
begin
|
||||
v:=tordconstnode(left).value;
|
||||
if not(nf_internal in flags) and not(is_currency(left.resultdef)) then
|
||||
v:=v*10000;
|
||||
result:=cordconstnode.create(v,resultdef,false);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user