-OoSTACKFRAME optimization switch
Original Reporter info from Mantis: sberinde
-
Reporter name: Stefan Berinde
Original Reporter info from Mantis: sberinde
- Reporter name: Stefan Berinde
Description:
Can somebody, please, explain me why the following program
does not run as expected when -OoSTACKFRAME switch is used?
(look at the output bellow)
program test;
procedure Proc;
var s:shortstring;
begin
s:='test';
writeln('the string is: ',Copy(s,1,4));
end;
begin
Proc;
end.
===================
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\Research\Coding\bug>fpc.exe -OoSTACKFRAME test.pas
Free Pascal Compiler version 2.1.4 [2007/05/11] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling test.pas
Linking test.exe
12 lines compiled, 0.1 sec, 22848 bytes code, 1176 bytes data
D:\Research\Coding\bug>test.exe
the string is: ¦? ?
Mantis conversion info:
- Mantis ID: 9107
- OS: Win32
- OS Build: WinXP
- Platform: P4
- Version: 2.2.0
- Fixed in version: 2.2.0
- Fixed in revision: 7740 (#2fc115ba)