+ test for mantis #24189 (already works in trunk, still broken in 3.0)

git-svn-id: trunk@34290 -
This commit is contained in:
Jonas Maebe 2016-08-12 13:40:19 +00:00
parent 8e0ee6599c
commit 20cbdf75ea
2 changed files with 22 additions and 0 deletions

1
.gitattributes vendored
View File

@ -14828,6 +14828,7 @@ tests/webtbs/tw24072.pp svneol=native#text/pascal
tests/webtbs/tw2409.pp svneol=native#text/plain
tests/webtbs/tw24129.pp svneol=native#text/pascal
tests/webtbs/tw24131.pp svneol=native#text/plain
tests/webtbs/tw24189.pp svneol=native#text/plain
tests/webtbs/tw24197.pp svneol=native#text/plain
tests/webtbs/tw2421.pp svneol=native#text/plain
tests/webtbs/tw2423.pp svneol=native#text/plain

21
tests/webtbs/tw24189.pp Normal file
View File

@ -0,0 +1,21 @@
{$mode objfpc}
{$assertions on}
procedure DivMod(a: Int64; b: Int64; out res, rem: Int64); inline;
begin
res:=a div b; rem:=a-b*res;
end;
procedure Test;
var
res, rem: Int64;
begin
res:=5; DivMod(res {!}, 2, res {!}, rem);
Assert(res=2); // OK
Assert(rem=1); // "2-2*2 = -2" if inlined
end;
begin
test;
end.