Skip to content

cmd/compile: incorrect abstract origin assigned to param of inlined subroutine #23020

Closed
@thanm

Description

@thanm

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

tip
go version devel +70f441bc49 Wed Dec 6 19:27:26 2017 +0000 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOHOSTOS="linux"

What did you do?

Compile this program:

Examine the generated DWARF for the inlined routine "cand". Both parameters share the same abstract origin, which should never happen.

 <3><3232c>: Abbrev Number: 17 (DW_TAG_formal_parameter)
    <3232d>   DW_AT_abstract_origin: <0x3229b>
    <32331>   DW_AT_location    : 2 byte block: 91 60 	(DW_OP_fbreg: -32)
 <3><32334>: Abbrev Number: 17 (DW_TAG_formal_parameter)
    <32335>   DW_AT_abstract_origin: <0x3229b>
    <32339>   DW_AT_location    : 2 byte block: 91 68 	(DW_OP_fbreg: -24)

A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

Different abstract origins.

What did you see instead?

Both params have abstract originl 0x3229b. The code that assigns it is buggy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions