This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/65588] [5 Regression] lto1: internal compiler error: Segmentation fault
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Mar 2015 14:52:54 +0000
- Subject: [Bug ipa/65588] [5 Regression] lto1: internal compiler error: Segmentation fault
- Auto-submitted: auto-generated
- References: <bug-65588-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65588
--- Comment #6 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
this patch fixes the partitioner and also avoids assemble_undefined_decl to be
called
on hard registers and value exprs. I am not sure how the reduced testcase
could work,
since I think the bug needs partitioning to reproduce. So I would welcome if
someone
can reproduce the reduced one could test that it is indeed fixed.
Index: varpool.c
===================================================================
--- varpool.c (revision 221725)
+++ varpool.c (working copy)
@@ -737,7 +737,9 @@ symbol_table::output_variables (void)
timevar_push (TV_VAROUT);
FOR_EACH_VARIABLE (node)
- if (!node->definition)
+ if (!node->definition
+ && !DECL_HAS_VALUE_EXPR_P (node->decl)
+ && !DECL_HARD_REGISTER (node->decl))
assemble_undefined_decl (node->decl);
FOR_EACH_DEFINED_VARIABLE (node)
{
Index: symtab.c
===================================================================
--- symtab.c (revision 221725)
+++ symtab.c (working copy)
@@ -1684,6 +1689,8 @@ symtab_node::get_partitioning_class (voi
objects that can not be duplicated across partitions. */
if (DECL_IN_CONSTANT_POOL (decl))
return SYMBOL_DUPLICATE;
+ if (DECL_HARD_REGISTER (decl))
+ return SYMBOL_DUPLICATE;
gcc_checking_assert (vnode->definition);
}
/* Functions that are cloned may stay in callgraph even if they are unused.