This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class
- 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: 21 Jan 2008 23:25:09 -0000
- Subject: [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE since GCC 4.1.2:
============================================
void foo()
{
struct A
{
friend void bar();
};
bar();
}
============================================
bug.cc: In function 'void foo()':
bug.cc:7: internal compiler error: in lookup_name_real, at
cp/name-lookup.c:4054
Please submit a full bug report, [etc.]
The code was wrongfully accepted before GCC 4.1.0, but correctly diagnosed in
GCC 4.1.0 and 4.1.1.
--
Summary: [4.1/4.2/4.3 regression] ICE with friend in local class
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, 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=34912