fixed debug output string
[libfirm] / ir / opt / data_flow_scalar_replace.c
index 8eea836..cd1c92e 100644 (file)
@@ -166,10 +166,10 @@ static int sels_cmp(const void *elt, const void *key, size_t size)
  */
 static int leave_cmp(const void *elt, const void *key)
 {
-  const ir_node *c1 = elt;
-  const ir_node *c2 = key;
+  ir_node *c1 = (ir_node *)elt;
+  ir_node *c2 = (ir_node *)key;
 
-  return c1->attr.s.ent != c2->attr.s.ent;
+  return get_Sel_entity(c1) != get_Sel_entity(c2);
 }
 
 /**
@@ -1140,7 +1140,7 @@ static void sync_mem_edges(env_t *env) {
       vnum_state++;
 
   /* We allocate the memory, that we need for the predecessors of the sync.*/
-  in     = malloc(sizeof(ir_node*) *vnum_state);
+  in     = xmalloc(sizeof(ir_node*) *vnum_state);
 
   /* The global memory edge is the first predecessor of this sync node.*/
   if(val_arr[env->gl_mem_vnum].mem_edge_state == NULL) {