cmd/compile: emitted DWARF location for complex128 param is incorrect #45281
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Using tip (linux.amd64)
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Compile this program:
https://play.golang.org/p/_v676oJ4LLO
and look at the DWARF generated for the function main.tryme
What did you expect to see?
Correct location expressions for all params
What did you see instead?
For the parameter "z", here is the parameter DIE:
and here is the relevent .debug_loc section:
Note the two pieces are the same (for real and imaginary). If I stop in a debugger and print the value of the param, I get:
which is obviously wrong (should be 1 + 2i).
I looked at older versions of Go (1.15, 1.14, and it appears that they get this wrong as well, although in slightly different ways).
The text was updated successfully, but these errors were encountered: