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

    <tr>
        <th>Summary</th>
        <td>
            clang++18 segfaults on templated code
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    Hello, clang++18.1.6 is segfaulting on my Ubuntu 23.10 machine while attempting to compile this code. I originally reproduced with meta-clang on clang versions 18.1.4 and 18.1.5.

The code compiles fine with clang++17.0.2 (from the Ubuntu 23.10 package).
The zip file attached contains the c++ code involved reduced to a minimal example, as well as the clang segfault call-stack, and the files /tmp/test-0de7e8.cpp and tmp/test-0de7e8.sh which the clang logs requested to include with the bug report.

[clang-bug-report.zip](https://github.com/llvm/llvm-project/files/15310746/clang-bug-report.zip)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU81y3CgQfhp06RoVAqHRHHTwrHdq9548AIIeiRiBAmgc--lToHFsV3LJRVCi6_vrbhmjmRziQMSZiMdKbmn2YfhX-aC9cwZDNXr9MvyH1nrC_gFlpZsIOxN2bvq6qTswESJOV7nZZNwE3sHyAl_HzaUNGK8bCotUs3EIz7OxCDIlXNZSmzwov6z5b5pNBOU11vA_-GAm46S1LxBwDV5vCjU8mzTDgkkeiojMtF9uGKLxLkJR1IJ0er-KmtBHQh_275cZC8MbZ4RrUZVhP9o61rRmQFh_DX6BNONnN6tUT3JCwk71O-6rWeF6dyfVjBqUd0kaFwuA2qF3euNu3t5QQ8DdWPIgYTHOLNIC_pDLajFnLSM8o7X5LCDF7FvWoKS1h5ikeiq1TpeiazFG2CUta_5iTAeq8Yh9rdZ1L_vtJc65N2r-QGP9FCHg9w1j2iUap-ym73nlwnGbcnt8SJ9iJuJcIA7jNh3u769mJeKRsH5OaY2EPxB2IewymTRvY638QtjF2tvbcViD_4YqEXYpfgi7NII39Nh2hF3-iM5OO3ulB65P_CQrHJpjI460Yayr5qGnfOyPiHo8jlR3mgvOr2PbCMEFlfJUmYFR1lLRtI1oKetqrum1433X6EacdNeTluIija2zxNqHqTIxbjicWMN5ZeWINpY9Yuw-TiyvVBiKpXGbImmpNTHFd4RkksXh01L96nDME553xcpUBkpjtQU7_HWGRWYOsSj9GQAA__9MQkmV">