This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/84923] [8/9 regression] gcc.dg/attr-weakref-1.c failed on aarch64


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84923

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So in spirit of the comment#2 patch I'd propose

Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c        (revision 259638)
+++ gcc/varasm.c        (working copy)
@@ -5641,7 +5641,8 @@ weak_finish (void)
       tree alias_decl = TREE_PURPOSE (t);
       tree target = ultimate_transparent_alias_target (&TREE_VALUE (t));

-      if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl)))
+      if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl))
+         || TREE_SYMBOL_REFERENCED (target))
        /* Remove alias_decl from the weak list, but leave entries for
           the target alone.  */
        target = NULL_TREE;

given do_assemble_alias skips the weak_finish part if TREE_SYMBOL_REFERENCED
(target) and thus will not end up removing target from the alias list.
The above makes both paths match.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]