[Bug c++/11276] New: Segfault with multiple inheritance after syntax error

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 20 23:15:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11276

           Summary: Segfault with multiple inheritance after syntax error
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: error-recovery
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: falk@debian.org
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu

Testcase:

Sambal_Badjak;
struct B { virtual void m() = 0; };
struct Empty1 : public B { };
struct Empty2 : public B { };
struct I : public Empty1, public Empty2 { void m(); };
void I::m() { }

% g++ --version               
g++ (GCC) 3.4 20030614 (experimental)
% g++ error-recovery.cc -c 
error-recovery.cc:1: error: expected constructor, destructor, or type 
   conversion
error-recovery.cc: In member function `void I::_ZThn8_N1I1mEv()':
error-recovery.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The actual kind of error seems to be irrelevant to trigger this.

3.3 just says:
error-recovery.cc:1: error: ISO C++ forbids declaration of `Sambal_Badjak' with 
   no type



More information about the Gcc-bugs mailing list