<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/67333>67333</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang 17.0.1] [Regression] Infinite loop in compile unit
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
StormBytePP
</td>
</tr>
</table>
<pre>
When using clang 17.0.1 in Gentoo and compiling dev-libs/nss, an infinite loop is detected when compiling sha512.c file (downstream bug report: https://bugs.gentoo.org/914657), an issue that does not happen for same compiling unit using Clang 16.
An initial testing revealed that march=native might be causing the trouble.
In order to ease the test process, I attach the preprocessed output for that compile unit which I expect can reproduce this issue easily (remove the .txt extension)
[sha512-preprocessed.c.txt](https://github.com/llvm/llvm-project/files/12715974/sha512-preprocessed.c.txt)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkzFzozAQhX-NaHbCgEAGCgo7Ht-4y9wVVwuxQboREiMtTvLvbwTJxC6uuAYKSbvfe7tPxmgmh9gzcWLinMmVtA_9L_JhPn0Qvrxkgx8_-t8aHazRuAmUlW6CssmLvATj4Ac68h6kG0H5eTE2XRrx9mTNEBm_uBgZfwbpwLhX4wwhWO8XMBFGJFSEI7yl8t-vo5ai5LmCV2MRGG9H_-YiBZQzDOsEARcfiFVH0ERLZNWR8Qvjl2GdYj5tPLkPE-OXrqwPomG8-0KIcUUgLQlGjxGcJ9ByWdDBqw8Q5Yx3HKsz9Kn6eVd9yFlxZsVx_x6TJkNGWiCMlO4FvKG0OO49ZhmUZtXZSTI3hNlMmmBAUHKvShqBgl8Hiw-Frw58GDEAeUAZcb-IkWAJXuHu6BUkkVR6O1wCfh7hCH6lZaVN0YaxK8Jdz5s2SsMV8H1BRaCkg-3tuKrUx8RPk1BGYz-S-wFnf9sZcnonwHdCF413ydc7aiZO--Se7mlylR4xcWa8fRzXZEivQ678zPjF2tvX72kJ_g8qYvySFiAtUcmbUnRNzfjl3y2-aLKxr8au6mSGfXnoxEEUQtSZ7qXihajbWslClbLsqlIIIbu25U2nmqHNTM8LXhUdF2VdcN7mNRd4qOtqaNpD1w0NqwucpbF54kw7lm1m9YemqqrMygFt3LLE-ZYTxnmKVeg3XWk_WV1YEyl-VyBDdgvg812ymDgDE6efOAWMm9fiDNfHALmHwWZrsP1_G7zhJ4c3BX8DAAD__-G1Vgk">