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: Expand calls interface data problem #49378

Closed
ALTree opened this issue Nov 5, 2021 · 4 comments
Closed

cmd/compile: internal compiler error: Expand calls interface data problem #49378

ALTree opened this issue Nov 5, 2021 · 4 comments
Labels
NeedsFix
Milestone

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented Nov 5, 2021

$ gotip version
go version devel go1.18-6fefb7f9f3 Fri Nov 5 07:00:05 2021 +0000 windows/amd64
package p

func f(i int) {
        var s1 struct {
                s struct{ s struct{ i int } }
        }
        var s2, s3 struct {
                a struct{ i int }
                b int
        }
        func() {
                i = 1 + 2*i + s3.a.i + func() int {
                        s2.a, s2.b = s3.a, s3.b
                        return 0
                }() + func(*int) int {
                        return s1.s.s.i
                }(new(int))
        }()
}
$ gotip tool compile crash.go

crash.go:18:2: internal compiler error: 'f.func1': Expand calls interface data problem, func f.func1, v=v39 = StructSelect <int> [0] v13, w=v13 = StructSelect <int> [0] v9


goroutine 1 [running]:
runtime/debug.Stack()
        D:/users/XXX/alberto/other/gotip/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x1145140?, 0x0?}, {0xc0000be7c0, 0x3f}, {0xc000059300, 0x4, 0x4})
        D:/users/XXX/alberto/other/gotip/src/cmd/compile/internal/base/print.go:227 +0x1ca
cmd/compile/internal/base.Fatalf(...)
        D:/users/XXX/alberto/other/gotip/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0x8?, {0x171f0598?, 0x208?}, {0x11ee34e, 0x39}, {0xc0003c23f0, 0x3, 0x0?})
        D:/users/XXX/alberto/other/gotip/src/cmd/compile/internal/ssagen/ssa.go:7650 +0x17d
cmd/compile/internal/ssa.(*Func).Fatalf(0xc0003de380, {0x11ee34e, 0x39}, {0xc0003c23f0, 0x3, 0x3})
        D:/users/XX/alberto/other/gotip/src/cmd/compile/internal/ssa/func.go:773 +0x279
cmd/compile/internal/ssa.expandCalls(0xc0003de380)
        D:/users/XXX/alberto/other/gotip/src/cmd/compile/internal/ssa/expand_calls.go:1472 +0xbff
cmd/compile/internal/ssa.Compile(0xc0003de380)

Compiles fine on go1.17.2.

Similar: #49249.

@ALTree ALTree added the NeedsInvestigation label Nov 5, 2021
@ALTree ALTree added this to the Go1.18 milestone Nov 5, 2021
@cuonglm
Copy link
Member

@cuonglm cuonglm commented Nov 5, 2021

@dr2chase sounds like what you worried in CL 360057 is right.

@cuonglm cuonglm self-assigned this Nov 5, 2021
@cuonglm cuonglm added the NeedsFix label Nov 5, 2021
@gopherbot gopherbot removed the NeedsInvestigation label Nov 5, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 5, 2021

Change https://golang.org/cl/361594 mentions this issue: cmd/compile: restore source type after recursive call storeArgOrLoad

@cuonglm
Copy link
Member

@cuonglm cuonglm commented Nov 5, 2021

@gopherbot please open backport to 1.16 and 1.17

cc @randall77 @dr2chase

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 5, 2021

Backport issue(s) opened: #49391 (for 1.16), #49392 (for 1.17).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@rsc rsc unassigned cuonglm Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix
Projects
None yet
Development

No branches or pull requests

3 participants