summaryrefslogtreecommitdiff
path: root/gcc/symtab.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-08 16:57:19 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-08 16:57:19 +0000
commit338af93ef4bb5a4d8cf5faec050a0d0d69c3fb78 (patch)
treea5aa816d9c6582850e447a29afa72dd0942eb351 /gcc/symtab.c
parent18aedd60eb960b8b69f13ef6cb314613bd1c6f37 (diff)
downloadgcc-338af93ef4bb5a4d8cf5faec050a0d0d69c3fb78.tar.gz
* symtab.c (symtab_nonoverwritable_alias): Copy VIRTUAL flag;
remove static initializer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211358 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r--gcc/symtab.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 79fdbc28469..ab6c9d747e6 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -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);