Commit e116d65e authored by Matthias Braun's avatar Matthias Braun
Browse files

correctly abort confirm insertion in complicated cases

This fixes a crash bug in C/cp_error077.c
parent e7c8b9b6
......@@ -102,14 +102,15 @@ static void handle_case(ir_node *block, ir_node *switchn, long pn, env_t *env)
ir_node *blk = get_effective_use_block(succ, pos);
if (block_dominates(block, blk)) {
/*
* Ok, we found a user of irn that is placed
/* Ok, we found a user of irn that is placed
* in a block dominated by the branch block.
* We can replace the input with the Constant
* branch label.
*/
if (c == NULL)
* branch label. */
if (c == NULL) {
c = get_case_value(switchn, pn);
if (c == NULL)
return;
}
set_irn_n(succ, pos, c);
DBG_OPT_CONFIRM_C(selector, c);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment