re PR ipa/65588 (lto1: internal compiler error: Segmentation fault)
authorJan Hubicka <hubicka@ucw.cz>
Fri, 27 Mar 2015 21:35:51 +0000 (22:35 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 27 Mar 2015 21:35:51 +0000 (21:35 +0000)
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
gcc/symtab.c
gcc/varpool.c

index d8221f371d9181018e5899c13f29187ee49f9f76..554d8c6833512089b52eb2771a5996365a8ca072 100644 (file)
@@ -1,3 +1,11 @@
+2015-03-27  Jan Hubicka  <hubicka@ucw.cz>
+
+       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  <hongjiu.lu@intel.com>
 
        PR target/65248
index 84a0981fab0796bde3c24f00ec8cf245349edded..eb41d62a96979ff8d7618e2782c3e78fb3130e36 100644 (file)
@@ -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.
index f1439ca6ee3c1542c662c393a077df0713e95a54..76148a584b32da7f64b30673982ed31634b4b862 100644 (file)
@@ -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)
     {