diff --git a/src/codegen/pass2_generate.cc b/src/codegen/pass2_generate.cc index 591daed21..aaeff2af3 100644 --- a/src/codegen/pass2_generate.cc +++ b/src/codegen/pass2_generate.cc @@ -674,9 +674,6 @@ static CodeList* gen_goifl( OutAllocator& alc = output.allocator; const opt_t* opts = output.block().opts; - CodeList* stmts = code_list(alc); - const CodeGoBranch* b = go->branches, *e = b + go->nbranches; - auto transition = [&](const CodeGoBranch* b) { if (b->kind == CodeGoBranch::Kind::JUMP) { CodeList* code = code_list(alc); @@ -687,6 +684,9 @@ static CodeList* gen_goifl( } }; + CodeList* stmts = code_list(alc); + const CodeGoBranch* b = go->branches, *e = b + go->nbranches; + if (opts->code_model != CodeModel::REC_FUNC) { // In goto/label and loop/switch modes generate a sequence of IF statements. // It is possible to use IF/ELSE-IF.../ELSE instead, but this would prevent folding YYSKIP