This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/65380] [5 Regression][ICF] LTO: ICE in add_symbol_to_partition_1, at lto/lto-partition.c:158
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Mar 2015 02:13:28 +0000
- Subject: [Bug lto/65380] [5 Regression][ICF] LTO: ICE in add_symbol_to_partition_1, at lto/lto-partition.c:158
- Auto-submitted: auto-generated
- References: <bug-65380-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65380
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am with terrible internet connection and it still does not reproduce for me
(I suppose difference between GNU LD and gold).
It is however clear what happens, we try to add symbol's alias that is external
and we do not expect external symbols to be in partitions.
Does the following (untested) help?
Index: lto-partition.c
===================================================================
--- lto-partition.c (revision 221399)
+++ lto-partition.c (working copy)
@@ -198,7 +198,7 @@
/* Add all aliases associated with the symbol. */
FOR_EACH_ALIAS (node, ref)
- if (!node->weakref)
+ if (!node->weakref && !DECL_ExTERNAL (node->decl))
add_symbol_to_partition_1 (part, ref->referring);
/* Ensure that SAME_COMDAT_GROUP lists all allways added in a group. */