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