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: untyped constant to complex conversion crashes compiler #11600

Closed
griesemer opened this issue Jul 4, 2015 · 1 comment
Closed
Milestone

Comments

@griesemer
Copy link
Contributor

go build crashes for:

package a
var x complex64 = 774516156475830989403545856475830078125
panic: interface conversion: interface {} is *gc.Mpcplx, not *gc.Mpflt

goroutine 1 [running]:
cmd/compile/internal/gc.overflow(0x379d00, 0x820b7ac80, 0x820a848c0)
    /Users/gri/go/src/cmd/compile/internal/gc/const.go:449 +0x55f
cmd/compile/internal/gc.defaultlit(0x820a9add8, 0x820a848c0)
    /Users/gri/go/src/cmd/compile/internal/gc/const.go:1295 +0x3b7
cmd/compile/internal/gc.assignconvfn(0x820b79200, 0x820a848c0, 0x820a9adf8, 0x0)
    /Users/gri/go/src/cmd/compile/internal/gc/subr.go:1335 +0xfd
cmd/compile/internal/gc.assignconv(0x820b785a0, 0x820a848c0, 0x4192c0, 0xa, 0x820a9ae58)
    /Users/gri/go/src/cmd/compile/internal/gc/subr.go:1320 +0x62
cmd/compile/internal/gc.typecheckas(0x820b78630)
    /Users/gri/go/src/cmd/compile/internal/gc/typecheck.go:3324 +0x11f
cmd/compile/internal/gc.typecheck1(0x820a9b9f8, 0x2)
    /Users/gri/go/src/cmd/compile/internal/gc/typecheck.go:2055 +0x490b
cmd/compile/internal/gc.typecheck(0x820b4d4c0, 0x2, 0x0)
    /Users/gri/go/src/cmd/compile/internal/gc/typecheck.go:202 +0x939
cmd/compile/internal/gc.Main()
    /Users/gri/go/src/cmd/compile/internal/gc/lex.go:385 +0x2126
cmd/compile/internal/amd64.Main()
    /Users/gri/go/src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
    /Users/gri/go/src/cmd/compile/main.go:26 +0x189
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jul 10, 2015
@griesemer griesemer self-assigned this Aug 28, 2015
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants