* fixed inverted condition in inc/dec range/overflow case that caused

unsigned 32/64 bit values to be always explicitly typecasted to signed
    32/64 bit instead of never (mantis #15304)

git-svn-id: trunk@14379 -
This commit is contained in:
Jonas Maebe 2009-12-09 21:54:46 +00:00
parent 567d99b9c1
commit e50c05f44e
3 changed files with 13 additions and 2 deletions

1
.gitattributes vendored
View File

@ -10111,6 +10111,7 @@ tests/webtbs/tw15088.pp svneol=native#text/plain
tests/webtbs/tw15169.pp svneol=native#text/plain
tests/webtbs/tw15207.pp svneol=native#text/plain
tests/webtbs/tw15274.pp svneol=native#text/plain
tests/webtbs/tw15304.pp svneol=native#text/plain
tests/webtbs/tw1532.pp svneol=native#text/plain
tests/webtbs/tw1539.pp svneol=native#text/plain
tests/webtbs/tw1567.pp svneol=native#text/plain

View File

@ -2621,9 +2621,9 @@ implementation
if not((hpp.resultdef.typ=orddef) and
{$ifndef cpu64bitaddr}
(torddef(hpp.resultdef).ordtype<>u32bit)) then
(torddef(hpp.resultdef).ordtype=u32bit)) then
{$else not cpu64bitaddr}
(torddef(hpp.resultdef).ordtype<>u64bit)) then
(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 }

10
tests/webtbs/tw15304.pp Normal file
View File

@ -0,0 +1,10 @@
{$r+,q+}
var A : LongWord;
begin
A := $0FFFFFFF;
Inc(A, LongWord($F0000000));
// no runtime error if the above line is changed to:
// A := A + LongWord($F0000000);
end.