aboutsummaryrefslogtreecommitdiff
path: root/gcc/sel-sched.c
diff options
context:
space:
mode:
authorAndrey Belevantsev <abel@ispras.ru>2014-02-03 16:00:23 +0400
committerAndrey Belevantsev <abel@gcc.gnu.org>2014-02-03 16:00:23 +0400
commit861ec4f37e9e9a6a8e54ae7477b53a43271b7424 (patch)
tree15f9067c1c201d3d8acbf29941863e18c3184345 /gcc/sel-sched.c
parentfe08255d5958be5f30b19d6da30571f07d05452f (diff)
downloadgcc-861ec4f37e9e9a6a8e54ae7477b53a43271b7424.zip
gcc-861ec4f37e9e9a6a8e54ae7477b53a43271b7424.tar.gz
gcc-861ec4f37e9e9a6a8e54ae7477b53a43271b7424.tar.bz2
re PR rtl-optimization/57662 (ICE: SIGSEGV in code_motion_process_successors with -fschedule-insns2 -fselective-scheduling2)
gcc/ PR rtl-optimization/57662 * sel-sched.c (code_motion_path_driver): Do not mark already not existing blocks in the visiting bitmap. testsuite/ PR rtl-optimization/57662 * g++.dg/pr57662.C: New test. From-SVN: r207421
Diffstat (limited to 'gcc/sel-sched.c')
-rw-r--r--gcc/sel-sched.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index ad4a0aa..d3d73b2 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -6741,7 +6741,11 @@ code_motion_path_driver (insn_t insn, av_set_t orig_ops, ilist_t path,
the numbering by creating bookkeeping blocks. */
if (removed_last_insn)
insn = PREV_INSN (insn);
- bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index);
+
+ /* If we have simplified the control flow and removed the first jump insn,
+ there's no point in marking this block in the visited blocks bitmap. */
+ if (BLOCK_FOR_INSN (insn))
+ bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index);
return true;
}