-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
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
Milestone
Description
The following two tests are failing when jit is optimizing:
using System;
using System.Runtime.CompilerServices;
public struct TwoBools
{
public bool b1;
public bool b2;
public TwoBools(bool b1, bool b2)
{
this.b1 = b1;
this.b2 = b2;
}
}
class Test
{
public static int Main()
{
int result = 100;
if (Test1().b2)
{
Console.WriteLine("Test1 failed");
result = -1;
}
else
{
Console.WriteLine("Test1 passed");
}
if (Test2().b2)
{
Console.WriteLine("Test2 failed");
result = -1;
}
else
{
Console.WriteLine("Test2 passed");
}
return result;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static TwoBools Test1()
{
TwoBools result = CreateTwoBools();
result.b2 = false;
return result;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static TwoBools Test2()
{
TwoBools result = default(TwoBools);
result.b2 = true;
result = default(TwoBools);
return result;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static TwoBools CreateTwoBools()
{
TwoBools result = new TwoBools(true, true);
return result;
}
}
Reactions are currently unavailable
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