From: Michael Beck Date: Mon, 29 Nov 2010 21:00:50 +0000 (+0000) Subject: Fixed new_d_defaultProj(), handle Bad predecessor. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d0e0079b764fd66c7a9b3fcd8d9f5e524392376b;p=libfirm Fixed new_d_defaultProj(), handle Bad predecessor. [r28166] --- diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 316dc05fc..86d9c28bc 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -586,9 +586,10 @@ ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value) ir_node *new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj) { ir_node *res; - assert(is_Cond(arg)); + assert(is_Cond(arg) || is_Bad(arg)); assert(get_irg_phase_state(current_ir_graph) == phase_building); - arg->attr.cond.default_proj = max_proj; + if (is_Cond(arg)) + arg->attr.cond.default_proj = max_proj; res = new_d_Proj(db, arg, mode_X, max_proj); return res; }