tb0431.pp 469 B

1234567891011121314151617181920212223242526
  1. { the smallest falling test I ever found PM }
  2. { the code generated a shll #0,%edx on i386
  3. which was bad but harmless...
  4. but on m68K it generated a asl.l #0,%d2
  5. which is not correct ... }
  6. const
  7. has_errors : boolean = false;
  8. var
  9. x : longint;
  10. begin
  11. x:=5;
  12. x:=x*1;
  13. if x<>5 then
  14. has_errors:=true;
  15. x:=5;
  16. x:=x shl 0;
  17. if x<>5 then
  18. has_errors:=true;
  19. x:=5;
  20. x:=x shr 0;
  21. if x<>5 then
  22. has_errors:=true;
  23. if has_errors then
  24. halt(1);
  25. end.