This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5565: g++ crashes on struct that is defined twice



>Number:         5565
>Category:       c++
>Synopsis:       g++ crashes on struct that is defined twice
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 01 01:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc 3.1 20020128 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu, mips-sgi-irix6.5
>Description:
g++ crashes on the following code

struct Base { virtual void f(); };
struct Wrong : public Base {};
struct Wrong : public Base {};

with the error message

bug.cpp:3: redefinition of `struct Wrong'
bug.cpp:2: previous definition of `struct Wrong'
bug.cpp:3: Internal compiler error in build_primary_vtable, at 
   cp/class.c:638
Please submit a full bug report, [etc.]

Just compile the code with "g++ -c".

The same code caused different problems with gcc 2.96,
see PR 1519.
>How-To-Repeat:
g++ -c filename.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]