浏览代码

Minimalist change to avoid Invalid Typecast error on class when compiled with '-CriotR -O2' for i386-go32v2 target

git-svn-id: trunk@43565 -
pierre 5 年之前
父节点
当前提交
c882828fd0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/i386/aoptcpu.pas

+ 2 - 0
compiler/i386/aoptcpu.pas

@@ -94,6 +94,8 @@ unit aoptcpu;
                   p := tai(p.next);
                   p := tai(p.next);
                   Result:=true;
                   Result:=true;
                 end;
                 end;
+              if not (p is taicpu) then
+                exit;
               case taicpu(p).opcode Of
               case taicpu(p).opcode Of
                 A_IMUL:
                 A_IMUL:
                   Result:=PrePeepholeOptIMUL(p);
                   Result:=PrePeepholeOptIMUL(p);