* mode-switching.c (create_pre_exit): Set short_block if there
are no copy insns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193289
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-11-07 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR middle-end/49220
+ * mode-switching.c (create_pre_exit): Set short_block if there
+ are no copy insns.
+
2012-11-07 Martin Jambor <mjambor@suse.cz>
* lto-cgraph.c: Include tree-pass.h.
&& GET_CODE (SUBREG_REG (copy_reg)) == REG)
copy_start = REGNO (SUBREG_REG (copy_reg));
else
- break;
+ {
+ /* When control reaches end of non-void function,
+ there are no return copy insns at all. This
+ avoids an ice on that invalid function. */
+ if (ret_start + nregs == ret_end)
+ short_block = 1;
+ break;
+ }
if (copy_start >= FIRST_PSEUDO_REGISTER)
{
last_insn = return_copy;