diff options
author | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-07 10:02:35 +0000 |
---|---|---|
committer | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-07 10:02:35 +0000 |
commit | 90bf0a0066d0e93b78eb3012c17b323cd084ff8b (patch) | |
tree | 01128e69b85502902d613f0576dd919bc469c33f /gcc/sched-rgn.c | |
parent | 8c143b64f392ca6ceb260c1452327d9661c13af1 (diff) | |
download | gcc-90bf0a0066d0e93b78eb3012c17b323cd084ff8b.tar.gz |
2006-12-07 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
PR target/29794
* sched-rgn.c (add_block1): Use correct initializer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119613 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 8b9cf9931be..7f7f5869238 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -3124,9 +3124,15 @@ add_block1 (basic_block bb, basic_block after) is _always_ valid for access. */ i = BLOCK_TO_BB (after->index) + 1; - for (pos = ebb_head[i]; rgn_bb_table[pos] != after->index; pos--); + pos = ebb_head[i] - 1; + /* Now POS is the index of the last block in the region. */ + + /* Find index of basic block AFTER. */ + for (; rgn_bb_table[pos] != after->index; pos--); + pos++; gcc_assert (pos > ebb_head[i - 1]); + /* i - ebb right after "AFTER". */ /* ebb_head[i] - VALID. */ |