Skip to content
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

cmd/compile: wrong line numbers for accessing importing variables with SSA #15456

Closed
mdempsky opened this issue Apr 26, 2016 · 1 comment
Closed
Milestone

Comments

@mdempsky
Copy link
Member

Compiling package bytes with -S and SSA enabled shows things like:

    0x0026 00038 ($GOROOT/src/bytes/bytes.go:613)     MOVQ    "".s+80(FP), AX
    0x002b 00043 ($GOROOT/src/bytes/bytes.go:613)     MOVQ    AX, 16(SP)
    0x0030 00048 ($GOROOT/src/bytes/bytes.go:10)      LEAQ    unicode.IsSpace·f(SB), AX
    0x0037 00055 ($GOROOT/src/bytes/bytes.go:613)     MOVQ    AX, 24(SP)
    0x003c 00060 ($GOROOT/src/bytes/bytes.go:613)     PCDATA  $0, $0

The bytes.go:10 line appears to come from the fact that import "unicode" is on line 10.

Compiling with SSA disabled (i.e., -ssa=0), the LEAQ is attributed to bytes.go:613 instead.

/cc @randall77 @josharian @griesemer

@mdempsky mdempsky added this to the Go1.7 milestone Apr 26, 2016
@mdempsky
Copy link
Member Author

Oops, duplicate #15430.

@golang golang locked and limited conversation to collaborators Apr 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants