aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-11-13 17:59:37 +0100
committerUros Bizjak <uros@gcc.gnu.org>2012-11-13 17:59:37 +0100
commitffbbfaba10ddb891402eae5e158abc82c804db11 (patch)
tree79b8e8a0b30c1b4dd3d038d8bc669a0031ea0dd6
parentbe22520dc2bc13d2cfa59266f55776889f5a2775 (diff)
downloadgcc-ffbbfaba10ddb891402eae5e158abc82c804db11.zip
gcc-ffbbfaba10ddb891402eae5e158abc82c804db11.tar.gz
gcc-ffbbfaba10ddb891402eae5e158abc82c804db11.tar.bz2
re PR target/41993 ([sh] ICE in create_pre_exit, at mode-switching.c:399)
PR target/41993 * mode-switching.c (create_pre_exit): Set return_copy to last_insn when copy_start is a function return regno instead of pseudo. Skip debug instructions in instruction scan loop. From-SVN: r193480
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/mode-switching.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 863190f..864fc8f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-13 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/41993
+ * mode-switching.c (create_pre_exit): Set return_copy to last_insn
+ when copy_start is a function return regno instead of pseudo.
+ Skip debug instructions in instruction scan loop.
+
2012-11-13 Andrew Stubbs <ams@codesourcery.com>
Ulrich Weigand <ulrich.weigand@linaro.org>
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 2072628..d607ad3 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -242,7 +242,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
int copy_start, copy_num;
int j;
- if (INSN_P (return_copy))
+ if (INSN_P (return_copy)
+ && !DEBUG_INSN_P (return_copy))
{
/* When using SJLJ exceptions, the call to the
unregister function is inserted between the
@@ -330,7 +331,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
short_block = 1;
break;
}
- if (copy_start >= FIRST_PSEUDO_REGISTER)
+ if (!targetm.calls.function_value_regno_p (copy_start))
{
last_insn = return_copy;
continue;