Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: extra errors with goto to a not defined label, inside function #16689

Closed
mlowicki opened this issue Aug 14, 2016 · 3 comments
Closed

Comments

@mlowicki
Copy link
Contributor

  1. What version of Go are you using (go version)?
go version go1.6.2 darwin/amd64
  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mlowicki/projects/golang/hello"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
  1. What did you do?

https://play.golang.org/p/aX9ZT1kspY

  1. What did you expect to see?

Error:
prog.go:4: label End not defined

so the same as with:

package main

func main() {
    goto End
}

which causes "label End not defined" error.

  1. What did you see instead?

Two errors:
prog.go:4: label End not defined
prog.go:8: label End·1 not defined

@ALTree
Copy link
Member

ALTree commented Aug 14, 2016

Cannot reproduce with go1.7, looks fixed.

@odeke-em odeke-em changed the title Two errors while using not defined label inside (not main) function cmd/compile: extra errors with goto to a not defined label, inside function Aug 18, 2016
@odeke-em
Copy link
Member

I've traced back to 4fffd45 on Feb 29th 2016, as the CL that fixed it.

@randall77 could you confirm that this was what fixed this issue, so that we could close it since the issue is now fixed? Thanks.

@randall77
Copy link
Contributor

I don't know why that CL would have fixed it, it is a merge from master to dev.ssa, not the other way around.
I do agree this looks fixed.
@josharian might remember something about this.

@golang golang locked and limited conversation to collaborators Aug 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants