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

    <tr>
        <th>Summary</th>
        <td>
            Improperly nested .cfi region check doesn't fire on ELF targets, but should
        </td>
    </tr>

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

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

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

<pre>
    https://reviews.llvm.org/D155245#4657075

> However, I noticed a different surprising detail here; it looks like this check fails to trigger on Linux (ELF in general I presume?) targets, while it does trigger on MachO and COFF. This can be tested with something like this:

```
.globl ffi_call_VFP
ffi_call_VFP:
.cfi_startproc
nop
.globl ffi_call_SYSV
ffi_call_SYSV:
nop
.cfi_endproc
```
```
$ clang -target aarch64-linux-gnu -c fallthrough.s 
$ clang -target aarch64-apple-darwin -c fallthrough.s 
fallthrough.s:7:1: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs 
ffi_call_SYSV:
^
fallthrough.s:3:2: error: previous .cfi_startproc was here
.cfi_startproc 
^
$ clang -target aarch64-windows-gnu -c fallthrough.s 
fallthrough.s:7:1: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
ffi_call_SYSV:
^
fallthrough.s:3:2: error: previous .cfi_startproc was here
.cfi_startproc
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzElE-PozgQxT-NuZRAYP6FA4fMdKNtaVaz0qxG2lPL4DJ42rFR2TQ7335Fkv6TKL1725GiJJRVr55_Nk94r0eL2LLyE-P8Bzk0TnnGOSvvIrGEyVH7Uo16J3-2UwizZ_me8Y7xjvBZ4-oTY54PiaOR8e4uK0telIznRVXWaV2y9I6l-_N3fg-_uRWfkRj_DA9gXdADShAgtVJIaAP4hWbSXtsRJAahDUxIyPJPoAMY5548GP2EECbtYZhweAIltPEQHATS44gEzsIXbZe_gfHd_ZcOtIURLZIw8AAzoV8OyPKO8QaCoBGD3_yskza4TZEO_Xut38UwfQVhJXz-2nUJ_HkcLSz0CAF9QAmrDhN4d8Awbc5fHW6s3hOo0vPn-JiMxvUGlNKPgzDm8Xv3x2nhovIikQxKP_ogKMzkhlPNuvm21Le_vn2_0jqWXsTeGjdVtPJN88rk9SMvYDDCjhCf2IEQNExVEZsNeTzaBeIBlDAmTOSWcUo8_FermGeDsRS0avtR90WN5fua5fuM5XtAIkfbH-tsPJN-FgHBiB7N8ZSsCyDmGQVBj2FFtHBJEhjv4D0GmIWm17E38bHy_rarnOV7fuFq3l4Tt_jrqavwp6t943DhasrH5FZtpVv9v2H_v8H9Qm7X2F6ubiTbXDZ5IyJsszpNi6yuqiaa2mpXqyqvql4IriT2vSrqslGSq77c8SyLdMtTnmdZ1mS7rOBNIpsKlRS7RlW17HeKFSkehDavKRhp7xdsa75LeXSieU5YiyscF88RS-3WE_fL6FmRGu3DW5ZGQQeD7cNhJjcjmZ9gT0mzbRgIR-3sOf62uLKM1wGUJtwCa8u8d8HWLwH85BYjo4XMVYiPOkxLnwzuwHi3TT__xDO5HzgExrujZ894d9zTPwEAAP__5S7_QQ">