aarch64-darwin: Crosscompiler fails with Fatal: Internal error 2014121702 complaining on overloaded functions
## Summary Darwin cross-compiler fails while Linux cross-compiler works properly Searching for 2014121702 points to arm64 codegen ## System Information <!-- The more information are provided the easier it is to replicate the bug --> - **Operating system: MacOS 10.15** - **Processor architecture: x86-64** <!-- x86, x86-64, ARM, AARCH64, AVR, RISC-V, PowerPC, ... --> - **Compiler version: 3.3.1 git b202fb2b0a** - **Device: Virtualbox 6.1.38 on Debian GNU\/Linux 11.5 ** ## Steps to reproduce Build big Lazarus LPK, can not simplify example for now <!-- How one can reproduce the issue - this is very important! --> ## What is the current bug behavior? Fatal: Internal error 2014121702 Error line contains calling overloaded method of the object method declared nearby +++ indicates source line which compiler complains ```pascal procedure TGridObject.DrawCell(APrevCol, APrevRow, ACol, ARow, ANextCol, ANextRow: Integer; AColHead, ARowHead: THead; AState: TCellState; ARect: TRect; DrawSelection: Boolean; ACanvas: TCanvas); var ACellInfo: TDrawCellInfo; begin ACellInfo := fCellInfo; GetCellInfo(ACol, ARow, AState, AColHead, ARowHead, ACellInfo); if not Assigned(ACellInfo) then ACellInfo := fCellInfo; +++ DrawCell(ACellInfo, APrevCol, APrevRow, ACol, ARow, ANextCol, ANextRow, AColHead, ARowHead, AState, ARect, DrawSelection, ACanvas); end; procedure TGridObject.DrawCell(CellInfo: TDrawCellInfo; APrevCol, APrevRow, ACol, ARow, ANextCol, ANextRow: Integer; AColHead, ARowHead: THead; AState: TCellState; ARect: TRect; DrawSelection: Boolean; ACanvas: TCanvas); ``` ## What is the expected (correct) behavior? Compilation ## Relevant logs and/or screenshots ``` ../lazarus/lazbuild lclgrid.lpk --cpu=aarch64 --ws=cocoa --compiler=/usr/local/lib/fpc/3.3.1/ppcrossa64 Hint: (lazarus) Last compile was incomplete for lclgrid 0.0 State file="/Volumes/mac-projects/projects/vclgrid/lib/aarch64-darwin/lclgrid.compiled" Hint: (11030) Start of reading config file /etc/fpc.cfg Hint: (11031) End of reading config file /etc/fpc.cfg Free Pascal Compiler version 3.3.1 [2022/11/29] for aarch64 Copyright (c) 1993-2022 by Florian Klaempfl and others (1002) Target OS: Darwin for AArch64 ... /Volumes/mac-projects/projects/vclgrid/gridutils.pas(4118,3) Fatal: Internal error 2014121702 Fatal: (1018) Compilation aborted Error: (lazarus) Compile package lclgrid 0.0: stopped with exit code 1 ```
issue