<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116930>116930</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
return in __finally in loop hits breakpoint
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jaykrell
</td>
</tr>
</table>
<pre>
```
int main()
{
while (1)
{
__try { }
__finally { return 40; }
}
return 0;
}
/*
With Visual C++ this returns 40.
With clang-cl version 16.0.0.0 it hits a breakpoint in the generated code.
0:000> uf 1!main
1!main:
00007ff7`2d1d7100 4883ec28 sub rsp,28h
00007ff7`2d1d7104 c744242400000000 mov dword ptr [rsp+24h],0
1!main+0xc:
00007ff7`2d1d710c 4889e2 mov rdx,rsp
00007ff7`2d1d710f 31c9 xor ecx,ecx
00007ff7`2d1d7111 e80a000000 call 1!main+0x20 (00007ff7`2d1d7120)
00007ff7`2d1d7116 e9f1ffffff jmp 1!main+0xc (00007ff7`2d1d710c)
0:000> u (00007ff7`2d1d7120)
1!main+0x20:
00007ff7`2d1d7120 4883ec10 sub rsp,10h
00007ff7`2d1d7124 4889542408 mov qword ptr [rsp+8],rdx
00007ff7`2d1d7129 884c2407 mov byte ptr [rsp+7],cl
00007ff7`2d1d712d cc int 3
*/
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVM2SozgMfhpzUXVKFiaYA4dJ9-YRdo9TxpjgHgeytumft98ykHTSmex8SQVjSZ8V6bNUCPYwGFOzYseKl0xNsR99_ao-f3njXNaM7WfNtrh-8YXhDztEOCo7MJKMqmWPlbtlAQDw3ltngJHkFzvcOCT8_Bn9Z9oGVr58N3V2UM4tZm_i5AcQyPJvvpeXdWv1TI7nrG4cGO0Zret_bOzhbxsm5eCZ0Y7RDmJvw0oSQODmOnb2104Nhyft4M34YMcB-HaD6QM2Qm9jAAWNN-rXaUxFsgPE3sDBDMaraFrQY2tWVmT5D0Rk-V8wdcAZ8bmks-3ylq-HIyKWXVeyLVLL25IjgpAyN5rkuWhhasCHE6Nnkv2jMAG6FIIECVwBx_Ftjm_fR9_CKXpgxW4m2pHoWfHC6BmvK3HJjnb4of8nR51yrAzBBeks334wek4HPAjrIOe6git8jB6MTmHp9_dhnIORqNY_NUMr59LzJmHCJMy7cMKLVO-pt2CqjnczFurX4wnuqPVvmVF_MV_1_E9ZfEv6cZnpLAWO91Lg-EgKJObuFEkK8qs7Cf_eK0EuOki9e0BXgZRCk8DyutkJzWc0t2zlwqbdI7IWtIYbpOuUkJ9v8nyZl_V5OmVtnbdVXqnM1LzMCaUQgrK-1nLLi7LUvCNeyFLyou26VptClVVLsstsTUiCc0Lc5gJpk1PVYGsaoyWKThMTaI7Kuo1zb8fN6A-ZDWEyNefbKsfMqca4MM9QosG8w2xlRGmk-joFPTXTITCBzoYYvmiijc7U6-Cyw9XoswO4cTwtY-VrqGSTd3Uf4ykkSaSBtj_Y2E_NRo9HRvvEvD6eTn58NToy2s_5BEb7NeG3mv4LAAD__0I7lMM">