[gnu.g++.bug] BUG in G++ 1.32.0 - Fatal assertion error @ 992 of cplus-convert.c

rfg@MCC.COM (Ron Guilmette) (01/19/89)

The following short program causes the "compiler proper" part of
G++ 1.32.0 (i.e. the c++ program) to abort.

Commenting out the call to init causes the abort to go away, and
the error messages then produced reveal that this program has
some apparent semantic errors.  The results of compiling this
program are:

   g++ -v -B./ -S x02.cc
   g++ version 1.32.0
    ./cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix x02.cc /tmp/cca06039.cpp
   GNU CPP version 1.32
    ./c++ /tmp/cca06039.cpp -quiet -dumpbase x02.cc -noreg -version -o x02.s
   GNU C++ version 1.32.0 (68k, MIT syntax) compiled by CC.
   In function void leaf::init (struct handle &):
   x02.cc:14: warning: parameter `l' never used
   Failed assertion at  __LINE__ 992 of `cplus-convert.c'.
   g++: Program c++ got fatal signal 6.


/* ------------------- compiler-aborts/x02.cc ------------------------*/
struct	handle
{
  int	node_id;
};


struct leaf : public handle
{
  void init(handle&);
};

void leaf::init(handle& l)
  {
  }
	
struct tree_top : public leaf
{
  tree_top();
};

tree_top::tree_top() : leaf()
  {
    handle& prev = *this;

    init(prev);
  }