<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi everyone,</p>
<p>So I recently rebased my pure function code
(<a class="moz-txt-link-freetext" href="https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/645">https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/645</a>
- 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:</p>
<pre data-sourcepos="2:1-4:3"
class="code highlight js-syntax-highlight language-plaintext code-syntax-highlight-theme"
id="code-383"><code><span id="LC1" class="line" lang="plaintext">variant.inc(413,17) Note: Call to subroutine "operator :=(const source:Variant):NativeInt;" marked as inline is not inlined</span></code></pre>
<p>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.</p>
<p>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.</p>
<p>Not pointing fingers (it may actually be my fault!) but be on the
lookout for any potential inlining issues.</p>
<p>Kit</p>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /><table style="border-top: 1px solid #D3D4DE;"><tr><td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"/></a></td><td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free.<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a></td></tr></table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>