The following invalid testcase triggers an ICE since GCC 4.0.0: ========================================= struct A { int i; void foo() { int A::i = i; } }; =========================================
bug.cc: In member function 'void A::foo()': bug.cc:6: error: extra qualification 'A::' on member 'i' bug.cc:6: error: 'int A::i' is not a static member of 'struct A' bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:6: internal compiler error: in make_decl_rtl, at varasm.c:1002 Please submit a full bug report, [etc.] -- Summary: [4.0/4.1/4.2 regression] ICE with invalid variable declaration 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=28257