<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75005>75005</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Miscompilation: Constructor with single-element initializer_list is not called in functions with `auto`-typed arguments
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
suisen-cp
</td>
</tr>
</table>
<pre>
I don't have a clang environment, but I ran into some strange behavior while trying codes in Wandbox.
Here is the codes showing the bug:
- Constructs from an `initializer_list` with a single element in a function with an `auto`-typed argument: https://wandbox.org/permlink/Bzxnxkyqz6ytGMm8
- **Incorrectly constructed from `int`**
- Constructs from an `initializer_list` with multiple elements in a function with an `auto`-typed argument: https://wandbox.org/permlink/SuhCxjLYeXT0Cp8L
- Correctly constructed from `initializer_list`
- Constructs from an `initializer_list` with a single element in a function with a non-`auto`-typed argument: https://wandbox.org/permlink/ngw68tnB4ENAtn1F
- Correctly constructed from `initializer_list`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0lMtu2zoQhp-G2gxkkJQtywstHOfoNEDSTQu0XRUUNZaYUKTKiy95-oK20yQoigJBs5EAaYb4v_nAEd6r3iDWZHFFFteZiGGwrvZReTS5nLLWdsf6BjprCF8GGMQOQYDUwvSAZqecNSOaQPgG2hjgBpwwoEyw4O2I4IMTpkdocRA7ZR3sB6URgjsq04O0HXpQBr4I07X2MCP0mtD1-fkBHYLyEAa8FPrB7lNb-tLGnhTrl_U5bKzxwUUZPGydHUEYICVVRgUltHpE910rH0hJYa_CAAK8Mr1GQI2JIQURsI1GBmXNpeZ0hIjBkpLm4ThhB8L18cRcrGEIYfIpCG8Ib_YXDOt6wpsJ3aiVeSC8uXo8mMPD8cdjeQz_343VOTEA5ED4mvD1jZHWOZRBH0E-YWB35jhBpNzn2jfijlEHNT3j-nfk_RSHzeH-9ht-_Uw3U3X7gnfzF87f0r-nXTDW5P8C2PT7sgrmav7fx3UwrHkCfgNv1tVFtypWIsOaLSnnBWOUZkNdMI7VasG2rGIdylXFWIVSLhdUrMqq6DJVc8oLxhlly0XF6axsGZVzSUvWlVtkSzKnOAqlZ1rvxgSRKe8j1ssFpYtMixa1P20Czg3u4fSTcJ4Wg6tTT97G3pM5TVH98ylBBY31nfLSjpPSIk04De-XsnTx08DPSvJnJa_p03U3NoAUWmOXjD358uf-P6ryWXS6fi2rV2GI7UzakfAmZb288snZe5SB8OZE6AlvThP4GQAA__-dPLL8">