From 12eac2321bb613a447197e7a1308d4ce4a266dd5 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 16 Nov 2018 13:49:32 +0100 Subject: [PATCH] Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004). 2018-11-16 Martin Liska 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 | 7 +++++++ gcc/lto/lto-symtab.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index a31b7de8899..4798663336c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2018-11-16 Martin Liska + + 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 * lto-partition.c (privatize_symbol_name_1): Use 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 (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 (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 -- 2.30.2