This patch to the Go frontend sets TREE_PUBLIC for only-inline functions. This fixes GCC PR 89227. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu and ppc64le-linux-gnu. Committed to mainline.
Ian 2019-03-06 Ian Lance Taylor <i...@golang.org> PR go/89227 * go-gcc.cc (Gcc_backend::function): Set TREE_PUBLIC for an only-inline function.
Index: go-gcc.cc =================================================================== --- go-gcc.cc (revision 269196) +++ go-gcc.cc (working copy) @@ -3101,6 +3101,7 @@ Gcc_backend::function(Btype* fntype, con resolve_unique_section(decl, 0, 1); if ((flags & function_only_inline) != 0) { + TREE_PUBLIC (decl) = 1; DECL_EXTERNAL(decl) = 1; DECL_DECLARED_INLINE_P(decl) = 1; }