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: dowidth: unknown type: untyped number #20813

Closed
ALTree opened this issue Jun 27, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@ALTree
Copy link
Member

commented Jun 27, 2017

$ gotip version
go version devel +b4dd1d965d Sun Jun 25 15:57:18 2017 +0000 linux/amd64

The following program:

package p

func f() {
	1 = 2
}

crashes the go1.9 compiler on dowidth

./test.go:4:4: internal compiler error: dowidth: unknown type: untyped number

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/adonizetti/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb616c4, 0x19, 0xc420302760, 0x1, 0x1)
	/home/adonizetti/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.dowidth(0xc420095da0)
	/home/adonizetti/go/src/cmd/compile/internal/gc/align.go:227 +0x4e6
cmd/compile/internal/gc.checkwidth(0xc420095da0)
	/home/adonizetti/go/src/cmd/compile/internal/gc/align.go:424 +0x17c
cmd/compile/internal/gc.typecheckas(0xc420316a00)
	/home/adonizetti/go/src/cmd/compile/internal/gc/typecheck.go:3374 +0x18b
cmd/compile/internal/gc.typecheck1(0xc420316a00, 0x1, 0x4b3731)
	/home/adonizetti/go/src/cmd/compile/internal/gc/typecheck.go:2047 +0x3b04
cmd/compile/internal/gc.typecheck(0xc420316a00, 0x1, 0x3)
	/home/adonizetti/go/src/cmd/compile/internal/gc/typecheck.go:201 +0x764
cmd/compile/internal/gc.typecheckslice(0xc42007e508, 0x1, 0x1, 0x1)
	/home/adonizetti/go/src/cmd/compile/internal/gc/typecheck.go:55 +0x54
cmd/compile/internal/gc.Main(0xb717b0)
	/home/adonizetti/go/src/cmd/compile/internal/gc/main.go:480 +0x1fd0
main.main()
	/home/adonizetti/go/src/cmd/compile/main.go:49 +0x95

This is new: the go1.8 compiler does not crash on this program.

@ALTree ALTree added this to the Go1.9Maybe milestone Jun 27, 2017

@ALTree ALTree added the NeedsFix label Jun 27, 2017

@ALTree

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2017

Bisected to 0b6a10e.

@mvdan

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

/cc @mdempsky

@mdempsky mdempsky self-assigned this Jun 27, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Jun 27, 2017

CL https://golang.org/cl/46835 mentions this issue.

@gopherbot gopherbot closed this in f62c608 Jun 27, 2017

@golang golang locked and limited conversation to collaborators Jun 27, 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.