diff options
author | Maxim Kuvyrkov <mkuvyrkov@ispras.ru> | 2006-12-07 10:02:35 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2006-12-07 10:02:35 +0000 |
commit | 1d49ee6a7985f8eb2a759a3d22fb3c8fec92a403 (patch) | |
tree | 01128e69b85502902d613f0576dd919bc469c33f /gcc | |
parent | 9f9195633a4a608e677cfafd4e8d355342123cda (diff) | |
download | gcc-1d49ee6a7985f8eb2a759a3d22fb3c8fec92a403.zip gcc-1d49ee6a7985f8eb2a759a3d22fb3c8fec92a403.tar.gz gcc-1d49ee6a7985f8eb2a759a3d22fb3c8fec92a403.tar.bz2 |
re PR target/29794 (cc1 segfaults with -O3 -msched-control-spec)
2006-12-07 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
PR target/29794
* sched-rgn.c (add_block1): Use correct initializer.
From-SVN: r119613
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/sched-rgn.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 51476b1..e341047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-12-07 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> + + PR target/29794 + * sched-rgn.c (add_block1): Use correct initializer. + 2006-12-07 Richard Guenther <rguenther@suse.de> * tree-vect-transform.c (vectorizable_call): Fix leftover of diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 8b9cf9931..7f7f586 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. */ |