mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 22:49:23 +02:00
+ 797 and 840
This commit is contained in:
parent
16638c8b65
commit
366b7ad381
30
tests/webtbs/tbug797.pp
Normal file
30
tests/webtbs/tbug797.pp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
program test;
|
||||||
|
{$INLINE ON}
|
||||||
|
|
||||||
|
var
|
||||||
|
s2 : string;
|
||||||
|
j : longint;
|
||||||
|
|
||||||
|
procedure Tst(s: ShortString;var j : longint); inline;
|
||||||
|
var
|
||||||
|
i : longint;
|
||||||
|
begin
|
||||||
|
s:=s + ' Yes';
|
||||||
|
i:=5;
|
||||||
|
j:=j+i;
|
||||||
|
WriteLn(s);
|
||||||
|
s2:=s;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
s2:='Before inline';
|
||||||
|
j:=5;
|
||||||
|
Tst('Hello Hello Hello',j);
|
||||||
|
if (s2<>'Hello Hello Hello Yes') or (j<>10) then
|
||||||
|
begin
|
||||||
|
if (s2<>'Hello Hello Hello Yes') then
|
||||||
|
writeln('s2 = ',s2);
|
||||||
|
if (j<>10) then
|
||||||
|
writeln('j = ',s2);
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end.
|
24
tests/webtbs/tbug840.pp
Normal file
24
tests/webtbs/tbug840.pp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{$mode TP}
|
||||||
|
|
||||||
|
program tbug840;
|
||||||
|
|
||||||
|
uses tbug840a;
|
||||||
|
|
||||||
|
begin
|
||||||
|
tbug840b.i:=1;
|
||||||
|
end.
|
||||||
|
|
||||||
|
----------------------------- cut here ----------------------------------------
|
||||||
|
unit ua;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses ub;
|
||||||
|
implementation
|
||||||
|
end.
|
||||||
|
----------------------------- cut here ----------------------------------------
|
||||||
|
unit ub;
|
||||||
|
|
||||||
|
interface
|
||||||
|
var i:longint;
|
||||||
|
implementation
|
||||||
|
end.
|
6
tests/webtbs/tbug840a.pp
Normal file
6
tests/webtbs/tbug840a.pp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
unit tbug840a;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses tbug840b;
|
||||||
|
implementation
|
||||||
|
end.
|
6
tests/webtbs/tbug840b.pp
Normal file
6
tests/webtbs/tbug840b.pp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
unit tbug840b;
|
||||||
|
|
||||||
|
interface
|
||||||
|
var i:longint;
|
||||||
|
implementation
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user