[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 #8 from Jeffrey A. Law --- Author: law Date: Mon May 21 20:30:00 2018 New Revision: 260485 URL: https://gcc.gnu.org/viewcvs?rev=260485&root=gcc&view=rev Log: PR gcc/84923 * varasm.c (weak_finish): Clean up weak_decls. Modified: trunk/gcc/ChangeLog trunk/gcc/varasm.c
[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 #7 from Vladimir Mezentsev --- About comment #3 and #4. I cannot reproduce a problem. Is it a cross compilation on x86 for aarch64 ? What need to do to reproduce the problem ?
[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 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.0 |8.2 --- Comment #6 from Jakub Jelinek --- GCC 8.1 has been released.
[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 --- 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.
[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 #4 from Ramana Radhakrishnan --- (In reply to Richard Biener from comment #3) > For x86_64 if I append > > const int *dat[] = { &Wv12, &wv12 }; > > the testcase links fine irrespective of where I place the > > .weakrefWv12,wv12 > .weak wv12 > > assembler declarations. > > When I look at the assembler generated by a cross from x86_64 I do not > see any .weak wv12 directive which is likely the issue. Yep, the .weak wv12 directive is the one that disappears. Putting that back in by hand fixes the issue.
[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 #3 from Richard Biener --- For x86_64 if I append const int *dat[] = { &Wv12, &wv12 }; the testcase links fine irrespective of where I place the .weakrefWv12,wv12 .weak wv12 assembler declarations. When I look at the assembler generated by a cross from x86_64 I do not see any .weak wv12 directive which is likely the issue.
[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 Richard Biener changed: What|Removed |Added Component|c |target Known to work||7.3.1 Target Milestone|--- |8.0 Summary|[8 regression] |[8/9 regression] |gcc.dg/attr-weakref-1.c |gcc.dg/attr-weakref-1.c |failed on aarch64 |failed on aarch64