summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CoreFX/CoreFX.issues.json112
-rw-r--r--tests/issues.targets9
-rw-r--r--tests/scripts/run-corefx-tests.py4
-rw-r--r--tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815.cs235
-rw-r--r--tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_r.csproj34
-rw-r--r--tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_ro.csproj34
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.il40
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.ilproj37
-rw-r--r--tests/src/Loader/classloader/DefaultInterfaceMethods/valuetypes/valuetypes.il4
-rw-r--r--tests/src/Regressions/coreclr/22407/abstractcalls.il117
-rw-r--r--tests/src/Regressions/coreclr/22407/abstractcalls.ilproj35
11 files changed, 659 insertions, 2 deletions
diff --git a/tests/CoreFX/CoreFX.issues.json b/tests/CoreFX/CoreFX.issues.json
index 957a86fad1..4489b51ecc 100644
--- a/tests/CoreFX/CoreFX.issues.json
+++ b/tests/CoreFX/CoreFX.issues.json
@@ -23,6 +23,118 @@
{
"name": "System.Globalization.Tests.CharUnicodeInfoGetUnicodeCategoryTests.GetUnicodeCategory",
"reason": "We updated the Unicode data and didn't pick yet the updated tests from corefx. we should remove this entry after updating the tests in coreclr."
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNegativeInfinitySymbol.NegativeInfinitySymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentDecimalDigits.PercentDecimalDigits_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyGroupSeparator.CurrencyGroupSeparator_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNumberNegativePattern.NumberNegativePattern_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPositiveInfinitySymbol.PositiveInfinitySymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.StringInfoString.String_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNumberDecimalSeparator.NumberDecimalSeparator_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNumberGroupSeparator.NumberGroupSeparator_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNaNSymbol.NaNSymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPositiveSign.PositiveSign_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyGroupSizes.CurrencyGroupSizes_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentSymbol.PercentSymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.StringInfoCtorTests.Ctor_String_Null_ThrowsArgumentNullException",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencySymbol.CurrencySymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentDecimalSeparator.PercentDecimalSeparator_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.DateTimeFormatInfoGetAbbreviatedDayName.GetAbbreviatedDayName_Invalid_ThrowsArgumentOutOfRangeException",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNumberDecimalDigits.NumberDecimalDigits_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNegativeSign.NegativeSign_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentGroupSizes.PercentGroupSizes_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentPositivePattern.PercentPositivePattern_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPerMilleSymbol.PerMilleSymbol_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentGroupSeparator.PercentGroupSeparator_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.CurrencyNegativePattern_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyPositivePattern.CurrencyPositivePattern_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoPercentNegativePattern.PercentNegativePattern_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyDecimalDigits.CurrencyDecimalDigits_Set_Invalid",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Globalization.Tests.NumberFormatInfoCurrencyDecimalSeparator.CurrencyDecimalSeparator_Set_Invalid",
+ "reason": "outdated"
}
]
}
diff --git a/tests/issues.targets b/tests/issues.targets
index 1b2cc25527..08091e4b68 100644
--- a/tests/issues.targets
+++ b/tests/issues.targets
@@ -53,6 +53,15 @@
<ExcludeList Include="$(XunitTestBinBase)/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests/*">
<Issue>20322</Issue>
</ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/baseservices/threading/waithandle/waitany/waitanyex2/*">
+ <Issue>19515</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/baseservices/threading/waithandle/waitany/waitanyex2a/*">
+ <Issue>19406</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/baseservices/threading/waithandle/waitany/waitanyex4/*">
+ <Issue>14249</Issue>
+ </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/baseservices/threading/mutex/misc/waitone2/*">
<Issue>6397</Issue>
</ExcludeList>
diff --git a/tests/scripts/run-corefx-tests.py b/tests/scripts/run-corefx-tests.py
index 21ca3c2023..a4e691df8a 100644
--- a/tests/scripts/run-corefx-tests.py
+++ b/tests/scripts/run-corefx-tests.py
@@ -377,6 +377,10 @@ def main(args):
if not Is_windows:
command += ' /p:TestWithLocalNativeLibraries=true'
+ if not Is_windows and (arch == 'arm' or arch == 'arm64'):
+ # It is needed under docker where LC_ALL is not configured.
+ command += ' --warnAsError false'
+
# Run the corefx test build and run the tests themselves.
log(command)
diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815.cs b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815.cs
new file mode 100644
index 0000000000..70a977a1c5
--- /dev/null
+++ b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815.cs
@@ -0,0 +1,235 @@
+using System;
+using System.Runtime.Intrinsics.X86;
+using System.Runtime.Intrinsics;
+
+namespace GitHub_22815
+{
+ class Program
+ {
+ const int Pass = 100;
+ const int Fail = 0;
+
+ static int Main(string[] args)
+ {
+ bool result = true;
+ if (Avx2.IsSupported)
+ {
+ result = test128((byte)1) && test128((sbyte)1) && test128((short)1) &&
+ test128((ushort)1) && test128((int)1) && test128((uint)1) &&
+ test128((long)1) && test128((ulong)1) &&
+ test256((byte)1) && test256((sbyte)1) && test256((short)1) &&
+ test256((ushort)1) && test256((int)1) && test256((uint)1) &&
+ test256((long)1) && test256((ulong)1);
+ }
+ return result ? Pass : Fail;
+ }
+
+ static unsafe bool test128(byte v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<byte>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(sbyte v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<sbyte>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(short v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<short>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(ushort v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<ushort>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(int v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<int>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(uint v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<uint>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(long v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<long>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test128(ulong v)
+ {
+ var vec = Avx2.BroadcastScalarToVector128(&v);
+ for (int i = 0; i < Vector128<ulong>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(byte v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<byte>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(sbyte v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<sbyte>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(short v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<short>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(ushort v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<ushort>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(int v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<int>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(uint v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<uint>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(long v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<long>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static unsafe bool test256(ulong v)
+ {
+ var vec = Avx2.BroadcastScalarToVector256(&v);
+ for (int i = 0; i < Vector256<ulong>.Count; i++)
+ {
+ if (vec.GetElement(i) != v)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_r.csproj b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_r.csproj
new file mode 100644
index 0000000000..f120b6df68
--- /dev/null
+++ b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_r.csproj
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>Embedded</DebugType>
+ <Optimize></Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GitHub_22815.cs" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_ro.csproj b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_ro.csproj
new file mode 100644
index 0000000000..f8858c76bf
--- /dev/null
+++ b/tests/src/JIT/HardwareIntrinsics/X86/Regression/GitHub_22815/GitHub_22815_ro.csproj
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>Embedded</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GitHub_22815.cs" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.il b/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.il
new file mode 100644
index 0000000000..df896205a3
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.il
@@ -0,0 +1,40 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern mscorlib
+{
+}
+
+.assembly GitHub_23039
+{
+}
+
+// Bug where assertion prop was tripped up because morph swapped arg
+// order on an isinst helper call that fed into a conditional jump,
+// and the object being queried was null.
+
+.class public auto ansi beforefieldinit X`1<T> extends [mscorlib]System.Object
+{
+ .method public static hidebysig int32 F() cil managed noinlining
+ {
+ .locals init ([0] object)
+ ldloc.0
+ isinst class X`1<!T>
+ brtrue IS
+ ldc.i4 100
+ ret
+IS: ldc.i4 -1
+ ret
+ }
+}
+
+.class public auto ansi beforefieldinit Y extends [mscorlib]System.Object
+{
+ .method public static hidebysig int32 Main() cil managed
+ {
+ .entrypoint
+ call int32 class X`1<object>::F()
+ ret
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.ilproj b/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.ilproj
new file mode 100644
index 0000000000..07d1b0ea20
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_23039/GitHub_23039.ilproj
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="GitHub_23039.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/Loader/classloader/DefaultInterfaceMethods/valuetypes/valuetypes.il b/tests/src/Loader/classloader/DefaultInterfaceMethods/valuetypes/valuetypes.il
index 2c101792f5..0fb729fa3c 100644
--- a/tests/src/Loader/classloader/DefaultInterfaceMethods/valuetypes/valuetypes.il
+++ b/tests/src/Loader/classloader/DefaultInterfaceMethods/valuetypes/valuetypes.il
@@ -58,7 +58,7 @@
int32 V_1)
IL_0000: nop
IL_0001: ldarg.0
- IL_0002: call instance int32 IValue::GetValue()
+ IL_0002: callvirt instance int32 IValue::GetValue()
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldarg.1
@@ -66,7 +66,7 @@
IL_000b: stloc.0
IL_000c: ldarg.0
IL_000d: ldloc.0
- IL_000e: call instance void IValue::SetValue(int32)
+ IL_000e: callvirt instance void IValue::SetValue(int32)
IL_0013: nop
IL_0014: ldloc.0
IL_0015: stloc.1
diff --git a/tests/src/Regressions/coreclr/22407/abstractcalls.il b/tests/src/Regressions/coreclr/22407/abstractcalls.il
new file mode 100644
index 0000000000..0e8264a3d1
--- /dev/null
+++ b/tests/src/Regressions/coreclr/22407/abstractcalls.il
@@ -0,0 +1,117 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+
+.assembly extern mscorlib { }
+
+.assembly abstractcalls { }
+
+.class interface public abstract auto ansi I1
+{
+ .method public hidebysig newslot virtual abstract
+ instance int32 Add(int32 x) cil managed
+ {
+ }
+}
+
+.class public abstract auto ansi C1
+ extends [mscorlib]System.Object
+ implements I1
+{
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ ldarg.0
+ call instance void [mscorlib]System.Object::.ctor()
+ ret
+ }
+
+ .method public hidebysig newslot virtual abstract
+ instance int32 Remove(int32 x) cil managed
+ {
+ }
+}
+
+.class public auto ansi C2
+ extends [mscorlib]System.Object
+ implements I1
+{
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ ldarg.0
+ call instance void C1::.ctor()
+ ret
+ }
+
+ .method public hidebysig virtual
+ instance int32 Remove(int32 x) cil managed
+ {
+ ldc.i4.0
+ ret
+ }
+
+ .method public hidebysig newslot virtual
+ instance int32 Add(int32 x) cil managed
+ {
+ ldc.i4.5
+ ret
+ }
+}
+
+.method private hidebysig static void CallClass() cil managed
+{
+ newobj instance void C2::.ctor()
+ ldc.i4.0
+ call instance int32 C1::Remove(int32)
+ pop
+ ret
+}
+
+.method private hidebysig static void CallInterface() cil managed
+{
+ newobj instance void C2::.ctor()
+ ldc.i4.0
+ call instance int32 I1::Add(int32)
+ pop
+ ret
+}
+
+.method private hidebysig static int32 Main() cil managed
+{
+ .entrypoint
+
+ .try
+ {
+ call void CallClass()
+ leave Fail
+ }
+ catch [System.Runtime]System.BadImageFormatException
+ {
+ pop
+ leave AbstractClassOK
+ }
+
+AbstractClassOK:
+
+ .try
+ {
+ call void CallInterface()
+ leave Fail
+ }
+ catch [System.Runtime]System.BadImageFormatException
+ {
+ pop
+ leave AbstractInterfaceOK
+ }
+
+AbstractInterfaceOK:
+
+ ldc.i4 100
+ ret
+
+Fail:
+ ldc.i4.m1
+ ret
+}
diff --git a/tests/src/Regressions/coreclr/22407/abstractcalls.ilproj b/tests/src/Regressions/coreclr/22407/abstractcalls.ilproj
new file mode 100644
index 0000000000..e3a3853c75
--- /dev/null
+++ b/tests/src/Regressions/coreclr/22407/abstractcalls.ilproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{85DFC527-4DB1-595E-A7D7-E94EE1F8140D}</ProjectGuid>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <OutputType>Exe</OutputType>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>0</CLRTestPriority>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Include="abstractcalls.il" />
+ </ItemGroup>
+
+
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>