From 634c5bcafabedcd635e64e224973681ad2afc7b9 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 17 Dec 2019 16:57:25 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/symtab.c | 5 +++++ 2 files changed, 10 insertions(+) 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) -- 2.30.2