瀏覽代碼

+ insert type conversion for the div result when cpuneedsdiv32helper is used

git-svn-id: branches/i8086@23879 -
nickysn 12 年之前
父節點
當前提交
a9640ad9c6
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/nmat.pas

+ 7 - 0
compiler/nmat.pas

@@ -433,6 +433,13 @@ implementation
         left := nil;
         left := nil;
         right := nil;
         right := nil;
         firstpass(result);
         firstpass(result);
+
+        if result.resultdef.typ<>orddef then
+          internalerror(2013031701);
+        if resultdef.typ<>orddef then
+          internalerror(2013031701);
+        if torddef(result.resultdef).ordtype <> torddef(resultdef).ordtype then
+          inserttypeconv(result,resultdef);
       end;
       end;
 {$else cpuneedsdiv32helper}
 {$else cpuneedsdiv32helper}
       begin
       begin