<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63249>63249</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang frontend C++ crash on recursive constexpr
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
brutalsavage
</td>
</tr>
</table>
<pre>
To quickly reproduce: https://gcc.godbolt.org/z/conMoM7jz (assertion-trunk)
```cpp
#include <type_traits>
constexpr void print(auto ptr)
{
print(std::is_pointer<decltype(ptr)>());
}
int main()
{
print(true);
}
```
Compiling the above code crashes clang `clang++ -x c++ --std=c++20`, crashes locally using clang-17.0 (a10019a), also on trunk with assertion (see godbolt link)
Note crash can be removed by setting a low `-ftemplate-depth` amount
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U81yszgQfBpxmcIlhG3gwME_8S172ntKiAkoERIrjZw4T78lgpPU91NFQQOa7mm1RoagB4vYst2R7c6ZjDQ633Y-kjRBXuWAWef6W_uvg_-iVq_mBh5n7_qokJUHGInmwMoDExcmLoNSm8H1nTO0cX5g4vLBxEU5--geq5cPYKKWIaAn7WxOPtpXJhrGz4wf1vuef15qntcvotRWmdgjsPJEtxmfyEtNgZUPPyuVs4HwffZwdbqH2WtLSS6Sg5n8t051_ARfSwL1yUB50OFpdtoSelaeelQmqTFRr-XlAxN1Agkf72znn01oSzBJbdeFfxEkH_HPJHf3PzlPbpq10XYAGhFk564IyvUIysswYgBlpB0g7VkCTByZOEL-DuoO88XheX0Xi4A4fdUbp6QxN4ghiSwkeVFt-JJWwXnRyMX1CaQJDpyFJTl40zTCV5xpdUCENX4w-rdw_3G0dg1KWugQPE7uij10NwhIlPQlGPeW3OTPhNNsJGHe40wj23OQk4uWsr4t-6ZsZIZtsa_3O14LzrOxrRvOVY3bRvGqKjrB1V7turrud3XVCb7NdCu4KPm-KIq65Jxvqm3dINY7rJTYFsjZluMktdkYc53SEc50CBHbfSm2TWZkhyYssyKExTdYfjIh0uj4NtXkXRwC23KjA4VvFtJksD0tST17ZwltD6c1oM8tcRY8quiDXgK-n-YsetP-MmWaxthtlJuYuCSJ9ZHP3r2gIiYuS2OBicvS-P8BAAD__-mXMW8">