From 17a07eaa0c7415689593e2e9adb37727f9d8a229 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Sun, 20 Mar 2022 17:48:10 +0100 Subject: [PATCH] Fix reporting GC refs as byrefs for crossgen2 promoted structs --- src/coreclr/jit/lclvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 57bccd96c3fbc5..7873a92c8a5126 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -1867,7 +1867,7 @@ bool Compiler::StructPromotionHelper::CanConstructAndPromoteField(lvaStructPromo fldInfo.fldOffset = 0; fldInfo.fldOrdinal = 0; fldInfo.fldSize = TARGET_POINTER_SIZE; - fldInfo.fldType = TYP_BYREF; + fldInfo.fldType = TYP_REF; structPromotionInfo->canPromote = true; return true;