-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent bad codegen when returning a modified struct #8185
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
bug
Comments
This is a recent regression |
@JosephTremoulet Can you take a look at this one |
Note that this test failure corresponds to desktop test failure: runbaseline_simple2_jit64-gc-misc-simple2.txt |
@dotnet/jit-contrib FYI |
JosephTremoulet
referenced
this issue
in JosephTremoulet/coreclr
May 24, 2017
Update fgMorphImplicitByRefArgs to rewrite references to struct-promoted implicit-by-reference parameters as references to the new struct temps created in fgRetypeImplicitByRefArgs; fgMorphStructField isn't updating these because it's only interested in field references, and runs upstream of fgRetypeImplicitByRefArgs where the full struct temp is created, anyway. Invert the sense of lvPromoted for implicit byref args in the interim between fgRetypeImplicitByRefArgs and fgMarkDemotedImplicitByRefArgs, since now fgMarkDemotedImplicitByRefArgs needs to update both and would look horribly backwards the other way around. Fixes #11814.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
bug
Repro:
Compile MutateStructArg.cs below:
.\Tools\dotnetcli\dotnet.exe Tools\csc.exe /o+ /out:Program.exe MutateStructArg.cs /r:.\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root\System.Private.CoreLib.dll /r:.\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root\System.Console.dll
/r:.\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root\System.Runtime.dll
MutateStructArg.cs
Run the Repro:
.\bin\tests\Windows_NT.x64.Checked\Tests\Core_Root\CoreRun.exe MutateStructArg.exe
Hello World
Hello World
**** Test FAILED ***
The text was updated successfully, but these errors were encountered: