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

--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> ---
> Thank you for the missing externally visible attribute.
> 
> I've been testing following patch:
> 
> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index b193200..0685019 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -1131,8 +1131,12 @@ sem_variable::parse (varpool_node *node, bitmap_obstack
> *stack)
>    tree decl = node->decl;
> 
>    bool readonly = TYPE_P (decl) ? TYPE_READONLY (decl) : TREE_READONLY 
> (decl);
> -  bool can_handle = readonly && (DECL_VIRTUAL_P (decl)
> -                                || !TREE_ADDRESSABLE (decl));
> +  if (!readonly)
> +    return NULL;
> +
> +  bool can_handle = DECL_VIRTUAL_P (decl)
> +                   || flag_merge_constants >= 2
> +                   || (!TREE_ADDRESSABLE (decl) && 
> !node->externally_visible);
> 
>    if (!can_handle)
>      return NULL;
> 
> As soon as tests finish, I will send it to ML.

Thanks, the patch is OK if it passes.
Also please be sure that we won't merge DECL_EXTERNAL at all.  Producing an
extenral
alias is not going to save any code.

Honza
> 
> Martin
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.

Reply via email to