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, evconst changed Type #23417

bradfitz opened this issue Jan 11, 2018 · 1 comment

cmd/compile: internal compiler error, evconst changed Type #23417

bradfitz opened this issue Jan 11, 2018 · 1 comment


Copy link

@bradfitz bradfitz commented Jan 11, 2018

This works on Go 1.8, but fails in Go 1.9 and Go tip (~Go 1.10beta2):

package main

func main() {
        type T struct{}
        var s = struct {
                t1 T
                _  int
                t2 T
        print(len(map[*T]int{&s.t1: 0, &s.t2: 0}))
bradfitz@gdev:~$ go run x.go
# command-line-arguments
<autogenerated>:1:0: internal compiler error: evconst changed Type: true && true had type bool, now untyped bool

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /home/bradfitz/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xc26e98, 0x2c, 0xc4204bcc80, 0x3, 0x3)
        /home/bradfitz/go/src/cmd/compile/internal/gc/subr.go:182 +0x1f2
cmd/compile/internal/gc.walkexpr(0xc420312000, 0xc420312090, 0xc4204f4ed0)
        /home/bradfitz/go/src/cmd/compile/internal/gc/walk.go:1745 +0xae0
cmd/compile/internal/gc.walkexprlist(0xc4204cc380, 0x1, 0x1, 0xc420312090)
        /home/bradfitz/go/src/cmd/compile/internal/gc/walk.go:378 +0x50
cmd/compile/internal/gc.walkstmt(0xc420312080, 0xc4204bcf01)
        /home/bradfitz/go/src/cmd/compile/internal/gc/walk.go:292 +0x11f
cmd/compile/internal/gc.walkstmtlist(0xc4204cc390, 0x1, 0x1)
        /home/bradfitz/go/src/cmd/compile/internal/gc/walk.go:78 +0x46
        /home/bradfitz/go/src/cmd/compile/internal/gc/walk.go:62 +0x3a1
        /home/bradfitz/go/src/cmd/compile/internal/gc/pgen.go:203 +0xae
        /home/bradfitz/go/src/cmd/compile/internal/gc/dcl.go:1040 +0xad
cmd/compile/internal/gc.geneq(0xc42050faa0, 0xc420341140)
        /home/bradfitz/go/src/cmd/compile/internal/gc/alg.go:503 +0x790
cmd/compile/internal/gc.dalgsym(0xc420341140, 0xffffffffffffffff)
        /home/bradfitz/go/src/cmd/compile/internal/gc/reflect.go:1685 +0x5c4
cmd/compile/internal/gc.dcommontype(0xc42050a000, 0x0, 0xc420341140, 0x58)
        /home/bradfitz/go/src/cmd/compile/internal/gc/reflect.go:856 +0xa3
cmd/compile/internal/gc.dtypesym(0xc420341140, 0xc42050a150)
        /home/bradfitz/go/src/cmd/compile/internal/gc/reflect.go:1360 +0xd19
        /home/bradfitz/go/src/cmd/compile/internal/gc/reflect.go:1511 +0x341
cmd/compile/internal/gc.dumpobj1(0x7ffc8fb3010c, 0x23, 0x3)
        /home/bradfitz/go/src/cmd/compile/internal/gc/obj.go:139 +0x2a1
        /home/bradfitz/go/src/cmd/compile/internal/gc/obj.go:50 +0x51
        /home/bradfitz/go/src/cmd/compile/internal/gc/main.go:683 +0x2b0e
        /home/bradfitz/go/src/cmd/compile/main.go:49 +0x89

/cc @dsnet @mdempsky @griesemer

@bradfitz bradfitz added the NeedsFix label Jan 11, 2018
@bradfitz bradfitz added this to the Go1.11 milestone Jan 11, 2018

This comment has been minimized.

Copy link
Contributor Author

@bradfitz bradfitz commented Jan 11, 2018

Oh, dup of #23414.

@bradfitz bradfitz closed this Jan 11, 2018
@golang golang locked and limited conversation to collaborators Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.