]> gcc.gnu.org Git - gcc.git/commitdiff
symtab.c (symtab_nonoverwritable_alias): Copy VIRTUAL flag; remove static initializer.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 8 Jun 2014 16:57:19 +0000 (18:57 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 8 Jun 2014 16:57:19 +0000 (16:57 +0000)
* symtab.c (symtab_nonoverwritable_alias): Copy VIRTUAL flag;
remove static initializer.

From-SVN: r211358

gcc/ChangeLog
gcc/symtab.c

index 5e5a3c60fc7d0f620af5c30e035b65a114a25c8a..6bc4baa0d6e84a669703667499b3b345469f0de9 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
+
+       * symtab.c (symtab_nonoverwritable_alias): Copy VIRTUAL flag;
+       remove static initializer.
+
 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
 
        * varasm.c (use_blocks_for_decl_p): Check symbol table instead of alias
index 79fdbc28469e11c079821fa08edb83d35a381fbe..ab6c9d747e665f6e20c55eca6f803fd9e7ce8b2b 100644 (file)
@@ -1154,7 +1154,9 @@ symtab_nonoverwritable_alias (symtab_node *node)
   TREE_PUBLIC (new_decl) = 0;
   DECL_COMDAT (new_decl) = 0;
   DECL_WEAK (new_decl) = 0;
-  DECL_VIRTUAL_P (new_decl) = 0;
+
+  /* Since the aliases can be added to vtables, keep DECL_VIRTUAL flag.  */
+  DECL_VIRTUAL_P (new_decl) = DECL_VIRTUAL_P (node->decl);
   if (TREE_CODE (new_decl) == FUNCTION_DECL)
     {
       DECL_STATIC_CONSTRUCTOR (new_decl) = 0;
@@ -1165,6 +1167,7 @@ symtab_nonoverwritable_alias (symtab_node *node)
   else
     {
       TREE_READONLY (new_decl) = TREE_READONLY (node->decl);
+      DECL_INITIAL (new_decl) = error_mark_node;
       new_node = varpool_create_variable_alias (new_decl, node->decl);
     }
   symtab_resolve_alias (new_node, node);  
This page took 0.11135 seconds and 5 git commands to generate.