From: Jan Hubicka Date: Tue, 17 Dec 2019 15:57:25 +0000 (+0100) Subject: symtab.c (symtab_node::get_partitioning_class): Aliases of external symbols are external. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=634c5bcafabedcd635e64e224973681ad2afc7b9;p=gcc.git symtab.c (symtab_node::get_partitioning_class): Aliases of external symbols are external. * symtab.c (symtab_node::get_partitioning_class): Aliases of external symbols are external. From-SVN: r279464 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1be2ae9607d..e5702ae0612 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-12-17 Jan Hubicka + + * symtab.c (symtab_node::get_partitioning_class): Aliases of external + symbols are external. + 2019-12-17 Christophe Lyon * config/arm/arm-protos.h (thumb1_gen_const_int): Add new prototype. diff --git a/gcc/symtab.c b/gcc/symtab.c index a88f45c4341..10b8ed1d178 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1952,6 +1952,11 @@ symtab_node::get_partitioning_class (void) if (DECL_EXTERNAL (decl)) return SYMBOL_EXTERNAL; + /* Even static aliases of external functions as external. Those can happen + when COMDAT got resolved to non-IL implementation. */ + if (alias && DECL_EXTERNAL (ultimate_alias_target ()->decl)) + return SYMBOL_EXTERNAL; + if (varpool_node *vnode = dyn_cast (this)) { if (alias && definition && !ultimate_alias_target ()->definition)