diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/symtab.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e5a3c6..6bc4baa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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 attribute. (place_block_symbol): Recurse on aliases. diff --git a/gcc/symtab.c b/gcc/symtab.c index 79fdbc2..ab6c9d7 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); |