<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/153455>153455</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[bug][clang] SBC when generating code for calls to explicitly defined ctors of implicit specializations
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cdacamar
</td>
</tr>
</table>
<pre>
Here's the smallest repro:
```c++
void doit();
template <typename>
struct Z {
Z() = delete;
};
template <>
Z<int>::Z() { doit(); }
int main() {
Z<int> z;
}
```
When clang compiles this sample, the call to the ctor is completely gone in the generated code regardless of optimization level.
This is the more elaborate repro: https://godbolt.org/z/PM1vx7oa5.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxskk-L2zwQxj_N-DJssKVo7Rx8yJ83vJdCoYXC3mRp4qjIlpHG6WY_fZGd7ralMJAYzTwz83tGp-T6kagFdQB1KvTM1xBbY7XRg45FF-y9_Z8igagT8pUwDdp7SoyRphhA7qFc4rlcw4A45Cj3t-As2uAYRANiB_KwpjINk9dMCPLI94lGPRDI_6DcJ46zYXxBqHMu4staiiBPaMkT00OlPv1TbpV5AXl0I-cPuQe5f1epD3_Og1lnEXEj46Dd-JG59M8T_NLCt4_ev-271n-70ojG67FHE4bJecq0XMKkh8kTiOMCz2jvkcP6n0NEl5b8vJm_Yx9GQjcuzz2NFDWTRRMsYaReR-spJQwXDBO7wb1pdmFETzfym3WOr7mnW50aQiQkr7uQdd79wivzlDIZcQZx7oPtgudNiD2I8xuI8-dP1e21DlptCttKu5M7XVBb1UpVZSOburi2l0ZV5W5npVSkaqF2lws1ZOqGbGlUXRauFaVQZVPJqimfRb25CKkqYezzjqqm20rYljRo5zfe34bcvHApzdRWSm6VKrzuyKflKoVYuIIQ-UBjmwueurlPsC29S5w-JNixX065m3tQJ1CHtVSd8MvhiD-ySQ-ubnHKEl5CXGxJ2Rd6nbwzjv0dLV3cmOlziAtzN6xvmCYyTvsH_lTM0bd_MXV8nbuNCQOIc57u8fM0xfCdDIM4L9smEOfHwrdW_AwAAP__zqUZHA">