<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57793>57793</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compiling c++20 code with -Wpre-c++17-compat causes a crash
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Drew-j-Smith
</td>
</tr>
</table>
<pre>
[Compiler Explorer](https://godbolt.org/z/MehKvvE9G)
```cpp
template <typename T>
struct foo {};
template <foo x>
constexpr static auto bar = x;
```
Passing a templated type without specifying the template with `-Wpre-c++17-compat` crashes the compiler
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUk2PnDAM_TXhEjGCZIDNIYdlmfZQVarUSj2HYD5WYRIlYT7662tgdivtVjIQx8_vGdut7e6SFPWLnd1kwNPTzRnrwZOiIexpjNEFwp8J-4I22K61Jh6sH9D7g893GL9dLifxlTBBsoZkz6TMdtPO7TcRZmdUBEr4S7w7OKsZ6C_CT3s4RL_oSHtrKalqUjWE1w-qT-kr6Paeqe05RLg5T0NUcdJULdHSVnmENiuu_lDS7v5QIUzngSr6Rt3RtS56neJol0iDAz319xUTR3hHbXGKNOlv5yHVhNVoeZVq7J2KGKDaqzBC2NL0o6MJyLwsOS9FVRyTTvJOcKGSOEUDcm_7qvSgY0hiu4fW_4WoVktAEbXLJYs38sOcMHlpDwhHx5jL2yd13r6CjuhOISwQ8FBUleDJKPMKVN_lSoui6Pqj0DmIDm-KTGuel0-JUS2YsO4KYewMV7pR4Bk3JZkkyxjLRF4yju_jgRel0shQiqLluu_IMYNZTeaw1rEuUOLlVlK7DAGDZgox_AuuIxrOAJsc8uNkR-tl4-GavqY_Z_zBZNOXW_1_AWYK3s8">