The following invalid code snippet triggers an ICE since GCC 4.1.0: ====================== struct A { static int i; int j; };
A a = { i:0 }; ====================== bug.cc:7: error: 'A' has no non-static data member named 'i' bug.cc:7: internal compiler error: in process_init_constructor_record, at cp/typeck2.c:895 Please submit a full bug report, [etc.] -- Summary: [4.1/4.2 regression] ICE on invalid designated initializer 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=28291