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

    <tr>
        <th>Summary</th>
        <td>
            Goto out of __finally crashes compiler (Referring to a basic block in another function)
        </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()
{
    int a = 10;
 __try {
        a = 20;
        *(volatile char*)0;
        a = 30;
    }
    __finally
    {
        // Next line is not needed.
        //a = _abnormal_termination() ? 40 : 50;
        
 goto A;
        
        // Similar will file separately.
 //return a;
    }

A:
    return a;
}

/*
 goto A;
        ^
Referring to a basic block in another function!
 br label %A
in function ?fin$0@0@main@@
fatal error: error in backend: Broken function found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
    0. Program arguments: ...
    1. <eof> parser at end of file
    2. Code generation
    3. Running pass 'Function Pass Manager' on module '1.c'.
    4. Running pass 'Module Verifier' on function '@"?fin$0@0@main@@"'
    clang-cl: error: clang frontend command failed with exit code 70 (use -v to see invocation)
*/
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVV1v6zYM_TXKC1FDkePaefBD-pG97A7FLbDXgJZpR7eyZFBye_vvB9lJ2q7dhl0jHxJ5RFJHRzSGYHpHVIviRhR3K5zi0XP9A1-fmKxdNb59rcW1PH3knZA74yIMaJxQlVDbxSbKm2UAAJAACCK_g7UU-dlxOER-hQ_A9CxA9Q54eoTaCVU9e4vRWAJ9RJ5N28_QJUb-0SHKu7fJ4dAZh9a-vvd_SrgXag9_0M8I1jgCE8D5CI6opTb7CrwkPmDjPA9oD5F4MA6j8Sd2QOR72EgQ-Q6KL_a4zHofPez-yfuxvEczGIsML8Za6BIz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