Fix regression: Allow setting the current block to NULL.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 6 Apr 2011 13:27:06 +0000 (15:27 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 6 Apr 2011 13:27:06 +0000 (15:27 +0200)
ir/ir/ircons.c

index 0b765a4..810f225 100644 (file)
@@ -543,13 +543,13 @@ void add_immBlock_pred(ir_node *block, ir_node *jmp)
 
 void set_cur_block(ir_node *target)
 {
-       assert(current_ir_graph == get_irn_irg(target));
+       assert(target == NULL || current_ir_graph == get_irn_irg(target));
        current_ir_graph->current_block = target;
 }
 
 void set_r_cur_block(ir_graph *irg, ir_node *target)
 {
-       assert(irg == get_irn_irg(target));
+       assert(target == NULL || irg == get_irn_irg(target));
        irg->current_block = target;
 }