Add the missing jump from after the actual last case

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-19 22:17:24 +01:00
parent 986d58877f
commit 5c52e817ea

8
ast.c
View file

@ -2367,6 +2367,14 @@ bool ast_switch_codegen(ast_switch *self, ast_function *func, bool lvalue, ir_va
}
}
/* Jump from the last bnot to bout */
if (bfall && !bfall->final && !ir_block_create_jump(bfall, bout)) {
/*
astwarning(ast_ctx(bfall), WARN_???, "missing break after last case");
*/
return false;
}
/* If there was a default case, put it down here */
if (def_case) {
ir_block *bcase;