This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types


An example which I came up when looking at PR 2692:
(Note that more opportunities for this comes up after my casting pass is installed)

struct dcomplex
{
  dcomplex(double  =0.0, double =0.0);
  dcomplex& operator*=(const dcomplex&);
  typedef __complex__ double _ComplexT;
  _ComplexT _M_value;
  dcomplex(_ComplexT __z) : _M_value(__z) { }
};
inline dcomplex
operator*(const dcomplex& __x, const dcomplex& __y)
{ return dcomplex (__x) *= __y; }
inline
dcomplex::dcomplex(double __r, double __i)
{
  __real__ _M_value = __r;
  __imag__ _M_value = __i;
}
  inline dcomplex&
  dcomplex::operator*=(const dcomplex& __z)
  {
    _ComplexT __t;
    __real__ __t = __real__ __z._M_value;
    __imag__ __t = __imag__ __z._M_value;
    _M_value *= __t;
    return *this;
  }
typedef dcomplex Complex8;
Complex8 m;
Complex8 g;
void determinant()
{
  Complex8 _m = m;
  Complex8 t = _m * _m;
  g = t;
}

-- 
           Summary: [tree-ssa] no SRA of structs containing complex types
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]