From 5c52e817ea157341b5ed5d87609eec5acdfd7a3b Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 19 Nov 2012 22:17:24 +0100 Subject: [PATCH] Add the missing jump from after the actual last case --- ast.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ast.c b/ast.c index c503c65..e7d5f09 100644 --- a/ast.c +++ b/ast.c @@ -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; -- 2.39.2