For 1.c ------ extern float f(void);
int main(void) { return f(); } 2.c ------ int f(void) { return 0; } we ICE when building with -O2 -fwhopr because we inline f() and the return value compatibility check does not trigger there (see comment in fixed PR43455). When inlining we use a FLOAT_EXPR to convert the return value to the expected (float) type - this is bogus in general. There are two cases: if the ABI returns both types in the same way then a VIEW_CONVERT_EXPR should be used to make inline vs. non-inline behavior the same, if the ABI returns in different places then the value returned is undefined. We should try to emit a diagnostic here. Runtime behavior of the non-LTO build should be preserved by not inlining such calls also with -fwhopr. -- Summary: ICE in expand_call_inline, at tree-inline.c:3820 with - fwhopr, missed fatal diagnostic Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: lto Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43891