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
45 changes: 45 additions & 0 deletions src/tests/JIT/Regression/JitBlue/Runtime_87597/Runtime_87597.cs
Original file line number Diff line number Diff line change
@@ -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<T> : 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<string>());
}

return 100;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>