<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60046>60046</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Miscompilation: Illegal instruction
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
corwinn
</td>
</tr>
</table>
<pre>
Code: https://gist.github.com/corwinn/726e0c7e61482f7be1494e5ec634dabe
Compile: clang++ -O0 clang_issue_a.cpp -o clang_issue_a
Compile: clang++ -march=core2 -mtune=core2 -O0 clang_issue_a.cpp -o clang_issue_a
Platform: X86_64-pc-linux-musl
March: core2
LLVM, clang, compiler-rt, libunwind, libc++, lld : 14.0.6
LLDB: -> 0x555555555da8 <+88>: ud2
No GCC.
Reproducible with: 12.0.1, and 10.0.1
Workarounds: Using -O1 -O2 -O3 -Os "resolves" the issue.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUkuPmzAY_DXmYoH84JUDh4Rsqkq7TVWpj9vK2B_ErcHIj83231dAom17qMoFzWg8M_b3Ce_1MAE0qDig4piIGC7WNdK6q56mpLPqZ9NaBYjv8SWE2SO-R-yE2GnQPmSDDpfYZdKOiJ1uhxA7VawEIisoaV6zvuqA5rscCpAlz5XoAJEjIvvWjrM2q7U0YhoQOyB2wOmZbPhZex_hWWRynnFq_yT_bTEKJy-IH6V1wHA6hjjBGzwT_N8JH40IvXXjEvGtLp_LPJ1lavQUX9MxerOpnra8PV4TNu7x8csTYu29WIvlVtalLizQ6C5OVz2pG5Bb-RUZhRc3mmckK-92x8PCpYg_YPJa3D8laox4i9ihrhF_WCRR3Sp8sPhd22Yb-ASzsypK3RnAVx3WvpRlJKNLppgUpmRFq_yrdT-Es3FSy8zxZ6-nAadnitPz8oQcp2ePEWMOvDUv4BFjOFwAr6-XJarhasd3IoGGlhWvalrnLLk0ZU-B95VQdV-okqtedrTf0UqUsAMpSaIbRhgnlBaUspywLBdKFbzifQ1SEZajnMAotMmMeRkz64ZkjWxKQvIyMaID4-_r7JpFlHZx8CgnRvvg344FHQw0T9pvgxFB22m56ntjYBAG68kHF-VCJ9GZ5u_9_231F8_bL52d_Q4yIHZae3nETmu1XwEAAP__VwMMZQ">