diff mbox series

PR gcc/84923 - gcc.dg/attr-weakref-1.c failed on aarch64

Message ID 1523599733-10934-1-git-send-email-vladimir.mezentsev@oracle.com
State New
Headers show
Series PR gcc/84923 - gcc.dg/attr-weakref-1.c failed on aarch64 | expand

Commit Message

Vladimir Mezentsev April 13, 2018, 6:08 a.m. UTC
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

When weakref_targets is not empty a target cannot be removed from weak_decls.
A small example is below when 'wv12' is removed from the weak list on aarch64:
  static vtype Wv12 __attribute__((weakref ("wv12")));
  extern vtype wv12 __attribute__((weak));

Bootstrapped on aarch64-unknown-linux-gnu including (c,c++ and go).
Tested on aarch64-linux-gnu.
No regression. The attr-weakref-1.c test passed.

ChangeLog:
2018-04-12  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gcc/84923
* varasm.c (weak_finish): clean up weak_decls
---
 gcc/varasm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ramana Radhakrishnan April 25, 2018, 9:54 a.m. UTC | #1
On Fri, Apr 13, 2018 at 7:08 AM,  <vladimir.mezentsev@oracle.com> wrote:
> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> When weakref_targets is not empty a target cannot be removed from weak_decls.
> A small example is below when 'wv12' is removed from the weak list on aarch64:
>   static vtype Wv12 __attribute__((weakref ("wv12")));
>   extern vtype wv12 __attribute__((weak));
>
> Bootstrapped on aarch64-unknown-linux-gnu including (c,c++ and go).
> Tested on aarch64-linux-gnu.
> No regression. The attr-weakref-1.c test passed.


It appears that this patch hasn't been reviewed at all. Just a ping
here and bringing honza on copy as discussed on IRC.

regards
Ramana


>
> ChangeLog:
> 2018-04-12  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
>
> PR gcc/84923
> * varasm.c (weak_finish): clean up weak_decls
> ---
>  gcc/varasm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/varasm.c b/gcc/varasm.c
> index d24bac4..2a70234 100644
> --- a/gcc/varasm.c
> +++ b/gcc/varasm.c
> @@ -5683,8 +5683,7 @@ weak_finish (void)
>            nor multiple .weak directives for the latter.  */
>         for (p = &weak_decls; (t2 = *p) ; )
>           {
> -           if (TREE_VALUE (t2) == alias_decl
> -               || target == DECL_ASSEMBLER_NAME (TREE_VALUE (t2)))
> +           if (TREE_VALUE (t2) == alias_decl)
>               *p = TREE_CHAIN (t2);
>             else
>               p = &TREE_CHAIN (t2);
> --
> 1.8.3.1
>
diff mbox series

Patch

diff --git a/gcc/varasm.c b/gcc/varasm.c
index d24bac4..2a70234 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5683,8 +5683,7 @@  weak_finish (void)
 	   nor multiple .weak directives for the latter.  */
 	for (p = &weak_decls; (t2 = *p) ; )
 	  {
-	    if (TREE_VALUE (t2) == alias_decl
-		|| target == DECL_ASSEMBLER_NAME (TREE_VALUE (t2)))
+	    if (TREE_VALUE (t2) == alias_decl)
 	      *p = TREE_CHAIN (t2);
 	    else
 	      p = &TREE_CHAIN (t2);