mirror of
https://github.com/golang/go
synced 2024-11-23 21:30:08 -07:00
[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 <khr@golang.org>
This commit is contained in:
parent
0a133cddd5
commit
d465f049cd
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user