From d465f049cd364c3e445fe189ae0fac0dffda2a67 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Sat, 4 Jul 2015 13:01:04 -0700 Subject: [PATCH] [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 --- src/cmd/compile/internal/gc/ssa.go | 1 + 1 file changed, 1 insertion(+) 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: -- 2.48.1