This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31751] New: [4.1/4.2/4.3 regression] ICE with forgotten member declaration
- 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: 29 Apr 2007 11:18:51 -0000
- Subject: [Bug c++/31751] New: [4.1/4.2/4.3 regression] ICE with forgotten member declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE since GCC 4.0.0:
==========================================================
struct A
{
int i;
};
template<typename T> int A::foo(int T::*) { return 0; }
int j = A::foo(&A::i);
==========================================================
bug.cc:6: error: no 'int A::foo(int T::*)' member function declared in class
'A'
bug.cc:6: error: template definition of non-template 'int A::foo(int T::*)'
bug.cc:8: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_type_parm in lookup_base, at
cp/search.c:213
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2/4.3 regression] ICE with forgotten member
declaration
Product: gcc
Version: 4.3.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=31751