Program fjf296;

(* FLAG -Werror *)

(*$B-*)

Type
  T = array [1..10000] of Integer;

Var
  FooBar: Boolean;


Function Foo = R : T;
var i : Integer;
begin (* Foo *)
  for i := 1 to 10000 do R [i] := i;
  writeln ( 'failed (foo)' );
  Halt ( 1 )
end (* Foo *);

Function Baz (const V : T) : Boolean;
begin
  Baz := V [42] = 42
end;

begin
  FooBar:= false and ( Baz (Foo) );
  if FooBar then
    writeln ( 'failed (bar)' )
  else
    writeln ( 'OK' )
end.
