* fixed tbs/tb0607 for 64 bit targets: there the nf_internal flag isn't set

for cardinal-cardinal. Now treat the result of any sub node as potentially
    negative.

git-svn-id: trunk@27971 -
This commit is contained in:
Jonas Maebe 2014-06-15 15:26:56 +00:00
parent 24f4adf657
commit 99b4389297

View File

@ -2493,23 +2493,12 @@ implementation
case n.nodetype of case n.nodetype of
subn,orn,xorn: subn,orn,xorn:
begin begin
{ nf_internal is set by taddnode.typecheckpass in } { the result could become negative in this case }
{ case the arguments of this subn were u32bit, but } if n.nodetype=subn then
{ upcasted to s64bit for calculation correctness } gotsint:=true;
{ (normally only needed when range checking, but } result:=
{ also done otherwise so there is no difference } docheckremove64bittypeconvs(tbinarynode(n).left) and
{ in overload choosing etc between $r+ and $r-) } docheckremove64bittypeconvs(tbinarynode(n).right);
if (nf_internal in n.flags) then
begin
result:=true;
{ the result could become negative in this case }
if n.nodetype=subn then
gotsint:=true
end
else
result:=
docheckremove64bittypeconvs(tbinarynode(n).left) and
docheckremove64bittypeconvs(tbinarynode(n).right);
end; end;
addn,muln,divn,modn,andn: addn,muln,divn,modn,andn:
begin begin