From 870b9f8c03b8103fd633346317a77b410ef69207 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 21 Nov 2006 14:21:52 +0000 Subject: [PATCH] Allow the Bad node to be set in set_store(). This is neccessary, because Bad might happen as a result of optimization. [r8410] --- ir/ir/ircons.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index f46812628..df2d1ff1c 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -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 */ -- 2.20.1