mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00
* m68k/n68kadd.pas, t68kaddnode.second_cmpboolean:
don't use "location.loc" if second_pass was not called on the node yet, but "expectloc" * added test git-svn-id: trunk@22789 -
This commit is contained in:
parent
b6eac7a31b
commit
5bb0e5992b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9663,6 +9663,7 @@ tests/tbs/tb0583.pp svneol=native#text/plain
|
||||
tests/tbs/tb0583a.pp svneol=native#text/plain
|
||||
tests/tbs/tb0584.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0585.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0586.pp svneol=native#text/pascal
|
||||
tests/tbs/tb205.pp svneol=native#text/plain
|
||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||
|
@ -386,6 +386,7 @@ implementation
|
||||
otl,ofl : tasmlabel;
|
||||
begin
|
||||
// writeln('second_cmpboolean');
|
||||
{ ToDo : add support for pasbool64 and bool64bit }
|
||||
if (torddef(left.resultdef).ordtype in [pasbool8,bool8bit]) or
|
||||
(torddef(right.resultdef).ordtype in [pasbool8,bool8bit]) then
|
||||
cgsize:=OS_8
|
||||
@ -402,7 +403,7 @@ implementation
|
||||
if left.nodetype in [ordconstn,realconstn] then
|
||||
swapleftright;
|
||||
|
||||
isjump:=(left.location.loc=LOC_JUMP);
|
||||
isjump:=(left.expectloc=LOC_JUMP);
|
||||
if isjump then
|
||||
begin
|
||||
otl:=current_procinfo.CurrTrueLabel;
|
||||
@ -422,7 +423,7 @@ implementation
|
||||
current_procinfo.CurrFalseLabel:=ofl;
|
||||
end;
|
||||
|
||||
isjump:=(right.location.loc=LOC_JUMP);
|
||||
isjump:=(right.expectloc=LOC_JUMP);
|
||||
if isjump then
|
||||
begin
|
||||
otl:=current_procinfo.CurrTrueLabel;
|
||||
|
18
tests/tbs/tb0586.pp
Normal file
18
tests/tbs/tb0586.pp
Normal file
@ -0,0 +1,18 @@
|
||||
{ %NORUN }
|
||||
|
||||
program tb0586;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
procedure Test;
|
||||
var
|
||||
a, b: Boolean;
|
||||
obj: TObject;
|
||||
begin
|
||||
if assigned(obj)<>(a=b) then
|
||||
;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user