Xref: utzoo comp.lang.c++:10057 gnu.g++.help:35 Path: utzoo!attcan!uunet!midway!ncar!asuvax!cs.utexas.edu!uwm.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!chalmers.se!appli!niklas From: niklas@appli.se (Niklas Hallqvist) Newsgroups: comp.lang.c++,gnu.g++.help Subject: G++ bug with MI & virtual base classes Summary: virtual base class bug in G++ discovered. Keywords: MI bug G++ virtual base class Message-ID: <1165@appli.se> Date: 21 Oct 90 22:57:50 GMT Followup-To: comp.lang.c++ Organization: Applitron Datasystem AB, GOTHENBURG, SWEDEN Lines: 29 I have encountered a bug in G++ 1.37.1 (with some 1.37.2 additions) using MI and virtual base classes. Compiling the following no-op file: class a {}; class b { public: ~b() {} }; class c : virtual a, b { public: ~c() {} }; results in: Failed assertion `DECL_OFFSET (TYPE_NAME (basetype))' at line 3331 of `cplus-init.c'. g++: Program cc1plus got fatal signal 6. Of course, these class definitions don't make sense as they are given, but still, if I've done something illegal (which I fail to see) there should be an error message, not a core dump. What I'm asking is: 1. Is the given example legal C++? 2. Which compilers out there fail to compile the code (product & vers.no)? 3. Is it OK in the real G++ 1.37.1 or 1.37.2 (as I said, I've got an intermediate version) Thanks! Niklas -- Niklas Hallqvist Phone: +46-(0)31-19 14 85 Applitron Datasystem Fax: +46-(0)31-19 80 89 N. Gubberogatan 30 Email: niklas@appli.se S-416 63 GOTEBORG, Sweden sunic!chalmers!appli!niklas