Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004).
authorMartin Liska <mliska@suse.cz>
Fri, 16 Nov 2018 12:49:32 +0000 (13:49 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 16 Nov 2018 12:49:32 +0000 (12:49 +0000)
2018-11-16  Martin Liska  <mliska@suse.cz>

PR lto/88004
* lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
lto_symtab_symbol_p as it does checking of transparent alias.
These needs to be also merged in the function.

From-SVN: r266207

gcc/lto/ChangeLog
gcc/lto/lto-symtab.c

index a31b7de889903b27f8f7940a140527864f340210..4798663336c76e2790f920706e36e69f1130adf2 100644 (file)
@@ -1,3 +1,10 @@
+2018-11-16  Martin Liska  <mliska@suse.cz>
+
+       PR lto/88004
+       * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
+       lto_symtab_symbol_p as it does checking of transparent alias.
+       These needs to be also merged in the function.
+
 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
 
        * lto-partition.c (privatize_symbol_name_1): Use
index 4b24b84774df8e030b781d8e3f4bad3aaee2a7e5..18437eb2841120613c3fe1813c9e9ec23a2dd75a 100644 (file)
@@ -894,10 +894,11 @@ lto_symtab_merge_symbols_1 (symtab_node *prevailing)
        e = next)
     {
       next = e->next_sharing_asm_name;
+      cgraph_node *ce = dyn_cast <cgraph_node *> (e);
 
-      if (!lto_symtab_symbol_p (e))
+      if ((!TREE_PUBLIC (e->decl) && !DECL_EXTERNAL (e->decl))
+         || (ce != NULL && ce->global.inlined_to))
        continue;
-      cgraph_node *ce = dyn_cast <cgraph_node *> (e);
       symtab_node *to = symtab_node::get (lto_symtab_prevailing_decl (e->decl));
 
       /* No matter how we are going to deal with resolution, we will ultimately