diff --git a/.gitattributes b/.gitattributes index 88f2c0ee3d..9b2f4398cc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/compiler/ninl.pas b/compiler/ninl.pas index c376d36e54..67858d0184 100644 --- a/compiler/ninl.pas +++ b/compiler/ninl.pas @@ -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 } diff --git a/tests/webtbs/tw15304.pp b/tests/webtbs/tw15304.pp new file mode 100644 index 0000000000..0dfab16814 --- /dev/null +++ b/tests/webtbs/tw15304.pp @@ -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.