浏览代码

* is_signed does not check the ordtype but the ranges, so it cannot be used to
check for valid types for cvtsi2sd/s

git-svn-id: trunk@47083 -

florian 4 年之前
父节点
当前提交
56c58b517d
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/x86/nx86cnv.pas

+ 3 - 1
compiler/x86/nx86cnv.pas

@@ -289,7 +289,9 @@ implementation
               end
             else
               begin
-                if not(is_signed(left.resultdef)) then
+                { do not use is_signed here as it checks the boundaries instead
+                  of the ordtype }
+                if not(torddef(left.resultdef).ordtype in [s32bit,s64bit]) then
                   Internalerror(2020101001);
                 case location.size of
                   OS_F32: