]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix line numbers for index panics
authorKeith Randall <khr@google.com>
Tue, 30 Apr 2019 21:03:07 +0000 (14:03 -0700)
committerKeith Randall <khr@golang.org>
Tue, 30 Apr 2019 21:30:30 +0000 (21:30 +0000)
commite7d08b6fe68be30a4239a1f930f96974db35473a
treecfd39f810a85a69d01cad7c56cd64c7dd7492fa2
parent720af3c8c4a0223f605b45b80c6a46f46321c760
cmd/compile: fix line numbers for index panics

In the statement x = a[i], the index panic should appear to come from
the line number of the '['. Previous to this CL we sometimes used the
line number of the '=' instead.

Fixes #29504

Change-Id: Ie718fd303c1ac2aee33e88d52c9ba9bcf220dea1
Reviewed-on: https://go-review.googlesource.com/c/go/+/174617
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/ssa.go
test/fixedbugs/issue29504.go [new file with mode: 0644]