[Bug c++/71011] Wrong decl in a "may be uninitialized" warning
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 8 20:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71011
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-05-08
Summary|Wrong "may be |Wrong decl in a "may be
|uninitialized" warning |uninitialized" warning
Ever confirmed|0 |1
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What is happening is ssa_name which was used with uop is being renamed to be
use the data decl
Which:
uop_c *uop = (uop_c *)m_frontend_q->peek(0);
Where peek is defined as :
T peek(int entry)
{
....
T data;
int count = 0;
for (int ii = m_current_index; ii < m_current_index + m_size; ++ii) {
int index = ii % m_size;
for (auto I = m_entry[index].begin(), E = m_entry[index].end(); I != E;
++I) {
if (count++ == entry) {
data = (*I)->m_data;
break;
}
}
}
return data;
}
If m_size was 0, then data would be unitialized or if
m_entry[m_current_index].empty() is false. I have not dug in to see m_size can
not be non 0 or GCC can figure out if it can be non 0 or the other case is
true.
So only the decl in the warning is incorrect as far as I can tell.
More information about the Gcc-bugs
mailing list