mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:29:28 +02:00
* also check that array can be accessed correctly
This commit is contained in:
parent
ba308b65b3
commit
b230154c32
@ -1,17 +1,20 @@
|
||||
|
||||
var
|
||||
nc : integer;
|
||||
test_w : word;
|
||||
|
||||
procedure array_test(b: integer; parr: array of word; c: integer);cdecl;
|
||||
begin
|
||||
nc:=c;
|
||||
test_w:=parr[2];
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
nc:=5;
|
||||
test_w:=$abcd;
|
||||
array_test(0,[1,2,3,4],56);
|
||||
if nc<>56 then
|
||||
if (nc<>56) or (test_w<>3) then
|
||||
begin
|
||||
Writeln('Wrong code generated');
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user