Internal compiler error

Michael Ward mward@are.Berkeley.EDU
Wed Oct 29 22:16:00 GMT 1997

egcs requested a bug report.  The code it puked on is probably illegal in
C++ -- I'm just learning.

session script:
> egcs_g++ In method double & matrix::operator ()(unsigned int, unsigned int)': Internal compiler error. Please submit a full bug report to'. 
snapshot 971023 (clean source)
Solaris 2.5 (hypersparc)
the offending code fragment:

typedef unsigned uint;
class matrix : public vector<double> 
 reference (matrix::*ref) (uint, uint);
 iterator next(void)  {return next_++;}
 reference sc (uint i, uint j) {return *begin();}
 reference rv (uint i, uint j) {return (*this)[j];}
 reference cv (uint i, uint j) {return (*this)[i];}
 reference mx (uint i, uint j) {return *next();}
 reference operator() (uint i, uint j) {return this->ref(i,j);} // *** Line 38 ***

void matrix::resize (uint a, uint b) 
  case Matrix:   ref = &mx; return;
  case Scalar:   ref = ≻ return;
  case Row_vec:  ref = &rv; return;
  case Col_vec:  ref = ≻ return;
}					      }

More information about the Gcc-bugs mailing list