Strange message and wrong code only happen with -O3 + -fPIC.

 g++ -c -g -O3 -Wall -fPIC cic.ii 
src/cic.hpp: In member function &#8216;void CICDecim<inputtype>::Compute(const 
in_t&, out_t&) [with in_t = boost::numeric::ublas::vector<int, 
boost::numeric::ublas::unbounded_array<int, std::allocator<int> > >, out_t = 
boost::numeric::ublas::vector<int, boost::numeric::ublas::unbounded_array<int, 
std::allocator<int> > >, inputtype = int]&#8217;:
src/cic.hpp:66: warning: &#8216;x&#8217; may be used uninitialized in this
function
src/fixed.hpp: In member function &#8216;void
CICDecim<inputtype>::Compute(const 
in_t&, out_t&) [with in_t = boost::numeric::ublas::vector<std::complex<int>, 
boost::numeric::ublas::unbounded_array<std::complex<int>, 
std::allocator<std::complex<int> > > >, out_t = 
boost::numeric::ublas::vector<std::complex<int>, 
boost::numeric::ublas::unbounded_array<std::complex<int>, 
std::allocator<std::complex<int> > > >, inputtype = std::complex<int>]&#8217;:
src/fixed.hpp:36: warning: &#8216;__imag__
x.std::complex<double>::_M_value&#8217; is used 
uninitialized in this function
src/fixed.hpp:36: warning: &#8216;__real__
x.std::complex<double>::_M_value&#8217; is used 
uninitialized in this function


-- 
           Summary: Strange message + bad code generated for -fPIC -O3
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ndbecker2 at gmail dot com
  GCC host triplet: gcc-c++-4.1.2-27.fc7.x86_64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33654

Reply via email to