Navigation Menu

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: 'main': not lowered #31315

Closed
ericlagergren opened this issue Apr 7, 2019 · 3 comments
Closed

cmd/compile: internal compiler error: 'main': not lowered #31315

ericlagergren opened this issue Apr 7, 2019 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@ericlagergren
Copy link
Contributor

ericlagergren commented Apr 7, 2019

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

1.12.2 (occurs with 1.12 and 1.12.1).

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

darwin/amd64

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/ericlagergren/gopath/bin"
GOCACHE="/Users/ericlagergren/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ericlagergren/gopath"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vp/6n5tkzt93_7cb22vrc0qd08r0000gn/T/go-build366116268=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ cat x.go
package main

import (
	"fmt"
	"math/bits"
)

func main() {
	fmt.Println(bits.Sub(4, 100, 0))
}

The bug is a bit different on the playground:

https://play.golang.org/p/UmLdx0JeZHN

What did you expect to see?

18446744073709551520 1

What did you see instead?

# command-line-arguments
<unknown line number>: internal compiler error: 'main': not lowered: v19, Store SSA PTR UINT64 SSA

Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
@ericlagergren
Copy link
Contributor Author

ericlagergren commented Apr 7, 2019

These does not reproduce the error:

func main() {
	x, c := bits.Sub(4, 100, 0)
	fmt.Println(x, c)
}

func main() {
	fmt.Println(bits.OnesCount(4))
}

func main() {
	fmt.Println(MySub(4, 100, 0)) // MySub is a copy + pasted bits.Sub
}

@agnivade
Copy link
Contributor

agnivade commented Apr 7, 2019

Seems to be fixed at tip. Can you confirm ?

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 7, 2019
@ericlagergren
Copy link
Contributor Author

Yup. Sorry, I thought it sounded like another issue (dupe) I'd read before, but couldn't find one that was similar enough.

@golang golang locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants