Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!wheelan From: wheelan@cs.mcgill.ca (Bill HEELAN) Newsgroups: comp.sys.next Subject: Bug in cc++ Keywords: bug, C++, cc++ Message-ID: <1991Apr23.020157.21859@cs.mcgill.ca> Date: 23 Apr 91 02:01:57 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 40 Originator: wheelan@quiche.cs.mcgill.ca The C++ compiler under 2.0 (cc++) dies with an internal error when given the following program. It should give a more helpful warning instead. :-) - Bill Script started on Mon Apr 22 20:42:57 1991 % cc++ -c bug.c Assertion failed: !integer_zerop (expr), file cplus-cvt.c, line 1124. cc++: Internal compiler error. Program cc1++ got fatal signal 6. % % cat bug.c class Foo { int x ; // just to get rid of a compiler warning public: Foo( void ) {} } ; class Bar : public Foo { public: Bar( void ) {} } ; void zarf( void ) { Foo *n ; if((n = new Bar()) == (Bar *)0) // ... == (Foo *)0) works. { } } % exit % script done on Mon Apr 22 20:43:19 1991