This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5565: g++ crashes on struct that is defined twice
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 1 Feb 2002 09:39:18 -0000
- Subject: c++/5565: g++ crashes on struct that is defined twice
- Reply-to: reichelt at igpm dot rwth-aachen dot de
>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: