The following invalid code snippet triggers an ICE since at least GCC 2.95.3:
================================= union U { void x[1]; }; void foo() { (union U)0; } ================================= bug.c:1: error: declaration of 'x' as array of voids bug.c: In function 'foo': bug.c:5: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_c_cast, at c-typeck.c:3631 Please submit a full bug report, [etc.] -- Summary: ICE with cast to invalid union 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=35748