This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27951] New: [4.0/4.1/4.2 regression] ICE with invalid anonymous union
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2006 10:16:37 -0000
- Subject: [Bug c++/27951] New: [4.0/4.1/4.2 regression] ICE with invalid anonymous union
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE in the C++ frontend since
GCC 4.0.0:
======================================
void foo()
{
int i;
union { int i; };
}
======================================
bug.cc: In function 'void foo()':
bug.cc:4: error: redeclaration of 'int i'
bug.cc:3: error: 'int i' previously declared here
bug.cc:4: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'error_mark' in finish_anon_union, at
cp/decl2.c:1121
Please submit a full bug report, [etc.]
Will post a patch soon.
--
Summary: [4.0/4.1/4.2 regression] ICE with invalid anonymous
union
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27951