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

    <tr>
        <th>Summary</th>
        <td>
            error: definition with same mangled name when specializing a concepted template
        </td>
    </tr>

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

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

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

<pre>
    ```c++
#include <cstdio>
#include <concepts>

template <typename T>
void fun(T);

template <>
void fun(char c)
{
    std::puts("foo<char>()");
}

template <std::integral I>
void fun(I i)
{
    std::puts("foo<std::integral>()");
}

int main()
{
    fun<char>(' ');
}
```
Compile with -std=c++20.

Result:
\<source\>:14:6: error: definition with same mangled name '_Z3funIcEvT_' as another definition
\<source\>:8:6: note: previous definition is here

Expected: Prints foo\<char\>(), or at least a less cryptic error

https://godbolt.org/z/axvdbK1Eh

GCC and MSVC have similar bugs:
(will edit in ten seconds)
https://developercommunity.visualstudio.com/t/Template-explicit-specializationconcept/10012835
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU1tvmzAU_jXwYiUCcwk88NAm6VRNk6at2sNeKmNOgidjI9uQZr9-x4S06ZpOK7Lx7ZzzfedW6-ZYBXl0Gjygt35EmyC6CWgiFJdDAyRI1ty6Rugg2V591IpD7-zL8_R30PWSuUnEHXtQrAPy8Cw0atGQ3aACWjwEtAyS2_eUr6nwlhnCvd5JaTVrE_yQa5Dc4OgHJEWLgNKd1p4oKnlj_qrE21ewq817-M_2hHKwN0yS-2uU7on4IJ83hv-THIqTjgk1y75F9IReu7siOK-bPKf_dFzrrhcSyEG4liwmhpu5MGi0vGTxDewgnXfgdJmtvUt6MBym_Raf4hR_OU4CxmjjNw3shBJOaHXCsL4sOqb2Ehoy1QgyffyZoA_3fDs-PHryzBKmtGvBXOj_A7c4w6IS-LU3MAo92Et4YQkahEuftk89cAc-LeSrwThb4lM1QUzhPAHMOVoTbQhzRAKzjjBcrSXcHHsn-Ozwhe3Wud76cNE7HHvd1Fq6pTZ7PP3GyZ7Gpv4cb9tLpU_rNXrekC_ff6xJy0YgVnRCYvHXw96-BJ8WByElgUY4IhRxoIgFbMzGPlfIa_wGRpC6B8N11w0YkeNyFHZg0roBW32J1yjlcD7MrbCAp14KLtzCYpAEk-I383Gc2x8l4yiKaZFkIVRxnqdFkZZZETZV0pRJyUInnITqA4VwaL0bZzCh9hjjGQ1Fzi0aDkZWfwUX7Q317IOU43lZ9Eb_wgTjUVg7AAbnLivilIZtBUXKyixKojRKdrtdmtMmLuoizTNGa5YnoWQ1SFsFGfYCVXAgkwnfqdkmFBWNKMUApDFukmIZpSUr87Kos9UqX1EepBFgz8ql5-GzHppqojTlMY2ksM6-PDJrxV4BTHBonw2u1aa6kZwZHU7I1cT8D7yPtPA">