cmd/compile: zero sized variables no longer have DIEs #54615
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Debugging
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Given:
With go1.19 the DIE subtree for main.main was:
Starting with a74e5f5 (reviewed as: https://go-review.googlesource.com/c/go/+/419320) it is:
without the local variables (both of which have a size 0).
If the desire is to have zero-size variables not have addresses, even in non-optimized builds, then we could emit a location expression containing a single DW_OP_lit0 (0x30) followed by DW_OP_stack_value (0x9f) (or a different way to encode a constant value for a variable).
cc @randall77 @dr2chase based on bisect results
The text was updated successfully, but these errors were encountered: