The following invalid code snippet triggers an ICE since GCC 4.0.0: =================== typedef int A[]; A* p = new A; ===================
bug.cc:2: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in extract_muldiv_1, at fold-const.c:5661 Please submit a full bug report, [etc.] With GCC 3.4.6 we got: bug.cc:2: error: cannot convert `int*' to `int (*)[]' in initialization -- Summary: [4.1/4.2/4.3 regression] ICE with invalid use of new Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, 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=31743