This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51586] New: [4.7 Regression] ICE with invalid union
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Dec 2011 20:32:54 +0000
- Subject: [Bug c++/51586] New: [4.7 Regression] ICE with invalid union
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51586
Bug #: 51586
Summary: [4.7 Regression] ICE with invalid union
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following invalid code snippet triggers an ICE on trunk:
=======================
union U
{
union U { int i; };
};
=======================
bug.cc:3:9: error: 'U::U' has the same name as the class in which it is
declared
bug.cc:3:9: error: 'union' tag used in naming '<type error>' [-fpermissive]
bug.cc:3:9: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in cp_parser_check_class_key, at cp/parser.c:22627
Please submit a full bug report, [etc.]