<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/149675>149675</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            C `goto` loops are optimized out in LLVM versions ABOVE 12
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          gkgoat1
      </td>
    </tr>
</table>

<pre>
    Resurgence of [old bug 965](https://bugs.llvm.org/show_bug.cgi?id=965) within C loops made with `goto` statements. Since they aren't iteration statements, they should not be affected and should not be required to progress. This bug has existed since at least Clang 20, possibly stretching back to Clang 12. This should not cause problems with Rust code, but their team probably should be contacted anyway

[this C source](https://github.com/turbolent/w2c2/pull/121#issuecomment-3092556403) reproduces, on latest Clang

This is a miscompilation, but usually comes up in compiler outputs, not hand-written source; Rust, Zig, and modern LLVM languages should not be affected as they never set any progress attributes. (C++ faces this issue only in `extern "C"` function definitions, which are rarely compiled to)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8lM9u4zYQxp-GvgxiSKPIjg46xE592qLAtthDLwVFjiV2KVLlDON1n76glGyDoi1gQIY9_37ffCPN7MZA1Kv2pNqXnc4yxdSPX8eopd4N0d77z8Q5jRQMQbyCak_RWxjyCN2hVe2LwqdJZGHVPCu8KLwMeeS996_zPqZR4YWnePttyOPejE41F2dV81JSsYObk8kFOIOPcWGYtaX1N1CHaowS1aECFi00UxDew8-uTCET3UEnCgqPAk4oaXExfIhUeN6ieIrZWwhRYCDQ1ysZIQs62H_8leiP7BJZkAhLimMi5j38MjleUSfNQN8cl2Reh9ACnjQLnL0OI2BVei6R2Q3-DiyJxEwujDBo87VU3eJqfKv6ob3Rmal0HTzNvAnwObOAiZZK2SFLwXEJhPS8Ruq1y1ZjIDAxiH5Du9_0XVXP5dOepPQ6A8ecDP3btkYnUx72Js4KL5LTED0FUXi5oUGFlyV7r_BSY62wccyZTJyLyA9N1WHbHh6rpqwy0ZKizYZW8WMAr4Xe5dnGWbkdg4bZsYnz4vy6uHfEzFl7fwcTZ2LIC7gAWxgliFmWvG22aDbpYB9uyYlQeKdrTqtsJeRXN5ZH2fMcLaUAnz59-RHKLFmPxP9pDN58E-iVEjBJ0fO7IUCLJDdkId6DwqezwpPCE1y1oZK44nEmiMHfy_TqUNE3Ke0V4lkhFkNfczCrXy1dXXDl64p1m5yZiq8h6USbDoW9eFJht7N9Y7um0zvq62OLXXtsj7ib-usRazoa3R3qmp4I26PVFtunuhr0FS3uXI8VttWx7rBqugb3aK-dPjxeTdXpoaqseqxo1s5_v9rditHXj93h2O68Hsjz-opADHTbIAtN-7JLfUl6KEevHivvWP4-_p048dSfP57zdumFMi7iZvcn2bLbota6oldKXBSB59NPX36AGnc5-f5_PFuavT0elhR_J1Pcu47Ixbgbw2uPfwUAAP__zsOnTg">