MonoVTable *vtable = mono_class_vtable_checked (m_field_get_parent (field), error);
return_if_nok (error);
+ MonoType *ftype = mono_field_get_type_internal (field);
+ if (ftype->attrs & FIELD_ATTRIBUTE_LITERAL) {
+ mono_error_set_generic_error (error, "System", "MissingFieldException", "Using static instructions with literal field");
+ return;
+ }
+
if (mono_class_field_is_special_static (field)) {
guint32 offset = GPOINTER_TO_UINT (mono_special_static_field_get_offset (field, error));
mono_error_assert_ok (error);
if (mt == MINT_TYPE_VT)
size = mono_class_value_size (field_class, NULL);
if (is_load) {
- MonoType *ftype = mono_field_get_type_internal (field);
if (ftype->attrs & FIELD_ATTRIBUTE_INIT_ONLY && vtable->initialized) {
if (interp_emit_load_const (td, field_addr, mt))
return;
<ExcludeList Include = "$(XunitTestBinBase)/JIT/jit64/verif/sniff/fg/ver_fg_13/**">
<Issue>https://github.com/dotnet/runtime/issues/54396</Issue>
</ExcludeList>
- <ExcludeList Include = "$(XunitTestBinBase)/Loader/classloader/Statics/Misc/LiteralStatic/**">
- <Issue>https://github.com/dotnet/runtime/issues/54560</Issue>
- </ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b59952/b59952/**">
<Issue>needs triage</Issue>
</ExcludeList>