]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't attach lines to SB, SP, similar constants
authorDavid Chase <drchase@google.com>
Mon, 15 May 2017 17:49:30 +0000 (13:49 -0400)
committerDavid Chase <drchase@google.com>
Mon, 15 May 2017 20:39:40 +0000 (20:39 +0000)
commit27da3ba5af274ba6702849d708b0004d80c9ca67
tree24543d65d91f92009df3ad2dbbf7554058224bfc
parent256210c719608bb508a59b608a6ae615fbd7f8c0
cmd/compile: don't attach lines to SB, SP, similar constants

Attaching positions to SB, SP, initial mem can result in
less-good line-numbering when compiled for debugging.
This "fix" also removes source position from a zero-valued
struct (but not from its fields) and from a zero-length
array constant.

This may be a general problem for constants in entry blocks.

Fixes #20367.

Change-Id: I7e9df3341be2e2f60f127d35bb31e43cdcfce9a1
Reviewed-on: https://go-review.googlesource.com/43531
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go