This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27805] New: [4.2 regression] ICE with ptr-to-member of incomplete 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: 29 May 2006 20:57:32 -0000
- Subject: [Bug c++/27805] New: [4.2 regression] ICE with ptr-to-member of incomplete class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet causes an ICE on mainline:
=====================
struct A;
void foo()
{
int A::* p;
A a;
a.*p;
}
=====================
bug.cc: In function 'void foo()':
bug.cc:6: error: aggregate 'A a' has incomplete type and cannot be defined
bug.cc:7: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_m_component_ref, at cp/typeck2.c:1215
Please submit a full bug report, [etc.]
--
Summary: [4.2 regression] ICE with ptr-to-member of incomplete
class
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=27805