diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.cs b/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.cs new file mode 100644 index 0000000000000..0a8d2609be1d1 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.CompilerServices; +using Xunit; + +public class Runtime_87597 +{ + interface IFace + { + static IFace() {} + void Method(); + } + + class GenericType : IFace + { + static GenericType() + { + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Method() + { + } + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static void TestL1(IFace iface) + { + iface.Method(); + } + + [Fact] + public static int TestEntryPoint() + { + for (int i = 0; i < 100; i++) + { + System.Threading.Thread.Sleep(16); + TestL1(new GenericType()); + } + + return 100; + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.csproj new file mode 100644 index 0000000000000..de6d5e08882e8 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.csproj @@ -0,0 +1,8 @@ + + + True + + + + +