mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-26 01:17:19 +01:00
+ tests for r43436
git-svn-id: trunk@43438 -
This commit is contained in:
parent
d23c7980aa
commit
af97c43bdc
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -14719,6 +14719,9 @@ tests/test/tinline6.pp svneol=native#text/plain
|
|||||||
tests/test/tinline7.pp svneol=native#text/plain
|
tests/test/tinline7.pp svneol=native#text/plain
|
||||||
tests/test/tinline8.pp svneol=native#text/plain
|
tests/test/tinline8.pp svneol=native#text/plain
|
||||||
tests/test/tinline9.pp svneol=native#text/plain
|
tests/test/tinline9.pp svneol=native#text/plain
|
||||||
|
tests/test/tinlrange1.pp svneol=native#text/plain
|
||||||
|
tests/test/tinlrange2.pp svneol=native#text/plain
|
||||||
|
tests/test/tinlrange3.pp svneol=native#text/plain
|
||||||
tests/test/tint2str1.pp svneol=native#text/plain
|
tests/test/tint2str1.pp svneol=native#text/plain
|
||||||
tests/test/tint2str2.pp svneol=native#text/plain
|
tests/test/tint2str2.pp svneol=native#text/plain
|
||||||
tests/test/tint641.pp svneol=native#text/plain
|
tests/test/tint641.pp svneol=native#text/plain
|
||||||
|
|||||||
15
tests/test/tinlrange1.pp
Normal file
15
tests/test/tinlrange1.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
{$r+}
|
||||||
|
|
||||||
|
function test(l1, l2: longint): longint; inline;
|
||||||
|
begin
|
||||||
|
result:=l1+l2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ range checking state at caller site should not influence inline evaluation }
|
||||||
|
{$r-}
|
||||||
|
begin
|
||||||
|
test(high(longint), 1);
|
||||||
|
end.
|
||||||
15
tests/test/tinlrange2.pp
Normal file
15
tests/test/tinlrange2.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ %norun }
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
{$r-}
|
||||||
|
function test(l1, l2: longint): longint; inline;
|
||||||
|
begin
|
||||||
|
result:=l1+l2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ range checking state at caller site should not influence inline evaluation }
|
||||||
|
{$r+}
|
||||||
|
begin
|
||||||
|
test(high(longint), 1);
|
||||||
|
end.
|
||||||
15
tests/test/tinlrange3.pp
Normal file
15
tests/test/tinlrange3.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
{$q+}
|
||||||
|
|
||||||
|
function test(l1, l2: int64): int64; inline;
|
||||||
|
begin
|
||||||
|
result:=l1+l2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$q-}
|
||||||
|
|
||||||
|
begin
|
||||||
|
test(high(int64), 1);
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user