* 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 -
This commit is contained in:
florian 2010-11-01 21:30:14 +00:00
parent 1c5a3b6bf0
commit 8ca3c8301b
3 changed files with 13 additions and 7 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
tests/tbs/tb0574.pp Normal file
View File

@ -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.