https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117350
--- Comment #21 from ak at gcc dot gnu.org --- Thanks. I'll see if this patch is enough: diff --git a/gcc/tree.cc b/gcc/tree.cc index b4c059d3b0db..92f99eaccd72 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -787,8 +787,9 @@ need_assembler_name_p (tree decl) || DECL_ASSEMBLER_NAME_SET_P (decl)) return false; - /* Abstract decls do not need an assembler name. */ - if (DECL_ABSTRACT_P (decl)) + /* Abstract decls do not need an assembler name, except they + can be looked up by autofdo. */ + if (DECL_ABSTRACT_P (decl) && !flag_auto_profile) return false; /* For VAR_DECLs, only static, public and external symbols need an