This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error
- To: egcs-bugs at cygnus dot com
- Subject: Internal compiler error
- From: Michael Ward <mward at are dot Berkeley dot EDU>
- Date: Wed, 29 Oct 1997 22:16:12 -0800
egcs requested a bug report. The code it puked on is probably illegal in
C++ -- I'm just learning.
session script:
-------------------
> egcs_g++ matrix.cc
matrix.cc: In method double & matrix::operator ()(unsigned int, unsigned int)':
matrix.cc:38: Internal compiler error.
matrix.cc:38: Please submit a full bug report to egcs-bugs@cygnus.com'.
-------------------
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);
public:
...
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)
{
...
switch(type_)
{
case Matrix: ref = &mx; return;
case Scalar: ref = ≻ return;
case Row_vec: ref = &rv; return;
case Col_vec: ref = ≻ return;
}
} }