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 Err 892 in cc1plus on Solaris (egcs-2.91.54 19980816)


Hi, this is my second attempt to report the following bug.
(BTW: I have read the relevant info part, but the size limit of the
mailinglist which is mentioned on the webpage is not mentioned there.
I got no mail back, but my mail to egcs-bugs@cygnus.com was
somehow lost. I think the webpage should be mentioned in the info docs
about bug reporting and that MIME attachements and compression is okay.
Maybe the URL should also be mentioned when the compiler bails out.)


I am working with the mnemonic project and tried to compile 
a recent tree, which is know to compile unter Linux and egcs 1.0.3.
But i have problems on a simple file on Solaris.

SunOS ranec 5.5.1 Generic_103640-05 sun4m sparc
Reading specs from
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.54/specs
gcc version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental)
(Same problems ocurret with the last SNAPSHOT 19980803.)

c++ -D_REENTRANT -DPREFIX=\"\" -g -Wall -I. -I../include  -I/include -I../../src -I../../src/include  -g -O2 -DOIL=\"\"  -I../include -I../include/mnemonic -fPIC -c -o memcache.o memcache.cc
memcache.cc:35: Internal compiler error 892.
memcache.cc:35: Please submit a full bug report to `egcs-bugs@cygnus.com'.

It is a problem with cc1plus.
I created a cpp outputfile with the following command 
(the same as given by the above c++ with -v  and different filename.)

ranec utils 98:  /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.54/cpp -lang-c++ -v -I. -I../include -I/include -I../../src -I../../src/include -I../include -I../include/mnemonic -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix "-Asystem(unix)" "-Asystem(svr4)" -D__EXCEPTIONS -D__OPTIMIZE__ -g -g -Wall -D__GCC_NEW_VARARGS__ "-Acpu(sparc)" "-Amachine(sparc)" -D_REENTRANT -DPREFIX=" -DOIL=" memcache.cc memcache.after-cpp
GNU CPP version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 .
 ../include
 ../../src
 ../../src/include
 ../include/mnemonic
 /usr/local/egcs/include/g++
 /usr/local/include
 /usr/local/egcs/sparc-sun-solaris2.5.1/include
 /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.54/include
 /usr/include
End of search list.

You can get memcache.after-cpp at 
	http://www.usf.uni-osnabrueck.de/~breiter/private/probe/egcs/

It produces the following error:
ranec utils 99:  /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.54/cc1plus memcache.after-cpp  -quiet -dumpbase memcache.cc -g -g -O2 -Wall -version -fPIC -o memcache.s
GNU C++ version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental) (sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental).
memcache.cc:35: Internal compiler error 892.
memcache.cc:35: Please submit a full bug report to `egcs-bugs@cygnus.com'.


As the source files are relatively small, i attach them. 
Sorry that i have not the c++ knowledge and time to create a minimal bug case.

Regards
	Bernhard Reiter
ps.: I am not subscribe to this mailing list, 
please forward relevant answers to me.
#include "mnemonic/memcache.h"
#include "mnemonic/debug.h"
#define DEBUG_CLASS "CELEMENT"


int 
celement::count() { 
  debug("cnt: "<<cnt); 
  return cnt; 
}

void 
celement::ref()   {
  debug("cnt++: "<<cnt); 
  cnt++; 
}

void 
celement::unref() { 
  debug("cnt--: "<<cnt); 
  cnt--; 
}

const char* 
celement::name() { 
  return iname; 
}  

celement::celement(char *n) {
  debug("construct "<<n); 
  cnt=0;
  iname=n;
}

celement::~celement(char *n) {
  debug("destruct");
  free(iname);
}


celement *
memcache::find(const char* s) {
  
  if (cached.count(s)==0) {
    debug("found "<<s<<" not");
    return 0;
  }
  debug("found "<<s<<" used:"<<cached.count(s));
  return cached[s];
}

celement *
memcache::add(celement *d) {
  if (find(d->name())==0) {
    debug("adding "<<d->name());
    cached[d->name()]=d;
    d->ref();
    return cached[d->name()];	
  }
  debug("referencing "<<d->name());
  celement *k;
  k=cached[d->name()];
  k->ref();
  delete d;
  return k;
}

void 
memcache::del(char* s) {
  if (cached.count(s)==0) {
    debug("BUG trying to remove something that isn't there? "<<s);
    return; /*ERROR*/
  }
  celement *d=cached[s];
  debug("unreferencing "<<s);
  d->unref();
  if (d->count()==0) {
    debug("removing "<<s); 
    cached.erase(s);
    delete d;
  }
}
#include <string.h>
#include <stl.h>

class celement {
  char *iname;
  int cnt;
public:
  int count();
virtual void ref();
virtual void unref();
  celement(char *n=0);
virtual ~celement();
const char *name();
};

class ltstr {
public:
  bool operator()(const char * s1,const char *s2) const {
    return strcasecmp(s1,s2)<0;
  }
};


class memcache {
  map<const char*,celement *,ltstr> cached;
public:
  celement *find(const char* s);
  celement *add(celement *d);
  void del(char* s);
};
// -*- C++ -*-
#ifndef DEBUG_H
#define DEBUG_H


#include <mnemonic/optionals.h>

#define nod() debug(this)

#ifdef DEBUG
  #include <iostream.h>
  #define debug(x) if (debuger::instance().DebugOn(DEBUG_CLASS, __FILE__, __LINE__)) cerr << x << endl
  #include "debuger.h"
  #include "memdebug.h"
#else
  #define debug(x) 
#endif

#endif








PGP signature


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