+ 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;
var
unsigned : boolean;
begin
result:=inherited pass_1;
{ handling boolean expressions }
if not(assigned(result)) and
(
not(is_boolean(left.resultdef)) or
not(is_boolean(right.resultdef)) or
is_dynamic_array(left.resultdef)
) then
expectloc:=LOC_FLAGS;
if not(assigned(result)) then
begin
unsigned:=not(is_signed(left.resultdef)) or
not(is_signed(right.resultdef));
if is_64bit(left.resultdef) and
((nodetype in [equaln,unequaln]) or
(unsigned and (nodetype in [ltn,lten,gtn,gten]))
) then
expectloc:=LOC_FLAGS;
end;
end;

View File

@ -186,6 +186,8 @@ implementation
logsecond(p.nodetype,false);
if (not codegenerror) then
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
Comment(V_Warning,'Location not set in secondpass: '+nodetype2str[p.nodetype]);
end;