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 980711


While compiling with g++ I got an internal compiler error 980711:

cd h:/src/STLX/
make -k main
g++     main.cc   -o main
In file included from main.cc:1:
XFile.h:81: Internal compiler error 980711.
XFile.h:81: Please submit a full bug report to `egcs-bugs@cygnus.com'.
make: *** [main] Error 1

Compilation exited abnormally with code 2 at Wed Nov 04 15:08:01

My compiler information:

h:\src\STLX>g++ -v
g++ -v
Reading specs from C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

Verbose compiling says:

h:\src\STLX>g++ -v main.cc -o main
g++ -v main.cc -o main
Reading specs from C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\cpp.exe -lang-c++ -v -ipref
ix
C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\ -undef -D__GNUC__=2 -D__GN
UG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Di386 -D_WIN32 -DWIN32 -D__WIN32__
 -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__s
tdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute_
_((x)) -D__i386__ -D_WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__WINNT__
 -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=_
_attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386 -D__WI
N32 -D__WINNT -Asystem(winnt) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -re
map -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
main.cc C:\TEMP\ccRgaaaa.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\include\g++
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\include

C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\i386-mingw32\in
clude
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\include
 C:\mingw32\include\g++
 C:\mingw32\include
End of search list.
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\cc1plus.exe
C:\TEMP\ccRgaaaa.ii -quiet -dumpbase main.cc -version -o C:\TEMP\ccynaaaa.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) (i386-mingw32)
compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).
In file included from main.cc:1:
XFile.h:81: Internal compiler error 980711.
XFile.h:81: Please submit a full bug report to `egcs-bugs@cygnus.com'.

The text of the main file:

#include "XFile.h"

#include <iostream>

int
main ( )
{
  XFileStream xfs;
}

The text of the header file ("XFile.h") is:

// Emacs, this is -*- C++ -*-

#ifndef XFILE_H
#define XFILE_H

// $Id$

#include <string>
#include <vector>

template<class P,
  class V = typename P::value_type,
  class S = typename P::size_type>
class index_proxy
{
public:
  typedef P parent_type;
  typedef V value_type;
  typedef S size_type;

  // Need to lookup reference-to-member-function syntax and
  // parameterize these calls to be template parameters with default
  // values. --bko FIXME

  index_proxy& operator= (const value_type& v)
    { parent.write_value (index, v); return *this; }

  operator value_type ( ) const
    { return parent.read_value (index); }

private:
  friend parent_type;

  mutable const parent_type& parent;
  size_type index;

  index_proxy (const parent_type& p, size_type i)
    : parent (p), index (i)
    { }
};

class XFileStream
{
public:
  typedef unsigned char value_type;
  typedef unsigned long size_type;
  typedef index_proxy<XFileStream> index_type;

  index_type operator[] (size_type i)
    { return index_type (*this, i); }

  const index_type operator[] (size_type i) const
    { return (*this)[i]; }

  value_type read_value (size_type i) const
    { return data[i]; }

  void write_value (size_type i, const value_type& v)
    { data[i] = v; }

private:
  std::string name;
  std::vector<value_type> data;
};

class XFile
{
public:
  typedef typename XFileStream::value_type value_type;
  typedef typename XFileStream::size_type size_type;
  typedef index_proxy<XFileStream> index_type;

  index_type operator[] (size_type i)
    { return streams[""][i]; }

  const index_type operator[] (size_type i) const
    { return (*this)[i]; }

private:
  std::string name;
  std::map<std::string, XFileStream> streams;
};

#endif

Is there anything else I can do?

Cheers,
--binkley



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