From: Matthias Braun Date: Wed, 6 Sep 2006 09:16:34 +0000 (+0000) Subject: assert that heur 3 assigns an existing register X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6d170fc34b915029f6c84d9be6861a6fd3726e04;p=libfirm assert that heur 3 assigns an existing register --- diff --git a/ir/be/becopyheur3.c b/ir/be/becopyheur3.c index c79f77e11..62320ae2b 100644 --- a/ir/be/becopyheur3.c +++ b/ir/be/becopyheur3.c @@ -198,7 +198,10 @@ int co_solve_heuristic_java(copy_opt_t *co) if(bitset_is_set(nodes, idx)) { unsigned t_idx = node_map[idx]; unsigned col = inv_col_map[be_java_coal_get_color(coal, t_idx)]; - const arch_register_t *reg = &co->cls->regs[col]; + const arch_register_t *reg; + + assert(col < n_regs); + reg = &co->cls->regs[col]; arch_set_irn_register(co->aenv, n, reg); } }