From 54d4a6e338344ee3ab159d493af3148bdab33c17 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 18 Apr 2007 15:38:26 +0000 Subject: [PATCH] Fixed misplaced assert [r13383] --- ir/ir/irnode_t.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)); } -- 2.20.1