mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
+ 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:
parent
e56d239a00
commit
7ef191021f
@ -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;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user