Closed
Description
// Generated by Fuzzlyn v1.5 on 2023-01-22 16:00:16
// Run on Arm64 Windows
// Seed: 17286164302317655577
// Reduced from 117.6 KiB to 0.4 KiB in 00:02:13
// Hits JIT assert in Release:
// Assertion failed '!m_rootNode->OperIsLocal() && !m_rootNode->OperIsLocalAddr()' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Morph - Structs/AddrExp' (IL size 83; hash 0xade6b36b; FullOpts)
//
// File: D:\a\_work\1\s\src\coreclr\jit\lclmorph.cpp Line: 34
//
public interface I0
{
}
public struct S0 : I0
{
public sbyte F0;
public S0 M17(I0 arg0, ulong arg1)
{
return this;
}
}
public class Program
{
public static ulong s_2;
public static void Main()
{
var vr6 = new S0();
var vr7 = new S0();
new S0().M17(new S0().M17(vr7, 0).M17(vr6, s_2), s_2);
}
}
We end up with:
LocalAddressVisitor visiting statement:
STMT00012 ( ??? ... ??? )
[000077] n--X------- ▌ IND byte
[000076] ----------- └──▌ LCL_VAR_ADDR byref V03 loc3
└──▌ byte V03.S0:F0 (offs=0x00) -> V12 tmp8
Replacing the field in promoted struct with local var V12
This gives a standalone top-level LCL_VAR
node and the locals linking assumes that these cannot exist.