Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions src/tests/Regressions/coreclr/Runtimelab_578/arr.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern mscorlib { }
.assembly 'arr' { }

.method static int32[] alloc() cil managed
{
ldc.i4.8
ldc.i4.8
newobj instance void int32[]::.ctor(int32,int32)
ret
}

.method static int32 negative() cil managed
{
.try
{
call int32[] alloc()
leave bad
}
catch [mscorlib]System.MissingMethodException
{
pop
leave good
}

good:
ldc.i4.1
ret

bad:
ldc.i4.0
ret
}

.method public static int32 main() cil managed
{
.locals init (int32[][] a)
.entrypoint

ldc.i4.7
newobj instance void int32[]::.ctor(int32)
ldlen

ldc.i4.2
ldc.i4.3
newobj instance void int32[][]::.ctor(int32,int32)
dup
stloc a
ldlen
ldc.i4 40
mul // 2 * 40 = 80
add // 7 + 80 = 87

ldloc a
ldc.i4.0
ldelem int32[]
ldlen
ldc.i4.4
mul // 3 * 4 = 12

add // 87 + 12 = 99

call int32 negative()
add // 99 + 1 = 100

ret
}
10 changes: 10 additions & 0 deletions src/tests/Regressions/coreclr/Runtimelab_578/arr.ilproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="arr.il" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@
<Issue>https://github.com/dotnet/runtime/issues/46174</Issue>
</ExcludeList>

<ExcludeList Include="$(XunitTestBinBase)/Regressions/coreclr/Runtimelab_578/arr/*">
<Issue>https://github.com/dotnet/runtime/issues/47458</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/General/Regression/GitHub_43569/**">
<Issue>https://github.com/dotnet/runtime/issues/43676</Issue>
</ExcludeList>
Expand Down