-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Milestone
Description
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
public class Program
{
static void Main()
{
Get().Field = Bar();
}
[MethodImpl(MethodImplOptions.NoInlining)]
private static int Bar()
{
Console.WriteLine("Bar called");
return 123;
}
[MethodImpl(MethodImplOptions.NoInlining)]
private static Program Get() => null;
private LargeStruct _large;
public int Field;
[InlineArray(0x10000)]
private struct LargeStruct
{
public byte B;
}
}This program does not print "Bar called" even though it should. The cause is that when we import STFLD we create IR that evaluates "obj -> nullcheck(obj) -> data -> store", when in reality the evaluation should be "obj -> data -> nullcheck(obj) -> store".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner