mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 18:19:54 +02:00

regloadedwithnewvalue() gave the wrong answer for this in case candependonprevvalue was false (caused a wrong optimization in the space() function of the rtl) git-svn-id: trunk@8808 -
21 lines
301 B
ObjectPascal
21 lines
301 B
ObjectPascal
{ %opt=-O2 }
|
|
|
|
function space (b : byte): shortstring;
|
|
begin
|
|
space[0] := chr(b);
|
|
FillChar (Space[1],b,' ');
|
|
end;
|
|
|
|
var
|
|
s: string;
|
|
i: longint;
|
|
begin
|
|
fillchar(s,sizeof(s),255);
|
|
s:=space(255);
|
|
if length(s)<>255 then
|
|
halt(1);
|
|
for i:=1 to 255 do
|
|
if s[i]<>' ' then
|
|
halt(2);
|
|
end.
|