From 7dc2952860e987731adf2ff944adf3c234a12772 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 20 Mar 2006 16:36:39 +0000 Subject: [PATCH] BugFix: set_irn_n() should now work for the block input (-1) [r7494] --- ir/ir/irnode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.20.1