diff options
Diffstat (limited to 'gcc/lra-lives.c')
-rw-r--r-- | gcc/lra-lives.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index efc19f20140..a677f86dcf5 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -996,12 +996,12 @@ lra_create_live_ranges (bool all_p) curr_point = 0; point_freq_vec.create (get_max_uid () * 2); lra_point_freq = point_freq_vec.address (); - int *post_order_rev_cfg = XNEWVEC (int, last_basic_block); + int *post_order_rev_cfg = XNEWVEC (int, last_basic_block_for_fn (cfun)); int n_blocks_inverted = inverted_post_order_compute (post_order_rev_cfg); lra_assert (n_blocks_inverted == n_basic_blocks_for_fn (cfun)); for (i = n_blocks_inverted - 1; i >= 0; --i) { - bb = BASIC_BLOCK (post_order_rev_cfg[i]); + bb = BASIC_BLOCK_FOR_FN (cfun, post_order_rev_cfg[i]); if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun) || bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)) continue; |