https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71011
Bug ID: 71011
Summary: Wrong "may be uninitialized" warning
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bobby.prani at gmail dot com
Target Milestone: ---
I am getting a warning that "data" may be uninitialized. But there is no such
variable being used anywhere.
src/allocate.cc: In member function ‘void allocate_c::run_a_cycle()’:
src/allocate.cc:136:19: error: ‘data’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
else if (uop->m_uop_type == UOP_IADD || // integer register
~~~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors
Please find attached the source along with pre-processed file. Tested with g++
4.7 and up and it is the same in all versions.