Internal error 200510032 for inline methods that have not been inlined
Original Reporter info from Mantis: deep42thought
-
Reporter name: Erich Eckner
Original Reporter info from Mantis: deep42thought
- Reporter name: Erich Eckner
Description:
When compiling the test program (this is a reduced program from my original program - maybe, there is a simpler version to trigger the error, but I could not find one in a greedy way) in objfpc mode, internal error 200510032 is raised. This can be fixed by removing "inline" from any of the mentioned methods. Strangely, when making "count" non-inline or when changing the output type of minMaxY from tPoint to integer raises some strange linker error instead (so I assume, the internal compiler error is also gone, but I cannot be sure about that).
fpc is a custom build, but it's pretty straight-forward (it uses mainly the build instructions from arch linux):
https://crux.eckner.net/fpc/Pkgfile
P.S.: there is no version 3.2.0 in the drop-down for the "product version"
Steps to reproduce:
cat >test.pas <&LtPos;EOF
program test;
{$mode objfpc}{$H+}
uses
Classes, SysUtils;
type
tMessPunkt = class
private
function rMW: integer; inline;
public
property mW: integer
read rMW;
end;
tMessPunkteListe = class
private
function rItem(i: longint): tMessPunkt; inline;
public
function count: longint; inline;
property items[i: longint]: tMessPunkt
read rItem; default;
function minMaxY: tPoint;
end;
function tMessPunkt.rMW: integer;
begin
result:=0;
end;
function tMessPunkteListe.rItem(i: longint): tMessPunkt;
begin
if i>=count then
raise exception.create('i too large');
result:=nil;
end;
function tMessPunkteListe.count: longint;
begin
result:=0;
end;
function tMessPunkteListe.minMaxY: tPoint;
begin
result.x:=items[0].mW;
result.y:=items[0].mW;
end;
begin
end.
EOF
fpc -MObjFPC test.pas
Additional information:
This seems to have worked with fpc 3.0.4 before, but I am not 100% sure about that.
Mantis conversion info:
- Mantis ID: 37241
- OS: crux linux
- OS Build: 3.5
- Build: 3.2.0
- Platform: x86_64
- Version: 3.2.0