From: Michael Beck Date: Wed, 3 May 2006 10:38:32 +0000 (+0000) Subject: BugFix: turn_into_tuple() now works if edges are activated X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=7d9f1e446adbc3456429dcfc7f8f4e587b8799aa;hp=ca63c180b7cc9b93f63877bf69e298bad45de6f1;p=libfirm BugFix: turn_into_tuple() now works if edges are activated [r7688] --- diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index 46b299dea..260e2a8b6 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -40,8 +40,10 @@ turn_into_tuple (ir_node *node, int arity) } else { /* Allocate new array, don't free old in_array, it's on the obstack. */ ir_node *block = get_nodes_block(node); - node->in = NEW_ARR_D (ir_node *, current_ir_graph->obst, arity+1); - edges_invalidate(node, current_ir_graph); + edges_invalidate(node, current_ir_graph); + node->in = NEW_ARR_D(ir_node *, current_ir_graph->obst, arity+1); + /* clear the new in array, else edge_notify tries to delete garbage */ + memset(node->in, 0, (arity+1) * sizeof(node->in[0])); set_nodes_block(node, block); } }