]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: fix symtab_node::get == NULL issue
authorMartin Liska <mliska@suse.cz>
Wed, 15 Sep 2021 15:19:58 +0000 (17:19 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 15 Sep 2021 15:19:58 +0000 (17:19 +0200)
PR target/102349

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_xcoff_encode_section_info):
Check that we have a symbol summary for a symbol.

gcc/config/rs6000/rs6000.c

index b0ec8108007ecbbbb8d3fa8047b33b445831e755..d0830a95027e0b940780b66b00fa9023987e96b9 100644 (file)
@@ -21728,6 +21728,7 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first)
   if (decl
       && DECL_P (decl)
       && VAR_OR_FUNCTION_DECL_P (decl)
+      && symtab_node::get (decl) != NULL
       && symtab_node::get (decl)->alias == 0
       && symname[strlen (symname) - 1] != ']')
     {