+ check for location.loc<>expectloc in extdebug mode

* set expectloc properly for add nodes on arm

git-svn-id: trunk@10536 -
This commit is contained in:
florian 2008-03-23 10:18:33 +00:00
parent e56d239a00
commit 7ef191021f
2 changed files with 15 additions and 8 deletions

View File

@ -301,17 +301,22 @@ interface
function tarmaddnode.pass_1 : tnode; function tarmaddnode.pass_1 : tnode;
var
unsigned : boolean;
begin begin
result:=inherited pass_1; result:=inherited pass_1;
{ handling boolean expressions } if not(assigned(result)) then
if not(assigned(result)) and begin
( unsigned:=not(is_signed(left.resultdef)) or
not(is_boolean(left.resultdef)) or not(is_signed(right.resultdef));
not(is_boolean(right.resultdef)) or
is_dynamic_array(left.resultdef) if is_64bit(left.resultdef) and
) then ((nodetype in [equaln,unequaln]) or
expectloc:=LOC_FLAGS; (unsigned and (nodetype in [ltn,lten,gtn,gten]))
) then
expectloc:=LOC_FLAGS;
end;
end; end;

View File

@ -186,6 +186,8 @@ implementation
logsecond(p.nodetype,false); logsecond(p.nodetype,false);
if (not codegenerror) then if (not codegenerror) then
begin begin
if (p.location.loc<>p.expectloc) then
Comment(V_Warning,'Location not equal to expectloc: '+nodetype2str[p.nodetype]);
if (p.location.loc=LOC_INVALID) then if (p.location.loc=LOC_INVALID) then
Comment(V_Warning,'Location not set in secondpass: '+nodetype2str[p.nodetype]); Comment(V_Warning,'Location not set in secondpass: '+nodetype2str[p.nodetype]);
end; end;