-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make getTypeForPrimitiveValueClass treat different signs as different…
… types (#71633) * Make getTypeForPrimitiveValueClass treat different sizes as different types * Handle missing types * Update jitinterface.cpp * Test removing pointers
- Loading branch information
1 parent
2dc6b46
commit 874043b
Showing
3 changed files
with
60 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/tests/JIT/Regression/JitBlue/Runtime_71632/Runtime_71632.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Numerics; | ||
using System.Runtime.CompilerServices; | ||
|
||
public class Runtime_71632 | ||
{ | ||
public static int Main() | ||
{ | ||
try | ||
{ | ||
Problem(1); | ||
return 101; | ||
} | ||
catch (InvalidCastException) {} | ||
|
||
try | ||
{ | ||
Problem2(1); | ||
return 102; | ||
} | ||
catch (InvalidCastException) {} | ||
|
||
return 100; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static sbyte Problem(byte a) | ||
{ | ||
object box = a; | ||
Use(ref box); | ||
return (sbyte)box; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static sbyte Problem2(byte a) | ||
{ | ||
object box = a; | ||
return (sbyte)box; | ||
} | ||
|
||
static void Use<T>(ref T arg) { } | ||
} |
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_71632/Runtime_71632.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |