[gnu.g++.bug] 1.35.0- core dumps

jjc@UUNET.UU.NET (James Clark) (05/11/89)

I've been playing with MI some more. G++ core dumps on the following:

Script started on Thu May 11 12:08:33 1989
jclark% cat test.c
#include <stdio.h>

struct A {
  virtual foo() { fputs("A::foo()\n", stderr); }
};

struct B {
  bar() { fputs("B::bar()\n", stderr); }
};


struct C : A, virtual B {
};

main()
{
  C *p = new C;
  p->foo();
  p->bar();
}
jclark% make test
/u/local/g++/g++ -B/u/local/g++/ -g -v -I.   -sun4 -o test test.c 
g++ version 1.35.0-
 /usr/local/lib/gcc-cpp -+ -v -I. -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ test.c /tmp/cca25213.cpp
GNU CPP version 1.35
 /u/local/g++/cc1plus /tmp/cca25213.cpp -quiet -dumpbase test.c -noreg -version -G -o /tmp/cca25213.s
GNU C++ version 1.35.0- (sparc) compiled by GNU C version 1.35.
In function int main ():
test.c:17: Segmentation violation
/u/local/g++/g++: Program cc1plus got fatal signal 11.
*** Error code 1
make: Fatal error: Command failed for target `test'
jclark% exit
jclark% 
script done on Thu May 11 12:09:52 1989

James Clark
jjc@jclark.uucp

tiemann@YAHI.STANFORD.EDU (Michael Tiemann) (05/11/89)

That was an easy one to fix.

Michael