<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/141011>141011</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[WebAssembly][Clang] `_externref_t` usage in global scope emits fatal error in backend
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Losy001
</td>
</tr>
</table>
<pre>
When targeting WASM, `__externref_t` emits a fatal error in the backend whenever it's used in global scope.
This error is reproduced [here](https://clang.godbolt.org/z/vqs6dPnKc)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckcGumzAQRb9m2FgPGYMJLLwgL2LTVqrUSllGNp6AW4NTj0mbfn0FSlU1K288V_eeo4ncuCAqkEeQp0yvaQpRfQz04LzITLAPdZ5wYUnHEZNbRnbuvnwC8c6g5pcL_koYl4jXS4KaM5xdIqbZVSftGcYYInMLSxMyo4fvuFj2c8IF7xiZSyAOxFZCu_0ZfTDaMxrCDXPgHfDu6-TobwixiLcY7DqgZSCPE0YEeQLRTCndCMoORA-iH7xexnwM1gSf8hBHEP1vEP39B9X28_JhANEC7zKrStuWrc5QFYfq0LR1XTbZpIzVVWHtIK8ltkXbXIehqUtjTKuv5UHWmVOCC8mlELyWvGzy1pZ1g5WpuK54JSxUHGftfO79fd4aZI5oRVVUBS-KzGuDnnbeQuxtQYgNfVTbwZtZR4KKe0eJ_kUkl_wu6YymI8LZ-Mc2Xx7f9wh52n286FhJj_gK9ynpRdFTT7ZGr_4nOro0rSYfwgyi3wo9n7dbDN9wSCD6fSCB6J8b70r8CQAA__8sP8Iq">