http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41993
--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-11 22:45:18 UTC --- (In reply to comment #10) > Fixed on trunk. Actually, implementing post-reload pass it looks to me, that in this place we are only interested in function return hard registers. In pre-reload mode-switching pass, there is no possibility for others, and in post-reload pass, we got bitten by the same issue as in comment #4 (again with -O0), but with hard registers. Kaz, can you please test following patch, if it works ok SH4? --cut here-- Index: mode-switching.c =================================================================== --- mode-switching.c (revision 193407) +++ mode-switching.c (working copy) @@ -330,7 +330,7 @@ short_block = 1; break; } - if (copy_start >= FIRST_PSEUDO_REGISTER) + if (!targetm.calls.function_value_regno_p (copy_start)) { last_insn = return_copy; continue; --cut here--