The following invalid code snippet triggers an ICE on trunk: ============================= void foo(const void);
void bar() { void (*pf)() = foo; } ============================= bug.cc:1:16: error: '<anonymous>' has incomplete type bug.cc:1:20: error: invalid use of 'const void' bug.cc: In function 'void bar()': bug.cc:5:18: error: invalid conversion from 'void (*)(<type error>)' to 'void (*)()' bug.cc:5:18: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1426 Please submit a full bug report, [etc.] -- Summary: [4.5 Regression] ICE with "const void" as parameter type Product: gcc Version: 4.5.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=42219