From c97de76414e82de75ea376515c1afde318788213 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 27 Mar 2015 22:35:51 +0100 Subject: [PATCH] re PR ipa/65588 (lto1: internal compiler error: Segmentation fault) PR ipa/65588 * symtab.c (symtab_node::get_partitioning_class): Register vars are duplicated. * varpool.c (symbol_table::output_variables) Do not assemble unefined decls for non-symbols. From-SVN: r221745 --- gcc/ChangeLog | 8 ++++++++ gcc/symtab.c | 2 ++ gcc/varpool.c | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8221f371d9..554d8c68335 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-03-27 Jan Hubicka + + PR ipa/65588 + * symtab.c (symtab_node::get_partitioning_class): Register vars + are duplicated. + * varpool.c (symbol_table::output_variables) Do not assemble unefined + decls for non-symbols. + 2015-03-27 H.J. Lu PR target/65248 diff --git a/gcc/symtab.c b/gcc/symtab.c index 84a0981fab0..eb41d62a969 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1689,6 +1689,8 @@ symtab_node::get_partitioning_class (void) 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. diff --git a/gcc/varpool.c b/gcc/varpool.c index f1439ca6ee3..76148a584b3 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -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) { -- 2.30.2