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: internal compiler error: unexpected labeled break/continue #47960

Closed
ALTree opened this issue Aug 25, 2021 · 2 comments
Closed

cmd/compile: internal compiler error: unexpected labeled break/continue #47960

ALTree opened this issue Aug 25, 2021 · 2 comments

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented Aug 25, 2021

$ gotip version
go version devel go1.18-099b819085 Wed Aug 25 15:30:19 2021 +0000 linux/amd64

a.go

package a

func F[T any]() {
lab:
	for {
		break lab
	}
}

main.go

package main

import "a"

func main() {
	a.F[int]()
}
$ gotip tool compile a.go
$ gotip tool compile -I=. main.go

main.go:6:3: internal compiler error: unexpected labeled break/continue: break lab

goroutine 1 [running]:
runtime/debug.Stack()
	/home/alberto/go/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x3cf920, 0xc0}, {0xd093b2, 0x25}, {0xc0001154b8, 0x1, 0x1})
	/home/alberto/go/src/cmd/compile/internal/base/print.go:227 +0x154
cmd/compile/internal/base.Fatalf(...)
	/home/alberto/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/inline.(*hairyVisitor).doNode(0xc0003cfb90, {0xe62f10, 0xc0003cf920})
	/home/alberto/go/src/cmd/compile/internal/inline/inl.go:394 +0x6f7
cmd/compile/internal/ir.doNodes({0xc00005ad70, 0x1, 0x1}, 0xc00005ae30)
	/home/alberto/go/src/cmd/compile/internal/ir/node_gen.go:1512 +0x67
cmd/compile/internal/ir.(*ForStmt).doChildren(0xc000172d80, 0xc00005ae30)
	/home/alberto/go/src/cmd/compile/internal/ir/node_gen.go:543 +0xc6
cmd/compile/internal/ir.DoChildren(...)
...

cc @randall77 @danscales

@ALTree ALTree added this to the Go1.18 milestone Aug 25, 2021
@ALTree
Copy link
Member Author

@ALTree ALTree commented Aug 25, 2021

Maybe cc @mdempsky too since I'm not sure if it's export related or it's a problem in the inliner.

Loading

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Aug 25, 2021

Duplicate of failure 4 from #46704.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants