-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
dotnet/coreclr
#18627Labels
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 SuperPMIbug
Milestone
Description
For .NET core 2.1, the following program outputs 1023 in debug, but 255 in release.
using System;
class C0
{
public sbyte F;
}
public class Program
{
public static void Main()
{
C0 var0 = new C0 { F = -1 };
ulong var1 = (ulong)(1000 | (byte)var0.F);
Console.WriteLine(var1);
}
}This issue repros on .NET framework 4.6.1 as well with 64-bit JIT (it does not repro with 32-bit JIT). The compiler used is csc.exe 2.8.3.62923 (7aafab56).
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 SuperPMIbug