This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]