{: test that divisor of zero in mod operator causes a fatal error }

{$d+}
program d080( output );

var
   k : integer;

function side : integer;
begin
   side := k;
   k := k+1;
end;
begin {d080}

   k := 1;
   writeln( '11 mod 1 is ', 11 mod side:1);
   if k <> 2 then
      writeln( 'mod operator for debug has side effects' );

   k := 0;
   writeln( '11 mod 0 is ', 11 mod k:1 );
   writeln( 'fails: divisor of zero in mod operator error is not detected' );
end. { d080 }

