-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
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 SuperPMIbug
Description
The following test fails with checked x64 jit:
using System;
using System.Runtime.CompilerServices;
struct S
{
public Program p;
public int i;
}
struct T
{
public S s;
}
class Program
{
public T t;
public T t1;
[MethodImpl(MethodImplOptions.NoInlining)]
int Test()
{
if (this.t.s.p == this.t1.s.p)
{
return 0;
}
this.t1.s = this.t.s;
int result = Helper(this.t.s);
return result;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static int Helper(S s)
{
return s.i;
}
static int Main()
{
Program p = new Program();
p.t.s.i = 100;
p.t.s.p = p;
return p.Test();
}
}
The result is this assert:
Assert failure(PID 35752 [0x00008ba8], Thread: 21632 [0x5480]): Assertion failed 'IsCompatibleType(cseLclVarTyp, expTyp)' in 'Program:Test():int:this' (IL size 75)
File: f:\coreclr9\src\jit\optcse.cpp Line: 2159
Image: f:\coreclr9\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root\CoreRun.exe
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 SuperPMIbug