bug0183.pp 556 B

123456789101112131415161718192021222324252627
  1. program Internal_Error_10;
  2. type
  3. PBug = ^TBug;
  4. TBug = array[1..1] of boolean;
  5. var
  6. Left : PBug;
  7. test : longint;
  8. begin
  9. New(left);
  10. test := 1;
  11. { following shows internal error 10 only if the
  12. array index is a var on both sides
  13. ( if either is a constant then it compiles fine, error only occurs if the
  14. not is in the statement )
  15. bug only appears if the array is referred to using a pointer -
  16. if using TBug, and no pointers it compiles fine
  17. with PBug the error appears
  18. }
  19. Left^[test] := not Left^[test];
  20. end.