aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMikhail Maltsev <maltsevm@gmail.com>2015-05-22 22:58:22 +0000
committerMikhail Maltsev <miyuki@gcc.gnu.org>2015-05-22 22:58:22 +0000
commitd08093db8476c30fb41cdbaded67890cafd5ea07 (patch)
tree32eb05b580d974d86e6377daea61dd9f20ad6137 /gcc
parent3b0244cc3bef04fd09e58bfb553c6cef9a2ad02d (diff)
downloadgcc-d08093db8476c30fb41cdbaded67890cafd5ea07.zip
gcc-d08093db8476c30fb41cdbaded67890cafd5ea07.tar.gz
gcc-d08093db8476c30fb41cdbaded67890cafd5ea07.tar.bz2
re PR rtl-optimization/66237 (FAIL: gcc.dg/tree-prof/pr34999.c compilation, -fprofile-use -D_PROFILE_USE (internal compiler error))
PR rtl-optimization/66237 * bb-reorder.c (fix_crossing_conditional_branches): Fix wrong location of an "as_a" cast. From-SVN: r223596
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/bb-reorder.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d5d04d..233763c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-22 Mikhail Maltsev <maltsevm@gmail.com>
+
+ PR rtl-optimization/66237
+ * bb-reorder.c (fix_crossing_conditional_branches): Fix wrong
+ location of an "as_a" cast.
+
2015-05-22 Jeff Law <law@redhat.com>
* config/pa/pa.md (non-canonical shift-add insns): Remove.
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 20e15fc..cbf6343 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2044,7 +2044,7 @@ fix_crossing_conditional_branches (void)
if (crossing_edge)
{
- rtx_jump_insn *old_jump = as_a <rtx_jump_insn *> (BB_END (cur_bb));
+ rtx_insn *old_jump = BB_END (cur_bb);
/* Check to make sure the jump instruction is a
conditional jump. */
@@ -2067,6 +2067,9 @@ fix_crossing_conditional_branches (void)
if (set_src && (GET_CODE (set_src) == IF_THEN_ELSE))
{
+ rtx_jump_insn *old_jump_insn =
+ as_a <rtx_jump_insn *> (old_jump);
+
if (GET_CODE (XEXP (set_src, 1)) == PC)
old_label = XEXP (set_src, 2);
else if (GET_CODE (XEXP (set_src, 2)) == PC)
@@ -2095,7 +2098,7 @@ fix_crossing_conditional_branches (void)
emit_label (new_label);
gcc_assert (GET_CODE (old_label) == LABEL_REF);
- old_jump_target = old_jump->jump_target ();
+ old_jump_target = old_jump_insn->jump_target ();
new_jump = as_a <rtx_jump_insn *>
(emit_jump_insn (gen_jump (old_jump_target)));
new_jump->set_jump_target (old_jump_target);
@@ -2114,7 +2117,7 @@ fix_crossing_conditional_branches (void)
/* Make old jump branch to new bb. */
- redirect_jump (old_jump, new_label, 0);
+ redirect_jump (old_jump_insn, new_label, 0);
/* Remove crossing_edge as predecessor of 'dest'. */