https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102349
--- Comment #8 from David Edelsohn <dje at gcc dot gnu.org> ---
This needs an additional adjustment. The encoding decoration needs to be
applied if the decl isn't an alias. That means both a null summary *OR* the
decl is not explicitly an alias.
I'm proposing the following:
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d0830a95027..ad81dfb316d 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -21728,8 +21728,8 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl,
in
t first)
if (decl
&& DECL_P (decl)
&& VAR_OR_FUNCTION_DECL_P (decl)
- && symtab_node::get (decl) != NULL
- && symtab_node::get (decl)->alias == 0
+ && (symtab_node::get (decl) == NULL
+ || symtab_node::get (decl)->alias == 0)
&& symname[strlen (symname) - 1] != ']')
{
const char *smclass = NULL;