<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82319>82319</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`llvm::BitTracker::UseQueueType::Uses` is constructed from uninitialized member
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Eisenwave
</td>
</tr>
</table>
<pre>
I got this warning when compiling LLVM with g++:
```
In file included from /home/user/projects/llvm-project/llvm/lib/Target/Hexagon/HexagonBitTracker.h:12,
from /home/user/projects/llvm-project/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp:9:
/home/user/projects/llvm-project/llvm/lib/Target/Hexagon/BitTracker.h: In constructor ‘llvm::BitTracker::UseQueueType::UseQueueType()’:
/home/user/projects/llvm-project/llvm/lib/Target/Hexagon/BitTracker.h:75:27: warning: member ‘llvm::BitTracker::UseQueueType::Dist’ is used uninitialized [-Wuninitialized]
75 | UseQueueType() : Uses(Dist) {}
|
```
This looks to be a true positive:
https://github.com/llvm/llvm-project/blob/119a72866f0e143127355fe6e03f57c4f8bab1ae/llvm/lib/Target/Hexagon/BitTracker.h#L74-L76
This performs initialization from an uninitialized member due to the order of declaration:
https://github.com/llvm/llvm-project/blob/119a72866f0e143127355fe6e03f57c4f8bab1ae/llvm/lib/Target/Hexagon/BitTracker.h#L103-L105
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVE1v2zgQ_TWjy8AGRerzoIMdx9gA3sMCzu6ZkkYSN5IokFTc9NcXVBw7SXNJ0RY1CJhvBJLz3sw8aa1qR6IC4i3Eu0DOrtOmuFWWxpN8pKDU9VNxh6126Dpl8STNqMYWTx2NWOlhUr2Hh8O_f-NJuQ5b4Fu_xAbYDtgGEnZeC7wbsVE9oRqrfq6pxsboAYHvOz0Q8P1syQDfT0b_T5WzwPd9_ziszvgM_Z8qge-P0rTko3_RF9nq8brbKnc0snogs-5AbEIO_OY5A3z_-_UZVNMEYpNfNfl5j73jiXe-KqN1Zq6cNgi3HDIGebbcIzYgNtcTz_je0j8zzXR8muiDCM-A5y_X_A4KaQxiw1NP5txsfjvQUNIP8tkp6y4MUFmcLdU4j2pUTslefaUaId6u_nsTgnh3aZg0Rkhvlm75Xhz0-d1bssCz5SkfSreQ7l43HKQ3Hw7E0U9Vr_WDRaexJJTozEw4aauceqSL4p1zk_WI74HvW-W6uVxXenil8Fvdy157xcMwlynPkqRhFEYi5KmI44YSYqKJ0ypqslKWoaTPVoqLQxqtDmlypnVlM5FptBksXtSUTunxedDk-E75c2XrmbwAriPUpiaDusGaql6a5fCfLEPIxOoQsjioC1HnIpcBFWHKsijMOBNBV4hSZmFWNWkoKZZMEDWSU1hHCWV5VMeBKjjjEeOcsUwkkVjXWUipqGshEoqaWELEaJCqX_vc1tq0gbJ2piLjIsyDXpbU28XDOR_phMtH4NxbuikWQcq5tRCxXllnr7c45XoqIGGf9AcLCfOTdPGaFyf_qLbBbPri03VbOHg7WTh-CwAA__8pZhgE">