[fpc-devel] Possible inlining problem

J. Gareth Moreton gareth at moreton-family.com
Thu Feb 12 17:25:57 CET 2026


Hi everyone,

So I recently rebased my pure function code 
(https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/645 - 
nearly 2 years since I first made the merge request, on top of 2 years 
of initial development!) and it now gets stuck in an infinite loop.  I 
hadn't made any recent changes, so this was a little bit alarming.  In 
gitlab, the following line is generated ad infinitum:

|variant.inc(413,17) Note: Call to subroutine "operator :=(const 
source:Variant):NativeInt;" marked as inline is not inlined|

Locally (x86_64-win64) it gets stuck at ppc1 compiling the system 
unit.  Using breakpoints, I found it gets stuck in the "first pass" 
stage when it tries to expand a function call. Since I'm not getting a 
stack error, I assume it's a vicious circle where one thing is changed 
to another, and then that new object is changed back to the original.

I'll work to try to see what's happening in the node tree, and if it's 
my code that's causing this or if it only uncovers the fault.  Bear in 
mind this issue only appeared when I recently rebased the merge request.

Not pointing fingers (it may actually be my fault!) but be on the 
lookout for any potential inlining issues.

Kit


-- 
This email has been checked for viruses by Avast antivirus software.
www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260212/d82a1d22/attachment.htm>


More information about the fpc-devel mailing list