From: Michael Beck Date: Mon, 20 Mar 2006 16:36:39 +0000 (+0000) Subject: BugFix: set_irn_n() should now work for the block input (-1) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=7dc2952860e987731adf2ff944adf3c234a12772;p=libfirm BugFix: set_irn_n() should now work for the block input (-1) [r7494] --- diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 568bda64f..5e3ba5588 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -159,16 +159,16 @@ new_ir_node (dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mo #if FIRM_EDGES_INPLACE { - int i, n; - int not_a_block = is_no_Block(res); + int i; + int is_bl = is_Block(res); INIT_LIST_HEAD(&res->edge_info.outs_head); - if(!not_a_block) + if(is_bl) INIT_LIST_HEAD(&res->attr.block.succ_head); - for (i = 0, n = arity + not_a_block; i < n; ++i) - edges_notify_edge(res, i - not_a_block, res->in[i], NULL, irg); + for (i = is_bl; i <= arity; ++i) + edges_notify_edge(res, i - 1, res->in[i], NULL, irg); } #endif