An empty label statement can just be ignored, as it cannot
be the target of any gotos.
Tests are already in test/fixedbugs/issue7538*.go
Fixes #11589
Fixes #11593
Change-Id: Iadcd639e7200ce16aa40fd7fa3eaf82522513e82
Reviewed-on: https://go-review.googlesource.com/12093
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
s.assign(OAS, n.Left.Name.Heapaddr, palloc)
case OLABEL, OGOTO:
+ if n.Op == OLABEL && isblanksym(n.Left.Sym) {
+ // Empty identifier is valid but useless.
+ // See issues 11589, 11593.
+ return
+ }
// get block at label, or make one
t := s.labels[n.Left.Sym.Name]
if t == nil {