With -m4 -O -fprofile-use, sh-elf compiler fails for
void foo (int *p)
{
if (p)
*p = 0;
}
with
internal compiler error: in create_pre_exit, at mode-switching.c:223
It starts to fail after the patch
r126576 | rakdver | 2007-07-12 19:24:19 +0900 (Thu, 12 Jul 2007) | 5 lines
PR rtl-optimization/32729
* cfghooks.c (can_duplicate_block_p): Do not forbid duplicating blocks
that fallthru to exit.
mode-switching.c:create_pre_exit seems to assume that there is
at most one fallthru predecessor to exit block. Unfortunately,
cfg_layout_finalize can't fix the problem, as mode-switching pass
runs before reload_completed and cfg_layout_finalize calls
fixup_fallthru_exit_predecessor only after reload_completed.
--
Summary: [4.3 Regression] SH: ICE in create_pre_exit, at mode-
switching.c:223
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kkojima at gcc dot gnu dot org
GCC target triplet: sh-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32773