Skip to content

JIT: Assertion failed 'varTypeIsStruct(resultLcl) == varTypeIsStruct(call->gtReturnType)' during 'Transform async' #115839

Closed
@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v3.1 on 2025-05-21 13:59:26
// Run on X64 Windows
// Seed: 1985104853006402460-async,runtimeasync,vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86pclmulqdqv256,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 60.7 KiB to 1.1 KiB in 00:02:11
// Hits JIT assert for Release with Runtime Async:
// Assertion failed 'varTypeIsStruct(resultLcl) == varTypeIsStruct(call->gtReturnType)' in 'Program:M0()' during 'Transform async' (IL size 44; hash 0xaf50ff37; FullOpts)
//
//     File: C:\dev\dotnet\runtime3\src\coreclr\jit\async.cpp Line: 1541
//
using System;
using System.Numerics;
using System.Threading.Tasks;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

public interface I1
{
}

public struct S0
{
    public uint F0;
    public int F1;
    public short F2;
    public Vector128<uint> F7;
    public ulong F8;
    public async Task<int> M2(S0 arg0)
    {
        Vector256.Create(0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        return 1;
    }
}

public class Program
{
    public static IRuntime s_rt;
    public static void Main()
    {
        M0().GetAwaiter().GetResult();
    }

    public static async Task M0()
    {
        S0 var4 = default(S0);
        short var7 = (short)await var4.M2(var4);
        var4.F2 = (short)await M4(var4);
    }

    public async static Task<int> M4(S0 arg3)
    {
        s_rt.WriteLine(true);
        return arg3.F1;
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-async

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions