View Issue Details

IDProjectCategoryView StatusLast Update
0036381FPCCompilerpublic2019-12-05 22:10
ReporterRyan JosephAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version3.3.1Product Build 
Target VersionFixed in Version 
Summary0036381: Inline function causes internal compiler error 2009112601
DescriptionProgram below causes an internal compiler error
Steps To Reproduce{$mode objfpc}

program test;

type
  TVec2 = record
    x, y: single;
  end;

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

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

var
  pt: TVec2;
begin
  // ERROR: Internal error 2009112601
  pt := ViewToWorld(pt);
end.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

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

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