blob: 3536fd7271823e770f8fd723e710e6115085cf67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
{$ifdef fpc}
{$mode objfpc}
{$inline on}
{$endif}
uses
sysutils;
var a: longint;
function f(l: longint): longint; inline;
var
l1,l2,l3: longint;
begin
result:=123456;
if (l > 10) then
exit;
result:=30;
for l1 := 1 to 10 do
for l2 := 1 to 100 do
;
result := 40;
for l3 := 1 to 10 do;
end;
procedure test;
var
l: longint;
begin
l:= f(a);
if (l<>123456) then
halt(1);
end;
procedure test2;
var
l: longint;
begin
try
finally
l:= f(a);
if (l<>123456) then
halt(1);
end;
end;
procedure inl2; inline;
begin
try
except on exception do ;
end
end;
begin
a:=20;
test;
test2;
inl2
end.
|