Forráskód Böngészése

m68k/n68kmat.pas, tm68knotnode.pass_generate_code:
* correctly handle the case "expectloc = LOC_JUMP"
* make internal error unique

git-svn-id: trunk@22790 -

svenbarth 13 éve
szülő
commit
7ffd6c61a1
1 módosított fájl, 9 hozzáadás és 3 törlés
  1. 9 3
      compiler/m68k/n68kmat.pas

+ 9 - 3
compiler/m68k/n68kmat.pas

@@ -69,6 +69,7 @@ implementation
       var
          hl : tasmlabel;
          opsize : tcgsize;
+         loc : tcgloc;
       begin
          opsize:=def_cgsize(resultdef);
          if is_boolean(resultdef) then
@@ -77,9 +78,14 @@ implementation
             { if it is a register variable, so we've to do      }
             { this before the case statement                    }
             if left.expectloc<>LOC_JUMP then
-              secondpass(left);
+              begin
+                secondpass(left);
+                loc:=left.location.loc;
+              end
+            else
+              loc:=LOC_JUMP;
 
-            case left.location.loc of
+            case loc of
               LOC_JUMP :
                 begin
                   location_reset(location,LOC_JUMP,OS_NO);
@@ -111,7 +117,7 @@ implementation
                   location.resflags:=F_E;
                 end;
              else
-                internalerror(200203224);
+                internalerror(200203223);
             end;
           end
          else if is_64bitint(left.resultdef) then