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: .dict already has a location #47723

Closed
ALTree opened this issue Aug 16, 2021 · 1 comment
Closed

cmd/compile: internal compiler error: .dict already has a location #47723

ALTree opened this issue Aug 16, 2021 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Aug 16, 2021

$ gotip version
go version devel go1.18-a0adf91d85 Mon Aug 16 16:58:24 2021 +0000 linux/amd64

A few programs that were crashing the compiler earlier with #47684 now do this, after that got fixed:

package main

func f[_ any]() int {
	var a []int
	_ = func() int {
		return func() int {
			return 0
		}()
	}()
	return a[func() int {
		return 0
	}()]
}

func main() {
	f[int]()
}
$ gotip tool compile -G=3 crash.go

crash.go:16:2: internal compiler error: .dict already has a location

goroutine 1 [running]:
runtime/debug.Stack()
	/home/alberto/go/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x401d40, 0xc0}, {0xcfa973, 0x19}, {0xc000115760, 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/escape.(*escape).newLoc(0xc000115880, {0xe5fe98, 0xc000401d40}, 0x0)
	/home/alberto/go/src/cmd/compile/internal/escape/graph.go:246 +0x54e
...

cc @danscales @randall77

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 16, 2021
@ALTree ALTree added this to the Go1.18 milestone Aug 16, 2021
@randall77 randall77 self-assigned this Aug 16, 2021
@gopherbot
Copy link

Change https://golang.org/cl/343871 mentions this issue: cmd/compile: copy captured dictionary var to local var

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants