From: Michael Beck Date: Wed, 18 Apr 2007 15:38:26 +0000 (+0000) Subject: Fixed misplaced assert X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=54d4a6e338344ee3ab159d493af3148bdab33c17;p=libfirm Fixed misplaced assert [r13383] --- diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 9c7bf41d3..d64f1b49e 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -427,8 +427,12 @@ _get_irn_intra_n(const ir_node *node, int n) { assert(-1 <= n && n < _get_irn_intra_arity(node)); nn = node->in[n + 1]; - assert(nn != NULL); - if (!nn || (nn->op != op_Id)) return nn; + if (nn == NULL) { + /* only block inputs are allowed to be NULL */ + assert(n == -1 && "NULL input of a node"); + return NULL; + } + if (nn->op != op_Id) return nn; return (node->in[n + 1] = skip_Id(nn)); }