Commit d465f049 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

[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/11877Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 0a133cdd
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment