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 Interface for <nil> #22043

eliasnaur opened this issue Sep 26, 2017 · 2 comments


None yet
5 participants
Copy link

commented Sep 26, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?


Does this issue reproduce with the latest release?


What did you do?


What did you expect to see?

main.go:4:13: undefined: G

What did you see instead?

tmp/sandbox815323628/main.go:4:13: undefined: G
tmp/sandbox815323628/main.go:6:5: internal compiler error: unexpected Interface for <nil>

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb654a1, 0x1b, 0xc4202fc0e8, 0x1, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.Val.Interface(0x0, 0x0, 0xc4202fc2e8, 0xc4202fc318)
	/usr/local/go/src/cmd/compile/internal/gc/const.go:99 +0x2df
cmd/compile/internal/gc.checkDupExprCases(0xc4202cee80, 0xc42000c548, 0x1, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/swt.go:628 +0x5ad
	/usr/local/go/src/cmd/compile/internal/gc/swt.go:210 +0x13a8
cmd/compile/internal/gc.typecheck1(0xc4202ceb80, 0x1, 0xc4202cea80)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:2157 +0xc871
cmd/compile/internal/gc.typecheck(0xc4202ceb80, 0x1, 0xc4202cea80)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:201 +0x764
cmd/compile/internal/gc.typecheckslice(0xc4202c7b40, 0x3, 0x4, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:55 +0x54
	/usr/local/go/src/cmd/compile/internal/gc/main.go:480 +0x1fd0
	/usr/local/go/src/cmd/compile/main.go:49 +0x95

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Sep 26, 2017


This comment has been minimized.

Copy link

commented Sep 26, 2017

The good news is that this is already fixed: #21988

The bad news is that it's a regression in 1.9 not deemed important enough for a 1.9.x. And I would imagine the playground has to run stable, not tip.


This comment has been minimized.

Copy link

commented Sep 26, 2017

Duplicate of #21988.

@mdempsky mdempsky closed this Sep 26, 2017

@golang golang locked and limited conversation to collaborators Sep 26, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.