-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/gc: internal compiler error when inlining due to missing export data #5755
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
Labels
Milestone
Comments
Here's a small reproducer: # a.go package a type I interface { F() } type foo []byte func (f foo) F() { return } func Test(s string) I { return foo(s) } # main.go package main import "./a" func main() { i := a.Test("frumious") _ = i } Which gives the same error: rundir bugs/tmp.go : exit status 1 walk [7f5e0a643018] . CALL l(6) tc(1) . . NONAME-a.foo u(1) a(1) l(6) x(0+0) tc(1) a.foo G0 . CALL-list . . NAME-a.s·2 u(1) a(1) l(6) x(0+0) class(PAUTO) ld(1) tc(1) used(1) string /home/apm/src/go/test/bugs/tmp.dir/main.go:3: undefined: a.foo /home/apm/src/go/test/bugs/tmp.dir/main.go:6: tempname called with nil type /home/apm/src/go/test/bugs/tmp.dir/main.go:6: internal compiler error: walkexpr: switch 1 unknown op CALL l(6) tc(1) exit status 1 Note that if you change the underlying type of a.foo to string instead of []byte it works fine. Labels changed: added go1.2, removed priority-triage. Status changed to Accepted. |
This issue was closed by revision c1fc8d5. Status changed to Fixed. |
adg
added a commit
that referenced
this issue
May 11, 2015
…n a few other cases. ««« CL 10464043 / c224c549a3c7 cmd/gc: fix missing export data for inlining in a few other cases. Exported inlined functions that perform a string conversion using a non-exported named type may miss it in export data. Fixes #5755. R=rsc, golang-dev, ality, r CC=golang-dev https://golang.org/cl/10464043 »»» Update #5928 R=golang-dev, dave CC=golang-dev https://golang.org/cl/11629044
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by [email protected]:
The text was updated successfully, but these errors were encountered: