Skip to content

Assertion failed '(tree->gtFlags & GTF_GLOB_REF) || ((obj != nullptr) && (obj->gtOper == GT_LCL_VAR))' during 'Morph - Structs/AddrExp' (IL size 36) #62815

@kunalspathak

Description

@kunalspathak

While trying to play around with #60330, hit this assert

using System.Numerics;
using System.Runtime.CompilerServices;
using System.Threading;

class MainClass
{
    public static void Main(string[] args)
    {
        MainClass m = new MainClass();
        m.Foo();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void Foo()
    {
        Vector3 val = new Vector3(0.0f, 0.0f, 0.0f);
        Bar(val, Vector3.Zero);
    }

    private bool Bar(Vector3 input, Vector3 input2)
    {
        return input.X == input2.Y;
    }
}
TestEnvironment:
COMPlus_TieredCompilation=0

Assert failure(PID 41684 [0x0000a2d4], Thread: 19924 [0x4dd4]): Assertion failed '(tree->gtFlags & GTF_GLOB_REF) || ((obj != nullptr) && (obj->gtOper == GT_LCL_VAR))' in 'MainClass:Foo():this' during 'Morph - Structs/AddrExp' (IL size 36)

    File: D:\git\runtime\src\coreclr\jit\morph.cpp Line: 16864
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\corerun.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions