Skip to content

Assertion failed '!replacedInLowering'  #58972

@jkotas

Description

@jkotas

Repro:

Compile with /o+, run with DOTNET_TieredCompilation=0 on Windows checked x64:

using System;

GetItem<MyStruct>(new MyStruct[1], 0);

static T GetItem<T>(T[] a, int i)
{
    try
    {
        return a[i];
    }
    catch (IndexOutOfRangeException)
    {
        ThrowHelper();
        return default;
    }
}

static void ThrowHelper() => throw new Exception();

struct MyStruct
{
    byte b;
}

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions