aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2015-06-24 13:29:05 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2015-06-24 20:32:11 +0000
commit44be0e9c601cbb40a2ac8cf74cb0c57b1292825d (patch)
treedbb75a0e94c9671e9f0e5501ba63295a38c8ffd9 /src/cmd
parent2a846d2bd36a74d971ad6d009a05d2ca64bba8a9 (diff)
downloadgo-44be0e9c601cbb40a2ac8cf74cb0c57b1292825d.tar.xz
[dev.ssa] cmd/compile/ssa: fix build
Somehow I missed this in CL 11160. Without it, all.bash fails on fixedbugs/bug303.go. The right fix is probably to discard the variable and keep going, even though the code is dead. For now, defer the decision by declaring such situations unimplemented and get the build fixed. Change-Id: I679197f780c7a3d3eb7d05e91c86a4cdc3b70131 Reviewed-on: https://go-review.googlesource.com/11440 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/gc/ssa.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go
index 1218a23488..569b985052 100644
--- a/src/cmd/compile/internal/gc/ssa.go
+++ b/src/cmd/compile/internal/gc/ssa.go
@@ -649,7 +649,10 @@ func (s *state) boundsCheck(idx, len *ssa.Value) {
// variable returns the value of a variable at the current location.
func (s *state) variable(name string, t ssa.Type) *ssa.Value {
if s.curBlock == nil {
- s.Fatal("nil curblock!")
+ // Unimplemented instead of Fatal because fixedbugs/bug303.go
+ // demonstrates a case in which this appears to happen legitimately.
+ // TODO: decide on the correct behavior here.
+ s.Unimplemented("nil curblock adding variable %v (%v)", name, t)
}
v := s.vars[name]
if v == nil {