drazen@VLSI.CALTECH.EDU (Drazen Borkovic) (04/27/89)
This program is incorrect because method 'g()' does not exist for the class 'a'. The compiler gets the signal and terminates ungracefully. -------------------------------------------------- Script started on Wed Apr 26 10:13:02 1989 % cat bug.c class a{ int i; public: a(); }; void f( a* p) { p->g(); } % % % test-g++ -v -S bug.c g++ version 1.35.0- /usr/local/lib/gcc-test/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 bug.c /tmp/cca15418.cpp GNU CPP version 1.34.9 /usr/local/lib/gcc-test/gcc-c++ /tmp/cca15418.cpp -quiet -dumpbase bug.c -noreg -version -o bug.s GNU C++ version 1.35.0- (68k, MIT syntax) compiled by GNU C version 1.34. In function void f (struct a *): bug.c:10: Segmentation violation test-g++: Program c++ got fatal signal 11. % exit script done on Wed Apr 26 10:13:37 1989 ---------------------------------------------------------- Hope this helps. Drazen Borkovic, Caltech 256-80, Pasadena, CA 91125 e-mail: drazen@vlsi.caltech.edu