Compiler crash on illegal string assignment
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
The compiler crashes on the following code
program test;
{$mode objfpc}
{$h+}
var
s: string;
begin
s[1..3] := '123';
end.
Steps to reproduce:
Save the program above as test.pas (or use attached example)
fpc test.pas
Free Pascal Compiler version 2.6.0 [2011/12/25] for i386
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test.pas
test.pas(10,3) Warning: Variable "s" does not seem to be initialized
Fatal: Compilation aborted
An unhandled exception occurred at $00409E9A :
EOutOfMemory : Out of memory<br/>
$00409E9A
$0040A1E9
$004A5ADF
$0043FB40
$004A1E37
$0043FB40
$004DC1C7
$004D4C3E
$0042FA0B
$0041165D
Error: C:\devel\fpc\bin\i386-Win32\ppc386.exe returned an error exitcode (normal
if you did not specify a source file to be compiled)
Additional information:
The error is independant of $H or $mode directive.
Mantis conversion info:
- Mantis ID: 22941
- OS: Window
- OS Build: Win7
- Platform: i386
- Version: 2.6.0
- Fixed in version: 3.0.0
- Fixed in revision: 22434 (#5ea03973)