+ test for new inlining (fails currently)

git-svn-id: trunk@1631 -
This commit is contained in:
Jonas Maebe 2005-11-02 15:11:17 +00:00
parent 6279c187f9
commit 23cd46151a
2 changed files with 44 additions and 0 deletions

1
.gitattributes vendored
View File

@ -5328,6 +5328,7 @@ tests/test/tinline1.pp svneol=native#text/plain
tests/test/tinline2.pp svneol=native#text/plain
tests/test/tinline3.pp svneol=native#text/plain
tests/test/tinline4.pp svneol=native#text/plain
tests/test/tinline5.pp -text
tests/test/tint641.pp svneol=native#text/plain
tests/test/tint642.pp svneol=native#text/plain
tests/test/tint643.pp svneol=native#text/plain

43
tests/test/tinline5.pp Normal file
View File

@ -0,0 +1,43 @@
{$inline on}
{$mode objfpc}
type
tc = class
lf: longint;
procedure t(const l: longint); inline;
end;
var
a: longint;
procedure tc.t(const l: longint); inline;
begin
lf := 10;
if (l <> 5) then
begin
writeln('error class');
halt(1);
end;
end;
procedure t(const l: longint); inline;
begin
a := 10;
if (l <> 5) then
begin
writeln('error proc');
halt(1);
end;
end;
var
c: tc;
begin
c := tc.create;
c.lf := 5;
c.t(c.lf);
a := 5;
t(a);
end.