🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #234

cc1plus fatal signal 6: address-of constructor

#234
From: Doug Moore
Date: Sun, 12 Apr 1992 03:39
57 lines
1982 bytes
GNU C++ compiler version 2.1, with Tiemann and Stump patches.  Sunos
4.1. Sparc 2.  Compiling the program below crashes the cc1plus with
fatal error 6.  It has been stripped to its essential elements.  In
particular, the destructor defined for Atoms is essential for creating
the conditions for the crash, as are the dots and arrows of the final
assignment statement.

Doug Moore
(dougm@cs.rice.edu)

Compiler output:
c++ -c -g -v -Wall Sexpr.value.cc
Reading specs from /marsh/comp212/lib/gcc-lib/sun4/2.1/specs
gcc version 2.1
 /marsh/comp212/lib/gcc-lib/sun4/2.1/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 -g -Wall Sexpr.value.cc /usr/tmp/cca05820.i
GNU CPP version 2.1 (sparc)
 /marsh/comp212/lib/gcc-lib/sun4/2.1/cc1plus /usr/tmp/cca05820.i -quiet -dumpbase Sexpr.value.cc -g -Wall -version -o /usr/tmp/cca05820.s
GNU C++ version 2.1 (sparc) compiled by GNU C version 2.1.
/marsh/comp212/bin/sun4/gcc: Internal compiler error: program cc1plus got fatal signal 6

Compilation exited abnormally with code 1 at Sat Apr 11 22:27:17

Source code:
----------------cut here--------------------------------------------
enum AtomName  {NUL};

class Atom
{
public:
  AtomName type;
  Atom(AtomName);
  ~Atom();
};

class Pair;

class Sexpr
{
private:
  Atom *sAtom;
  
public:
  Sexpr value() const;
};

class Pair
{
public:
  Sexpr head;
  Sexpr tail;
};

Sexpr Sexpr::value() const
{
  Pair* tempPtr;
  tempPtr->tail.sAtom = &Atom(NUL);
}
Technical Details
Message-ID: <9204120339.AA06200@cs.rice.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm
From: dougm@cs.rice.edu (Doug Moore)
Subject: cc1plus fatal signal 6: address-of constructor
Message-ID: <9204120339.AA06200@cs.rice.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sun, 12 Apr 1992 03:39:07 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 60