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

    <tr>
        <th>Summary</th>
        <td>
            [ICE] multidimensional subscript operator segfaults in requires clause
        </td>
    </tr>

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

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

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

<pre>
    The following example produces an ICE.
```c++
auto foo(auto a, auto... i) -> decltype(auto) {
    if constexpr (requires { a[i...]; }) {
        return a[i...];
    }
 else {
        return a;
    }
}

int x = foo(1);
```

Live example: https://godbolt.org/z/EMnohMWYh

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kk1vnEwMxz-NuVhBg1mW5cAhm12kSE9uj1T1OMyYZaqBofOSl376CrLNVmlVNAJj_j9jW38ZgrnMzC1UR6hOmUxxdL61WloOQWa902_t_yPj4Kx1L2a-IL_KabGMi3c6KQ4oZ3x8OOcgTiDuYS_ejwI6rmfLyhQdDs4BHbZQAj3gGuV5jgaowTsoz6hZ2fi28FW25qG-lkBENAMqN4fIr4tHoIPn78l4DqsKJVRHk-c5VCcojwj16Q9-vTzH5OdP6ptkxd5f2Ab-B_5X6BZsdzNHfEUoT9fZC6DmA_zY1O_Ef-aZf20YynscY1wClPdAHVB3cbp3NubOX4C6H0Dd-Wl249OXr-M7num21E3ZyIzbYl9XDdXFbp-NrRb1oGWxE4dBFWIYNAs9NFLV1U6VuqfMtCSoFCQaUReN2OeV7GulJR1Eo3s1FLATPEljc2ufp7WDzISQuN2LPRWZlT3bsLmIaOYX3D4C0Woq367MXZ8uAXbCmhDDrUo00W72e3w4Q3XCKdlotJl4DsbN0mJIfVDeLBHdwl5G5zHwZZDJxoBmxg8TKCtT4Cx5235am4lj6nPlJqBu_fH1cbd4941VBOq2dgNQt43zMwAA__-lVeim">