mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 20:32:20 +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
|
begin
|
||||||
result:=caddnode.create(muln,getcopy,cordconstnode.create(10000,resultdef,false));
|
result:=caddnode.create(muln,getcopy,cordconstnode.create(10000,resultdef,false));
|
||||||
include(result.flags,nf_is_currency);
|
include(result.flags,nf_is_currency);
|
||||||
|
include(taddnode(result).left.flags,nf_internal);
|
||||||
end
|
end
|
||||||
else if is_currency(left.resultdef) then
|
else if is_currency(left.resultdef) then
|
||||||
begin
|
begin
|
||||||
result:=cmoddivnode.create(divn,getcopy,cordconstnode.create(10000,resultdef,false));
|
result:=cmoddivnode.create(divn,getcopy,cordconstnode.create(10000,resultdef,false));
|
||||||
include(result.flags,nf_is_currency);
|
include(result.flags,nf_is_currency);
|
||||||
|
include(taddnode(result).left.flags,nf_internal);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2902,6 +2904,7 @@ implementation
|
|||||||
function ttypeconvnode.simplify(forinline : boolean): tnode;
|
function ttypeconvnode.simplify(forinline : boolean): tnode;
|
||||||
var
|
var
|
||||||
hp: tnode;
|
hp: tnode;
|
||||||
|
v: Tconstexprint;
|
||||||
{$ifndef CPUNO32BITOPS}
|
{$ifndef CPUNO32BITOPS}
|
||||||
foundsint: boolean;
|
foundsint: boolean;
|
||||||
{$endif not CPUNO32BITOPS}
|
{$endif not CPUNO32BITOPS}
|
||||||
@ -3088,6 +3091,15 @@ implementation
|
|||||||
result:=left;
|
result:=left;
|
||||||
left:=nil;
|
left:=nil;
|
||||||
exit;
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user