cgraphunit.c (varpool_finalize_decl): Allow external decls.
authorJan Hubicka <jh@suse.cz>
Fri, 18 May 2012 11:44:52 +0000 (13:44 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 18 May 2012 11:44:52 +0000 (11:44 +0000)
* cgraphunit.c (varpool_finalize_decl): Allow external decls.
(mark_functions_to_output): Fix sanity check.
* ipa.c (function_and_variable_visibility): Remove TREE_STATIC
check.

From-SVN: r187651

gcc/ChangeLog
gcc/cgraphunit.c
gcc/ipa.c

index 3caf3661a6b48a66af9210b7863c8be69a6ba7d6..57d6fed09183bf5f8c32d6e101d7768cb609d340 100644 (file)
@@ -1,3 +1,10 @@
+2012-05-18  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphunit.c (varpool_finalize_decl): Allow external decls.
+       (mark_functions_to_output): Fix sanity check.
+       * ipa.c (function_and_variable_visibility): Remove TREE_STATIC
+       check.
+
 2012-05-18  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (mark_symbols_for_renaming): Remove.
index 97e810e5f2a3302f91449893704f8d7b55d5d964..7dae2c8e820b69a012399725270a92de8d5d3ad6 100644 (file)
@@ -819,7 +819,7 @@ varpool_finalize_decl (tree decl)
 {
   struct varpool_node *node = varpool_node (decl);
 
-  gcc_assert (TREE_STATIC (decl));
+  gcc_assert (TREE_STATIC (decl) || DECL_EXTERNAL (decl));
 
   if (node->finalized)
     return;
@@ -1156,6 +1156,7 @@ mark_functions_to_output (void)
                 have analyzed node pointing to it.  */
              && !node->symbol.in_other_partition
              && !node->alias
+             && !node->clones
              && !DECL_EXTERNAL (decl))
            {
              dump_cgraph_node (stderr, node);
index cafa7a11f2a96b60ccc40975b5a38664a11f1e6d..43c2f60fa2aca65711ce9ef422d1a0c65a39a83b 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -915,7 +915,6 @@ function_and_variable_visibility (bool whole_program)
            symtab_dissolve_same_comdat_group_list ((symtab_node) vnode);
          vnode->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY;
        }
-     gcc_assert (TREE_STATIC (vnode->symbol.decl));
     }
   pointer_set_destroy (aliased_nodes);
   pointer_set_destroy (aliased_vnodes);