<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>So there is a problem!</p>
    <p><a class="moz-txt-link-freetext" href="https://gitlab.com/freepascal.org/fpc/source/-/issues/41616">https://gitlab.com/freepascal.org/fpc/source/-/issues/41616</a></p>
    <p>It's possible to trigger an infinite loop in the compiler.</p>
    <p>Kit</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 12/02/2026 16:25, J. Gareth Moreton
      via fpc-devel wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:874b39b8-579a-47e1-a2aa-f728c57eb835@moreton-family.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
          moz-do-not-send="true">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;">
          <tbody>
            <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" moz-do-not-send="true"><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;"
                    moz-do-not-send="true"></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;"
                  moz-do-not-send="true">www.avast.com</a></td>
            </tr>
          </tbody>
        </table>
        <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
          height="1" moz-do-not-send="true"> </a></div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
fpc-devel maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
    </blockquote>
  </body>
</html>