bug0214.pp 659 B

123456789101112131415161718192021222324252627
  1. Program SttcTest;
  2. { Note: I've cut a lot out of this program, it did originally have
  3. constructors, destructors and instanced objects, but this
  4. is the minimum required to produce the problem, and I think
  5. that this should work, unless I've misunderstood the use of
  6. the static keyword. }
  7. Type
  8. TObjectType1 = Object
  9. Procedure Setup; static;
  10. Procedure Weird; static;
  11. End;
  12. Procedure TObjectType1.Setup;
  13. Begin
  14. End;
  15. Procedure TObjectType1.Weird;
  16. Begin
  17. End;
  18. Begin
  19. TObjectType1.Setup;
  20. TObjectType1.Weird;
  21. TObjectType1.Weird; // GPFs before exiting "Weird"
  22. Writeln('THE END.');
  23. End.