<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115891>115891</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm][ARM] Unable to use `.cantunwind` (and similar directives) in inline assembly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alexrp
</td>
</tr>
</table>
<pre>
```c
void _start(void)
{
asm volatile (".cantunwind");
}
```
```console
❯ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
❯ arm-linux-gnueabihf-gcc test.c -nostdlib -fasynchronous-unwind-tables
❯ clang --version
clang version 19.1.2 (git@github.com:llvm/llvm-project.git d5498c39fe6a17e271ad5a02917103445eb89373)
❯ clang --target=arm-linux-gnueabihf test.c -nostdlib -fasynchronous-unwind-tables
test.c:3:19: error: .fnstart must precede .cantunwind directive
3 | asm volatile (".cantunwind");
| ^
<inline asm>:1:2: note: instantiated into assembly here
1 | .cantunwind
| ^
1 error generated.
```
I would guess that `.fnstart`/`.fnend` is lacking similar handling to `.cfi_startproc`/`.cfi_endproc` in the integrated assembler?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVMGOqzYU_ZrL5gqEbQhhwYJ5mUhddFPprSuDb8CtY0e2ybz5-8qQSWamnap9USTsA9c-9_gcyxD0ZIk6qJ-gPmRyibPznTT0w1-ywanXDnbl9h-hPEDZX51W-HuI0kfg-zQD3m6voHnaBoiIMpzx6oyM2hAC3wPnxShtXOyLtgo4T2Xi6a3ycBu87XabfgRHZ4MzdEOfObQH6I8o_Tk32i4_8skuJAc9n_JpHDHPr-SDdnYr-Ooz4Pvvw2LjgkwUvCjzalmnAnh7g_7rjpFCLEbMrQtRGT1gfpLh1Y6zd9YtId-az6McDIXPi45G2ukz6Q28QcjaghU8MZ50hKqcdJyXoRjdGURvzPUM_Jge-cW7P2iMxaQjqrpq96NoT7STrCHeMKlqWfKWNawUVVXTsG9FIx7n-DdKUfqJIojDPzT-M01vJSB6AaJnLYgeyXvn06A42dVdeF5CxIunkRThO--g0p7GqK_0cJtAaL7h__bdWnEv_fiD-vkmh_imrdGW0tognhNlED1PZK2LlJ46cbZRy0gKtY0OZQh0HswrzuTfEWUfdnvP7AtCdxpskwgnsuTTPsW_ROYXfHGLUTgtFALGWUaEXfkmbfqYHzeArIJdiTqgkeOf2k4Y9Fkb6XGWVpkERLcWjye95f7i3fhYIsFk1Q1EbTHOlDSgaaX5pgR5EMdMdUK1opUZdawRrOJNW9bZ3I1yT0PFhVRjVQ2kGlJMVqXcnypSrGwz3fGSV4wxznaMVVWx2zNRMzk0vK0ZtQ1UJZ2lNkUKQOH8lOkQFuoYq_cty4wcyIT1ouPc0guub5Mf6kPmuzU1wzIFqEqjQwyPZaKOZr0h14DVB6if-t9-hfqA323ydNJnCbRp9DjPXZnsJ626C3r3bUg3i7Z4t9VmlWzxpptjvAQQfVKXH98FfEv2p4ADP659BODHW6PXjv8VAAD__8wCxOc">