The following invalid code snippet triggers an ICE on mainline: ======================== extern struct A a[1];
void foo() { a[0]; } ======================== bug.cc: In function 'void foo()': bug.cc:5: error: invalid use of incomplete type 'struct A' bug.cc:1: error: forward declaration of 'struct A' bug.cc:5: internal compiler error: tree check: expected class 'expression', have 'exceptional' (error_mark) in build_array_ref, at cp/typeck.c:2626 Please submit a full bug report, [etc.] The regression appeared between 2008-08-29 and 2008-09-06. -- Summary: [4.4 regression] ICE with invalid array access Product: gcc Version: 4.4.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=37552