gccgo: build failed with undefined func value symbol due to inlining #33739
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?gccgo (GCC) 10.0.0 20190816 (experimental)
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Build a program with the main package importing package p:
package p
package main
What did you expect to see?
build succeeds.
What did you see instead?
Package p defines a function F, which references an unexported function by func value (f). When compiling main, p.F is inlined. As a result main has a direct reference to the func value symbol
p.f..f
. Butp.f..f
is private in the object file of package p. This causes the linking to fail.If a func value is referenced by an inlineable function, I think we need to export the func value symbol.
The text was updated successfully, but these errors were encountered: