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]

internal compiler error/signal 11 in egcs-1.1.2pre3


Hello,

    The attached source file gives the following error with egcs
1.1.2pre3.  The test program isn't complete
but it shouldn't fail in this way anyway.  I have a more fully defined
set of files that does the same thing.

miranda(0):~/projects/matrix% /opt/egcs/bin/c++ -o foo foo.cpp
c++: Internal compiler error: program cc1plus got fatal signal 11
miranda(1):~/projects/matrix% /opt/egcs/bin/c++ --version
egcs-2.91.63
miranda(0):~/projects/matrix% uname -a
SunOS miranda 5.7 Generic i86pc i386 i86pc


--
James Macnicol
j-macnicol@adfa.edu.au
template <class T>
class CMatrix {
  CMatrix(void) { }
  virtual ~CMatrix(void) { }
#define FRIEND_MM_LOG_OP_DEF(op) \
template <class U> \
friend CMatrix<bool> operator op <>(const CMatrix<T> &first, \
                                    const CMatrix<U> &second);

#define FRIEND_MS_LOG_OP_DEF(op) \
template <class U> \
friend CMatrix<bool> operator op <>(const CMatrix<T> &first, \
                                    const U &second);

  // Logical operations
  FRIEND_MM_LOG_OP_DEF(==)
  FRIEND_MS_LOG_OP_DEF(==)
  FRIEND_MM_LOG_OP_DEF(!=)
  FRIEND_MS_LOG_OP_DEF(!=)
  FRIEND_MM_LOG_OP_DEF(<)
  FRIEND_MS_LOG_OP_DEF(<)
  FRIEND_MM_LOG_OP_DEF(>)
  FRIEND_MS_LOG_OP_DEF(>)
};

#define MM_LOG_OP_IMPL(op, opfunc) \
template <class T, class U> \
CMatrix<bool> operator op(const CMatrix<T> &first, const CMatrix<U> &second) \
{ \
  return (first.BooleanOperation(second, opfunc)); \
}

#define MS_LOG_OP_IMPL(op, opfunc) \
template <class T, class U> \
CMatrix<bool> operator op(const CMatrix<T> &first, const U &second) \
{ \
  return (first.BooleanOperation(second, opfunc)); \
}

MM_LOG_OP_IMPL(==, OpEqual)
MS_LOG_OP_IMPL(==, OpEqual)
MM_LOG_OP_IMPL(!=, OpNotEqual)
MS_LOG_OP_IMPL(!=, OpNotEqual)
MM_LOG_OP_IMPL(<, OpLessThan)
MS_LOG_OP_IMPL(<, OpLessThan)
MM_LOG_OP_IMPL(>, OpGreaterThan)
MS_LOG_OP_IMPL(>, OpGreaterThan)

int main(void)
{
  CMatrix<double> foo

  return (0);
}

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