forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
struct A
{
public int a;
public int b;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static A foo()
{
A a = new A();
a.a = 1;
a.b = 2;
return a;
}
public static int Main()
{
return foo().a;
}
call return result will be saved into local variable.
impAssignTempGen will change call->getType() from struct to long.
It is not good code. There are many workarounds for this behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels