diff mbox series

Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004).

Message ID 5c550cf5-9029-e2c7-e030-057f982ba811@suse.cz
State New
Headers show
Series Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004). | expand

Commit Message

Martin Liška Nov. 16, 2018, 12:44 p.m. UTC
Hi.

This is fix for the PR which we cooked with Honza.
He pre-approved that.

Survives regression tests and bootstrap on x86_64-linux-gnu.

I'm going to install it.
Martin

gcc/lto/ChangeLog:

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.
---
 gcc/lto/lto-symtab.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index 4b24b84774d..18437eb2841 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -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