Skip to content

cmd/compile: internal compiler error: Int64Val(10000000000000000000) (dev.regabi branch) #43480

Closed

Description

@zikaeroh

What version of Go are you using (go version)?

$ go version
go version devel +8fc44cf0fa Sun Jan 3 19:48:20 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

No, only on the regabi branch.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jake/.cache/go-build"
GOENV="/home/jake/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jake/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jake/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/jake/zikaeroh/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/jake/zikaeroh/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jake/decimal/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build867052434=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version devel +8fc44cf0fa Sun Jan 3 19:48:20 2021 +0000 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +8fc44cf0fa Sun Jan 3 19:48:20 2021 +0000
uname -sr: Linux 5.10.4-zen2-1-zen
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.32.
gdb --version: GNU gdb (GDB) 10.1

What did you do?

Cloned https://github.com/ericlagergren/decimal, built the dev.regabi branch, and did a go build in the decimal checkout.

What did you expect to see?

No errors.

What did you see instead?

# github.com/ericlagergren/decimal/internal/arith
internal/arith/pow.go:65:17: internal compiler error: Int64Val(10000000000000000000)

goroutine 1 [running]:
runtime/debug.Stack(0xe8d1a0, 0xc00000e018, 0x0)
	/home/jake/zikaeroh/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x4902000000080, 0xd5a11d, 0xc, 0xc0001055e8, 0x1, 0x1)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/base/print.go:227 +0x1b9
cmd/compile/internal/base.Fatalf(...)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ir.Int64Val(0xe9bb50, 0xc000069c20, 0xde0b6b3a7640000)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/ir/val.go:137 +0x105
cmd/compile/internal/walk.(*exprSwitch).flush(0xc0004db540)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/switch.go:207 +0x4fa
cmd/compile/internal/walk.(*exprSwitch).Emit(0xc0004db540, 0xc0005d5ae0)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/switch.go:139 +0x2f
cmd/compile/internal/walk.walkSwitchExpr(0xc0005d5a80)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/switch.go:106 +0x910
cmd/compile/internal/walk.walkSwitch(0xc0005d5a80)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/switch.go:29 +0x46
cmd/compile/internal/walk.walkStmt(0xe9d8d8, 0xc0005d5a80, 0xe9c210, 0xc0005f4d90)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/stmt.go:157 +0xc7a
cmd/compile/internal/walk.walkStmtList(0xc000081000, 0x31, 0x40)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/stmt.go:172 +0x65
cmd/compile/internal/walk.Walk(0xc0004f4b40)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/walk/walk.go:44 +0xb3
cmd/compile/internal/gc.compile(0xc0004f4b40)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/gc/compile.go:65 +0x54
cmd/compile/internal/gc.funccompile(0xc0004f4b40)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/gc/compile.go:53 +0xc7
cmd/compile/internal/gc.Main(0xd7ed10)
	/home/jake/zikaeroh/go/src/cmd/compile/internal/gc/main.go:323 +0x115a
main.main()
	/home/jake/zikaeroh/go/src/cmd/compile/main.go:54 +0xb1

/cc @mdempsky

Activity

  1. self-assigned this
    on Jan 3, 2021
  2. zikaeroh commented on Jan 3, 2021

    @zikaeroh
    ContributorAuthor

    Bisects to CL 272654 (unsurprising, I guess).

  3. gopherbot commented on Jan 3, 2021

    @gopherbot
    Contributor

    Change https://golang.org/cl/281272 mentions this issue: [dev.regabi] cmd/compile: fix ICE due to large uint64 constants

  4. gopherbot commented on Jan 4, 2021

    @gopherbot
  5. added a commit that references this issue on Jan 4, 2021
    290b415
  6. zikaeroh commented on Jan 4, 2021

    @zikaeroh
    ContributorAuthor

    Closing as fixed on dev.regabi (GitHub won't autoclose this until it's merged into master).

  7. locked and limited conversation to collaborators on Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions