Browse Source

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 years ago
parent
commit
c882828fd0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/i386/aoptcpu.pas

+ 2 - 0
compiler/i386/aoptcpu.pas

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