Browse Source

* set expectloc correctly for procvardef comparisons with nil for small CPUs

git-svn-id: branches/z80@45043 -
nickysn 5 years ago
parent
commit
96a714b20e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/nadd.pas

+ 5 - 1
compiler/nadd.pas

@@ -4180,7 +4180,11 @@ implementation
          else if ((ld.typ=procvardef) and (rt=niln)) or
                  ((rd.typ=procvardef) and (lt=niln)) then
             begin
-              expectloc:=LOC_FLAGS;
+              if (ld.typ=procvardef) and (tprocvardef(ld).size>sizeof(aint)) or
+                 (rd.typ=procvardef) and (tprocvardef(rd).size>sizeof(aint)) then
+                expectloc:=LOC_JUMP
+              else
+                expectloc:=LOC_FLAGS;
             end
 
 {$ifdef SUPPORT_MMX}