mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 14:48:47 +02:00
* 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:
parent
24f4adf657
commit
99b4389297
@ -2493,23 +2493,12 @@ implementation
|
||||
case n.nodetype of
|
||||
subn,orn,xorn:
|
||||
begin
|
||||
{ nf_internal is set by taddnode.typecheckpass in }
|
||||
{ case the arguments of this subn were u32bit, but }
|
||||
{ upcasted to s64bit for calculation correctness }
|
||||
{ (normally only needed when range checking, but }
|
||||
{ also done otherwise so there is no difference }
|
||||
{ in overload choosing etc between $r+ and $r-) }
|
||||
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);
|
||||
{ the result could become negative in this case }
|
||||
if n.nodetype=subn then
|
||||
gotsint:=true;
|
||||
result:=
|
||||
docheckremove64bittypeconvs(tbinarynode(n).left) and
|
||||
docheckremove64bittypeconvs(tbinarynode(n).right);
|
||||
end;
|
||||
addn,muln,divn,modn,andn:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user