Allow the Bad node to be set in set_store(). This is neccessary, because Bad might...
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Nov 2006 14:21:52 +0000 (14:21 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Nov 2006 14:21:52 +0000 (14:21 +0000)
[r8410]

ir/ir/ircons.c

index f468126..df2d1ff 100644 (file)
@@ -3100,7 +3100,9 @@ set_store(ir_node *store)
   ir_node *load, *pload, *pred, *in[2];
 
   assert(get_irg_phase_state(current_ir_graph) == phase_building);
-  assert(get_irn_mode(store) == mode_M && "storing non-memory node");
+  /* Beware: due to dead code elimination, a store might become a Bad node even in
+     the construction phase. */
+  assert((get_irn_mode(store) == mode_M || is_Bad(store)) && "storing non-memory node");
 
   if (get_opt_auto_create_sync()) {
     /* handle non-volatile Load nodes by automatically creating Sync's */