From: Josh Bleecher Snyder Date: Sat, 4 Jul 2015 20:01:04 +0000 (-0700) Subject: [dev.ssa] cmd/compile/ssa: stop compilation immediately on leading goto X-Git-Tag: go1.7beta1~1623^2^2~410 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d465f049cd364c3e445fe189ae0fac0dffda2a67;p=gostls13.git [dev.ssa] cmd/compile/ssa: stop compilation immediately on leading goto There is clearly work to do to fix labels and gotos. The compiler currently hangs on ken/label.go. For the moment, stop the bleeding. Fixes the build. Change-Id: Ib68360d583cf53e1a8ca4acff50644b570382728 Reviewed-on: https://go-review.googlesource.com/11877 Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 9ad2890003..b21b4137dc 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -330,6 +330,7 @@ func (s *state) stmt(n *Node) { } if n.Op == OGOTO && s.curBlock == nil { s.Unimplementedf("goto at start of function; see test/goto.go") + panic("stop compiling here, on pain of infinite loops") } case OAS, OASWB: