Record Helpers: Compiler crash when 'helped' record is unknown
Original Reporter info from Mantis: MiR
-
Reporter name: Michael Ring
Original Reporter info from Mantis: MiR
- Reporter name: Michael Ring
Description:
I have tried this on trunk with arm7m crosscompiler and my own mipsel crosscompiler, when I compile this simple program:
program test;
{$modeswitch advancedrecords}
type
THelper = record helper for xxxxxxx
procedure test;
end;
procedure THelper.test;
begin
end;
begin
end.
the compiler crashes:
[ring@macbookpro t]$ /usr/local/lib/fpc/2.7.1/ppcrossarm test.pas -Tembedded -Parmv7m
Free Pascal Compiler version 2.7.1 [2014/07/05] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Embedded
Compiling test.pas
Fatal: Compilation aborted
An unhandled exception occurred at $000B3DEE:
EAccessViolation: Access violation<br/>
$000B3DEE
$000B3796
$000B2A69
$000B2965
$001499C7
$0015E8B4
$001607B5
$0014B7B2
$0014F12A
$0014FAF4
$001BF00E
$000371FF
Steps to reproduce:
first, try with 2.6.4:
[ring@macbookpro t]$ fpc test.pas
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling test.pas
test.pas(4,38) Error: Identifier not found "xxxxxxx"
test.pas(4,38) Error: Record type expected
OK
then try same code with trunk crosscompiler (sorry, I do not have fpc for trunk):
/usr/local/lib/fpc/2.7.1/ppcrossarm test.pas -Tembedded -Parmv7m
... compiler crash
Mantis conversion info:
- Mantis ID: 26456
- OS: Mac OS X
- OS Build: 10.9
- Build: 28168
- Platform: arm-embedded
- Fixed in version: 3.0.0
- Fixed in revision: 28242 (#f1bfb398)
- Monitored by: » MiR (Michael Ring)