This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/60567] [4.9 Regression] lto1 ICE in add_symbol_to_partition, at lto/lto-partition.c:233 with -fno-use-linker-plugin
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Apr 2014 15:42:11 +0000
- Subject: [Bug lto/60567] [4.9 Regression] lto1 ICE in add_symbol_to_partition, at lto/lto-partition.c:233 with -fno-use-linker-plugin
- Auto-submitted: auto-generated
- References: <bug-60567-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60567
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/symtab.c.jj 2014-03-21 22:23:43.000000000 +0100
+++ gcc/symtab.c 2014-04-09 17:37:40.709523997 +0200
@@ -1312,9 +1312,13 @@ symtab_get_symbol_partitioning_class (sy
/* Linker discardable symbols are duplicated to every use unless they are
keyed.
Keyed symbols or those. */
- if (DECL_ONE_ONLY (node->decl)
+ if ((HAVE_LTO_PLUGIN
+ && (flag_use_linker_plugin
+ || (HAVE_LTO_PLUGIN == 2
+ && !global_options_set.x_flag_use_linker_plugin))
+ ? (DECL_ONE_ONLY (node->decl) && !node->forced_by_abi)
+ : DECL_COMDAT (node->decl))
&& !node->force_output
- && !node->forced_by_abi
&& !symtab_used_from_object_file_p (node))
return SYMBOL_DUPLICATE;
seems to make the ICE go away with -fno-use-linker-plugin or when the linker
doesn't support the plugin at all, didn't have to change ipa.c similarly.
But why is this happening and why this helps needs analyzing.