فهرست منبع

* don't convert second argument of inc/dec to sinttype when inc/dec are compiled with r+ or q+, fixes code generation for inc(<int64>,<int64>); on 32 bit targets

git-svn-id: trunk@16289 -
florian 14 سال پیش
والد
کامیت
8ca3c8301b
3فایلهای تغییر یافته به همراه13 افزوده شده و 7 حذف شده
  1. 1 0
      .gitattributes
  2. 0 7
      compiler/ninl.pas
  3. 12 0
      tests/tbs/tb0574.pp

+ 1 - 0
.gitattributes

@@ -8497,6 +8497,7 @@ tests/tbs/tb0570.pp svneol=native#text/plain
 tests/tbs/tb0571.pas svneol=native#text/plain
 tests/tbs/tb0572.pp svneol=native#text/plain
 tests/tbs/tb0573.pp svneol=native#text/plain
+tests/tbs/tb0574.pp svneol=native#text/pascal
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain

+ 0 - 7
compiler/ninl.pas

@@ -2803,13 +2803,6 @@ implementation
                      end;
                    typecheckpass(hpp);
 
-                   if not((hpp.resultdef.typ=orddef) and
-{$ifndef cpu64bitaddr}
-                          (torddef(hpp.resultdef).ordtype=u32bit)) then
-{$else not cpu64bitaddr}
-                          (torddef(hpp.resultdef).ordtype=u64bit)) then
-{$endif not cpu64bitaddr}
-                     inserttypeconv_internal(hpp,sinttype);
                    { make sure we don't call functions part of the left node twice (and generally }
                    { optimize the code generation)                                                }
                    if node_complexity(tcallparanode(left).left) > 1 then

+ 12 - 0
tests/tbs/tb0574.pp

@@ -0,0 +1,12 @@
+{$r+}
+{$q+}
+var
+  i1,i2 : int64;
+begin
+  i1:=$100000000;
+  i2:=$800000000;
+  inc(i1,i2);
+  if i1<>$900000000 then
+    halt(1);
+  writeln('ok');
+end.