mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 14:29:16 +02:00
* 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:
parent
567d99b9c1
commit
e50c05f44e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
10
tests/webtbs/tw15304.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user