fpc/tests/webtbs/tw13948b.pp
Jonas Maebe 07e47171d2 * don't perform temp substitution of an entire array when assigning only the
first array element (related to mantis #13948 and #17413)

git-svn-id: trunk@15992 -
2010-09-15 15:03:32 +00:00

30 lines
297 B
ObjectPascal

{ %opt=-O2 }
type
tr = array[0..1] of longint;
function f: tr;
begin
f[0]:=5;
f[1]:=6;
end;
procedure test;
var
r: tr;
begin
r[0]:=1;
r[1]:=2;
r[0]:=f[0];
writeln(r[0]);
writeln(r[1]);
if (r[0]<>5) then
halt(1);
if (r[1]<>2) then
halt(2);
end;
begin
test;
end.