diff --git a/src/codegen.cpp b/src/codegen.cpp index f85ccf910ba96..0a7c38c995623 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3247,7 +3247,7 @@ static jl_cgval_t emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool isboxed, b if (!valuepos) return jl_cgval_t(); // value not used, no point in doing codegen for it ssize_t idx = ((jl_gensym_t*)expr)->id; assert(idx >= 0); - assert(ctx->gensym_assigned.at(idx)); + //assert(ctx->gensym_assigned.at(idx)); jl_cgval_t val = ctx->gensym_SAvalues.at(idx); // at this point, gensym_SAvalues[idx] actually contains the SAvalue return val; } diff --git a/test/core.jl b/test/core.jl index 21be744c66136..363789ef9f0b3 100644 --- a/test/core.jl +++ b/test/core.jl @@ -3347,3 +3347,13 @@ foo12967(x, ::TupleType12967) = 2 # issue #13083 @test Void() === nothing + +# issue discovered in #11973 +for j = 1:1 + x = try + error() + 2 + catch + continue + end +end