🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1249

Internal compiler error cc1plus

#1249
From: Dan Mack
Date: Sat, 03 Oct 1992 19:04
49 lines
2083 bytes
The bug is an Internal compiler error.  Here's an example:

% g++ -c -v -Wall bug.cc
Reading specs from /usr/contrib/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
 /usr/contrib/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Wall bug.cc /usr/tmp/cca02208.i
GNU CPP version 2.2.2 (sparc)
 /usr/contrib/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cc1plus /usr/tmp/cca02208.i -quiet -dumpbase bug.cc -Wall -version -o /usr/tmp/cca02208.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
/usr/contrib/bin/gcc: Internal compiler error: program cc1plus got fatal signal 11

Here is bug.cc:

/* beginning of bug.cc */

#include <stream.h>

template<class T> 
class vector {
 public:
  vector(int) { };
};

template<class T>
ostream& operator<<(ostream& strm, vector<T> &) {
  return strm;
}

main() {
  vector<int> v(10);
  cout << "v=" << v << "\n";
}

/* end of bug.cc */

I've noticed this problem under two different situations:

 gcc 2.2.2 configured with sparc-sun-sunos4.1 using s sparcstation running
 SunOS 4.1.1

 gcc 2.1 on an Atari ST fails to compile bug.cc and aborts with two
 bombs and no error messages.

Dan

-- -- -- --- --- --- ----   ___  ---- ----- ----- ----- ------ ------ ----
Dan Mack (mack@cray.com)   / | \      "We're not hitchiking anymore... ..
Sun/SGI Resource Group     \/_\/           We're riding!"  -Commander Hoek
Cray Research, Eagan MN   ----- ----- ---- ---- ---- --- --- --- -- -- ---
Technical Details
Message-ID: <9210031904.AA02237@redwood52.cray.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!redwood.cray.com!mack

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!redwood.cray.com!mack
From: mack@redwood.cray.com (Dan Mack)
Subject: Internal compiler error cc1plus
Message-ID: <9210031904.AA02237@redwood52.cray.com>
Sender: gnulists@ai.mit.edu
Reply-To: mack@cray.com
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 3 Oct 1992 19:04:52 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 50