View Issue Details

IDProjectCategoryView StatusLast Update
0036381FPCCompilerpublic2020-04-03 10:48
ReporterRyan Joseph Assigned ToSven Barth  
Status assignedResolutionopen 
Product Version3.3.1 
Summary0036381: Inline function causes internal compiler error 2009112601
DescriptionProgram below causes an internal compiler error
Steps To Reproduce{$mode objfpc}

program test;

  TVec2 = record
    x, y: single;

function ViewToWorld (x, y: single): TVec2; overload;
  result.x := x;
  result.y := y;

function ViewToWorld (pt: TVec2): TVec2; overload; inline;
  result := ViewToWorld(pt.x, pt.y);

  pt: TVec2;
  // ERROR: Internal error 2009112601
  pt := ViewToWorld(pt);
TagsNo tags attached.
Fixed in Revision
Attached Files


Sven Barth

2019-12-02 22:02

manager   ~0119597

Which platform? Which options? I can not reproduce on x86_64-win64 with the following command line:

.\compiler\ppcx64.exe -n -Furtl\units\x86_64-win64 -viwn -FEtestoutput .\tests\webtbs\tw36381.pp

Ryan Joseph

2019-12-05 22:10

reporter   ~0119646

Sorry for the late reply, I lost track of the issue. This is on macOS:

/usr/local/lib/fpc/3.3.1/ppcx64 /Users/ryanjoseph/Developer/Projects/FPC/Various/inline_func_bug.pas
Free Pascal Compiler version 3.3.1 [2019/11/26] for x86_64
Copyright (c) 1993-2019 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/inline_func_bug.pas
inline_func_bug.pas(25,23) Warning: Variable "pt" does not seem to be initialized
inline_func_bug.pas(25,9) Fatal: Internal error 2009112601
Fatal: Compilation aborted

Ryan Joseph

2020-04-03 10:06

reporter   ~0121856

I think we both forgot about this but I continue to get internal error 2009112601 at various times. Can you reproduce it yet?

Thaddy de Koning

2020-04-03 10:48

reporter   ~0121857

It seems indeed platform. arm-linux compiles this ok. (my Mac is dead.)

Issue History

Date Modified Username Field Change
2019-11-29 23:09 Ryan Joseph New Issue
2019-12-02 22:02 Sven Barth Assigned To => Sven Barth
2019-12-02 22:02 Sven Barth Status new => feedback
2019-12-02 22:02 Sven Barth FPCTarget => -
2019-12-02 22:02 Sven Barth Note Added: 0119597
2019-12-05 22:10 Ryan Joseph Note Added: 0119646
2019-12-05 22:10 Ryan Joseph Status feedback => assigned
2020-04-03 10:06 Ryan Joseph Note Added: 0121856
2020-04-03 10:48 Thaddy de Koning Note Added: 0121857