c++/5565: g++ crashes on struct that is defined twice
reichelt@igpm.rwth-aachen.de
reichelt@igpm.rwth-aachen.de
Fri Feb 1 01:46:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list