Skip to content

Commit

Permalink
[jit] Avoid an assert when gsharedvt enums are boxed.
Browse files Browse the repository at this point in the history
Fixes mono#13297.
  • Loading branch information
vargaz committed Mar 4, 2019
1 parent 819660e commit 73a4358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -8854,7 +8854,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
break;
}

if (m_class_is_enumtype (klass) && !(val->type == STACK_I8 && TARGET_SIZEOF_VOID_P == 4)) {
if (m_class_is_enumtype (klass) && !mini_is_gsharedvt_klass (klass) && !(val->type == STACK_I8 && TARGET_SIZEOF_VOID_P == 4)) {
/* Can't do this with 64 bit enums on 32 bit since the vtype decomp pass is ran after the long decomp pass */
if (val->opcode == OP_ICONST) {
MONO_INST_NEW (cfg, ins, OP_BOX_ICONST);
Expand Down

0 comments on commit 73a4358

Please sign in to comment.