mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 10:50:32 +02:00
* 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:
parent
1c5a3b6bf0
commit
8ca3c8301b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
12
tests/tbs/tb0574.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user