Found this bug by code inspection. Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch. However, the code actually looked at the
last instruction in the "then" branch twice.
if (is_break(last)) {
continue_from_then_branch = false;
} else {
- last = (ir_instruction *) last_if->then_instructions.get_tail();
+ last = (ir_instruction *) last_if->else_instructions.get_tail();
if (is_break(last))
continue_from_then_branch = true;