Explorar o código

* fixed compile time conversion of qword constants to floats
(mantis #12051)

git-svn-id: branches/fixes_2_2@11705 -

Jonas Maebe %!s(int64=17) %!d(string=hai) anos
pai
achega
bcd569b60a
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      compiler/ncnv.pas

+ 5 - 1
compiler/ncnv.pas

@@ -1155,7 +1155,11 @@ implementation
         result:=nil;
         if left.nodetype=ordconstn then
          begin
-           rv:=tordconstnode(left).value;
+           if is_signed(left.resultdef) or
+              not is_64bitint(left.resultdef) then
+             rv:=tordconstnode(left).value
+           else
+             rv:=qword(tordconstnode(left).value);
            if is_currency(resultdef) then
              rv:=rv*10000.0
            else if is_currency(left.resultdef) then