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

    <tr>
        <th>Summary</th>
        <td>
            Full specialization of variable template in module causes multiple definitions
        </td>
    </tr>

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

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

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

<pre>
    The following set of files

```
export module a;

export template<typename T>
int x = 0;

template<>
int x<int> = 0;
```

```
import a;

int main() {
}
```

causes linking to full with a duplicate symbol error for `x<int>`. Changing to a partial specialization (for instance, using `std::same_as<int>`) appears to fix the issue.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Ul1vpDAM_DXmxeoqhO8HHtrd7i_o-8mAWXwXEpSEftyvP0G313Z1OgmBiD3j8WQoBLlY5haKByhOCa1xcr4d6FmGEJ3lpHPDW_s0MY7OGPci9oKBI7oRRzEcQJ1A3V_fpbo--y-_Ls5HnN2wGkaC7OFr87UaeV4MRYbsGN8WtjQzPkH2-N4kNuIrQnZCdQP_gvveDdlRbITs8Rb2Xdw_D2XeNd1K3XhnEgu6Bt0gVB_V6vQf7p7WwAGN2F-badHhuBqDLxInJBzWxUhPkTG8zZ0zyN47j6PzCKX63AJKdcDjRPZyJSFcyEchg2HhXsjIb4riLIKuN7TYEMn2DPqIa9hAUKoQB8juIbsPNPMPCl_pt5VoWZh82EXKK8aJUUJY-ZAMbTY0WUMJt2lZ6VJXeZEmU5tSM5Tc9OWYZmWVpyMXdap0p4eqKmtVJNJqpTOVKq10nqfpIa_7otbEQ6r6hniAXPFMYg7GPM8H5y_JPrItmqpWiaGOTdhjqbXll3c9oPWWUt9umLtuvQTIlZEQwydLlGi4PW9e3zjkRnwmL9QZ_ps7FPuR0OuFzauJshjGgUexsiFDsnrTTjEuYbNRn0GfLxKntTv0bgZ93oZfP3eLdz-5j6DPu-QA-ryv9CcAAP__egoMlQ">