The C frontend ICEs on the following invalid code snippet: ============================== struct A { int i; void x[1]; };
void foo(struct A a) {} ============================== bug.c:4: error: declaration of 'x' as array of voids bug.c: In function 'foo': bug.c:7: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in classify_argument, at config/i386/i386.c:2979 Please submit a full bug report, [etc.] The ICE happens since GCC 3.1 and in GCC 2.95.3. In GCC 3.0.x we did not ICE. -- Summary: [4.0/4.1/4.2 regression] ICE with invalid array in struct 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=27421