[Bug lto/65380] [5 Regression][ICF] LTO: ICE in add_symbol_to_partition_1, at lto/lto-partition.c:158

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 18 02:13:00 GMT 2015


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.  */



More information about the Gcc-bugs mailing list