Internal compiler error 378 in egcs-1.1.2

John F. Woods
Wed Apr 21 11:17:00 GMT 1999

I'm pretty sure the code being compiled is incorrect (the function
FindLockStructure below gets declared with a bogus type because there's no
forward declaration of struct DLockOffset, thus it's a useless private
type), but the internal compiler error message isn't the best way to abuse
the coder in question...  ;-)

[jfw@anvil jfw]$ g++ -v --save-temps -c t.cxx
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -lang-c++ -v -undef
C__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386
-D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__
-D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix)
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ t.cxx t.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cc1plus t.ii -quiet
-dumpbase -version -o t.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release)
(i386-redhat-linux) compiled by GNU C version egcs-2.91.66 19990314
(egcs-1.1.2 release).
t.cxx:34: Internal compiler error 378.
t.cxx:34: Please submit a full bug report to `'.
t.cxx:34: See <URL: > for details.

# 1 "t.cxx"
template<int nLiveSig, int nDeadSig>
class TSignature {
    friend void FindLockStructure(unsigned long, struct DLockOffset *& );
  enum {Signature=nLiveSig, Dead_Signature=nDeadSig};

  TSignature() : m_dwSignature(Signature) {}
        m_dwSignature = Dead_Signature;

  void TestSig() const {
    assert( m_dwSignature == Signature );

  bool LiveSignature() const {
        return m_dwSignature==Signature;

  unsigned int GetSignature() const {return m_dwSignature;}

    unsigned int m_dwSignature;

class DCladdrIndexedLru : public TSignature<6969, 9696> {
  long index;

class thingtwo {
    friend void FindLockStructure(unsigned long, struct DLockOffset *& );
    int stuff;

More information about the Gcc-bugs mailing list