-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed as duplicate
Closed as duplicate
Copy link
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
The following program throws DivideByZeroException when optimizing and NullReferenceException otherwise. The correct exception is DivideByZeroException.
using System;
using System.Runtime.CompilerServices;
public unsafe class Program
{
public static void Main()
{
Foo(null, 0);
}
[MethodImpl(MethodImplOptions.NoInlining)]
private static void Foo(C c, int x)
{
c.G = Test(1 / x);
}
public static Guid Test(int x)
{
return new Guid(x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
class C
{
public Guid G;
}
}Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged