[fpc-devel] open array and address of "@" / crash, why?

Martin Frb lazarus at mfriebe.de
Mon Mar 31 15:28:08 CEST 2014

On 31/03/2014 14:07, Jonas Maebe wrote:
> On 31 Mar 2014, at 14:53, Martin Frb wrote:
>> But this is not about the question if this works. It would be fine if 
>> it gave a proper error. But an "Internal Error"? That seems to be a bug.
> You said that you got "Fatal: Compilation aborted", not that you got 
> an internal error. Internal errors are indeed always bugs.

Sorry, now I was incorrect. It does not say "internal". What I meant to 
describe is, that it gives the "fatal error"  without any extra error 
message, or without indication where or why the error happened.
That is something, that up to now, I have only seen with internal errors.

So question is should there be some other error message?
> Hint: Start of reading config file 
> C:\FPC\rel_2_6_2\gw\bin\i386-win32\fpc.cfg
> Hint: End of reading config file 
> C:\FPC\rel_2_6_2\gw\bin\i386-win32\fpc.cfg
> Free Pascal Compiler version 2.6.2 [2013/02/16] for i386
> Copyright (c) 1993-2012 by Florian Klaempfl and others
> Target OS: Win32 for i386
> Compiling project1.lpr
> Fatal: Compilation aborted

Shortened example:

program project1;
   a : array of integer;

procedure Foo(var c: array of integer);
   writeln( (@c)^[1] );

   a[0]:= 100;
   a[1]:= 101;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140331/2594b762/attachment.html>

More information about the fpc-devel mailing list