aboutsummaryrefslogtreecommitdiff
path: root/gcc/mode-switching.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2012-11-07 10:48:12 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2012-11-07 10:48:12 +0000
commitd78e64db2018951aee075a74bfa71bd9938fd1b7 (patch)
treeadbbfcc16d856974e6504e73e6efe7313f2cf502 /gcc/mode-switching.c
parent92d38f386bb23d45f15326edac74449064a6429d (diff)
downloadgcc-d78e64db2018951aee075a74bfa71bd9938fd1b7.zip
gcc-d78e64db2018951aee075a74bfa71bd9938fd1b7.tar.gz
gcc-d78e64db2018951aee075a74bfa71bd9938fd1b7.tar.bz2
re PR middle-end/49220 (ICE in create_pre_exit, at mode-switching.c:401)
PR middle-end/49220 * mode-switching.c (create_pre_exit): Set short_block if there are no copy insns. From-SVN: r193289
Diffstat (limited to 'gcc/mode-switching.c')
-rw-r--r--gcc/mode-switching.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 386f8d1..2072628 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -322,7 +322,14 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
&& 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;