bug0138.pp 575 B

1234567891011121314151617181920212223242526272829303132333435
  1. {program p; uncomment for a crash}
  2. type
  3. tpt=^tpo;
  4. tpo=object
  5. constructor init;
  6. procedure pi1;
  7. procedure pi2;
  8. end;
  9. constructor tpo.init;
  10. begin
  11. end;
  12. procedure tpo.pi1;
  13. begin
  14. end;
  15. procedure tpo.pi2;
  16. begin
  17. end;
  18. procedure crushesi;assembler;
  19. asm
  20. movl %eax,%esi
  21. end ['EAX','ESI'];
  22. var
  23. p1 : tpt;
  24. begin
  25. p1:=new(tpt,init);
  26. with p1^ do
  27. begin
  28. pi1;
  29. crushesi; { After this the %esi should be reloaded from the tempvariable }
  30. pi1;
  31. end;
  32. { There is here already a tempvar for %esi, why not use it here too ? }
  33. p1^.pi2;
  34. p1^.pi2;
  35. end.