https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113182
--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> ---
The problem is TREE_SYMBOL_REFERENCED is not set for libfuncs. This fixes
problem on hppa64-hpux:
bash-5.1$ git diff gcc/varasm.cc
diff --git a/gcc/varasm.cc b/gcc/varasm.cc
index 69f8f8ee018..0a1cc022023 100644
--- a/gcc/varasm.cc
+++ b/gcc/varasm.cc
@@ -2527,9 +2527,7 @@ process_pending_assemble_externals (void)
for (rtx list = pending_libcall_symbols; list; list = XEXP (list, 1))
{
rtx symbol = XEXP (list, 0);
- tree id = get_identifier (XSTR (symbol, 0));
- if (TREE_SYMBOL_REFERENCED (id))
- targetm.asm_out.external_libcall (symbol);
+ targetm.asm_out.external_libcall (symbol);
}
pending_assemble_externals = 0;
If you don't care about libfuncs, you could move the TREE_SYMBOL_REFERENCED
check into the bpf target.