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: unhandled OCONV INT -> TUNSAFEPTR #16317
Comments
Not a regression so marking as Go1.8. |
Might be related to #16306 . |
looking into this. During inlining in mkinlcall1 fn.func.Inl contains return @"unsafe".Pointer(int(0x0)) so somewhere the conversion got lost in binary export->import and ssa expr() later trips on the OCONV from INT to TUNSAFEPTR generated by the inlining. Seems like maybe in bimport.go node() case OLITERAL we could handle unsafe.Pointer specially.
|
cc @griesemer and @mdempsky for import/export. They're the right reviewers for the CL if/when it comes. |
@josharian saw this to late but i added @griesemer on cc anyway. We can fix this in many ways but i think at import is cleaner because it seems to happen only with export + import. |
CL https://golang.org/cl/27441 mentions this issue. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.7rc1 windows/amd64
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=c:\work\go
set GORACE=
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=c:\temp\go-build284024486=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
Compiling.
module $GOPATH/tst/tst.go
module $GOPATH/main.go
Successfull compilation
Notes:
Go 1.6.2 produces same compilation error but without internal compiler error
Compilation error disappers if function NullPtr moved from package to main module:
The text was updated successfully, but these errors were encountered: