Hi,

Given this is a midend change it's a good idea to CC some of the maintainers of 
that area.
I've copied richi and Honza.

Thanks,
Kyrill

On 17/05/18 05:35, vladimir.mezent...@oracle.com wrote:
Ping.

-Vladimir


On 05/10/2018 11:30 PM, vladimir.mezent...@oracle.com wrote:
> From: Vladimir Mezentsev <vladimir.mezent...@oracle.com>
>
> When weakref_targets is not empty a target cannot be removed from the weak 
list.
> 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-05-10  Vladimir Mezentsev <vladimir.mezent...@oracle.com>
>
> PR gcc/84923
> * varasm.c (weak_finish): clean up weak_decls
> ---
>  gcc/varasm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/varasm.c b/gcc/varasm.c
> index 85296b4..8cf6e1e 100644
> --- a/gcc/varasm.c
> +++ b/gcc/varasm.c
> @@ -5652,7 +5652,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;


Reply via email to