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

    <tr>
        <th>Summary</th>
        <td>
            Internal compiler error on array subscription
        </td>
    </tr>

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

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

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

<pre>
    GCC also ICEs here, but before subscription

```cpp
int main() {
    int n;
    int m;
 auto& x = *(int(*)[n][m])(nullptr); // problem is here - binding to reference
    return x[0][0];                               // here internal error
}
```

That's not best code ever, but i think it need to be fixed()

https://godbolt.org/z/KPoeMGPPd
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kk9vnDAQxT_NcBllxY6XfwcOy26JoqpSDv0CGM8uboyNbJMm_fQVsFHSPRQhRjyL9x4_TReCvlrmGrIGsnPSzXFwvn5hI51NpFPv9ePphJ0JDp9O3wIO7BnohHKOKPniPGOYZei9nqJ2FtIzpMfbM0-3u5-mTdE24thpC1QCVQhFs-mIiMuZBXGnjJ9KN0cHlOMbgjgj0BGo1DauXkegCrLGQnaGrBmXQRVQaWdjpuiXF9EgUAvU4uSdNDyi3v4GH1Bqq7S9YnTo-cKebc-fPTzH2Vt8g6xJt4B1iAb_f93i1gxtI3vbGWTvnb_xKc53oL7S-zl0EagIaN1COkTsnWLkV_Yf_DXGQdsX1BEts1rqS8aLfmO1Ef7qN8Q4BRDHrdXVKelM3Dl_BWr_ALXfnx3_eHx-VomqhapE1SVc74tUVEVK-zwZaqFyWYrskF-KkvfU79OyUgfuhaRLwZVMdE0piT2JlPapEPkurxR3WVkWdLhkkhQcUh47bXbGvI5LdqJDmLku8lwcEtNJNmHdRCLLv3E9BKJlMX29fPMg52uAQ2p0iOHTJepouH76YNy7cdKG_QYbncXO--79n0VNZm_qOyY6DrPc9W4Eahfv23iYvPvFfQRq10YBqF0b_w0AAP__iaP0EQ">