-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
$ gotip version
go version devel go1.19-527ace0ffa Sat Jun 18 00:48:50 2022 +0000 linux/amd64
package main
import "unsafe"
func F[T int](v T) uintptr {
return unsafe.Offsetof(struct{ f T }{
func(T) T { return v }(v),
}.f)
}
func main() {
println(F(1))
}
$ gotip build crash.go
# command-line-arguments
./crash.go:7:25: internal compiler error: found illegal assignment go.shape.int_0 -> main.F.T;
goroutine 1 [running]:
runtime/debug.Stack()
./gotip/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x0?, 0x0?}, {0xd560d3, 0x27}, {0xc000412468, 0x3, 0x3})
./gotip/src/cmd/compile/internal/base/print.go:227 +0x1d7
cmd/compile/internal/base.Fatalf(...)
./gotip/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/noder.assignconvfn({0xeadd88, 0xc0003fdb80}, 0xc0003e12d0)
./gotip/src/cmd/compile/internal/noder/transform.go:482 +0x1b2
cmd/compile/internal/noder.typecheckaste(0xc0?, {0xc0001726c0?, 0xeacb90?}, 0x0, 0x0?, {0xc00005ef80, 0x1, 0xc00005ef80?})
./gotip/src/cmd/compile/internal/noder/transform.go:558 +0x16b
cmd/compile/internal/noder.transformCall(0xc0001726c0)
./gotip/src/cmd/compile/internal/noder/transform.go:188 +0x1b6
cmd/compile/internal/noder.(*subster).node.func1({0xeacb90, 0xc000172240})
./gotip/src/cmd/compile/internal/noder/stencil.go:1135 +0xe13
cmd/compile/internal/ir.editNodes(...)
./gotip/src/cmd/compile/internal/ir/node_gen.go:1388
cmd/compile/internal/ir.(*CompLitExpr).editChildren(0xc000418380, 0xc000011db8)
./gotip/src/cmd/compile/internal/ir/node_gen.go:359 +0xf5
cmd/compile/internal/ir.EditChildren(...)
./gotip/src/cmd/compile/internal/ir/visit.go:185
cmd/compile/internal/noder.(*subster).node.func1({0xeace70, 0xc0003e1b90})
./gotip/src/cmd/compile/internal/noder/stencil.go:994 +0x5b6
cmd/compile/internal/ir.(*SelectorExpr).editChildren(0xc000069d40, 0xc000011db8)
./gotip/src/cmd/compile/internal/ir/node_gen.go:1012 +0x62
cmd/compile/internal/ir.EditChildren(...)
./gotip/src/cmd/compile/internal/ir/visit.go:185
cmd/compile/internal/noder.(*subster).node.func1({0xeae348, 0xc000069bc0})
./gotip/src/cmd/compile/internal/noder/stencil.go:994 +0x5b6
cmd/compile/internal/ir.editNodes(...)
./gotip/src/cmd/compile/internal/ir/node_gen.go:1388
...
Likely related to #53390, either uncovered or caused by its fix.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.