Add an assertion if a bad entity is given to a Sel node constructor
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 30 Mar 2004 12:35:33 +0000 (12:35 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 30 Mar 2004 12:35:33 +0000 (12:35 +0000)
[r2587]

ir/ir/ircons.c

index 61321d0..eef8659 100644 (file)
@@ -635,6 +635,8 @@ new_rd_Sel (dbg_info* db, ir_graph *irg, ir_node *block, ir_node *store, ir_node
   ir_node *res;
   int r_arity;
 
+  assert(ent != NULL && is_entity(ent) && "entity expected in Sel construction");
+
   r_arity = arity + 2;
   NEW_ARR_A (ir_node *, r_in, r_arity);  /* uses alloca */
   r_in[0] = store;