diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-05-26 02:50:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-05-26 00:50:24 +0000 |
commit | 97ae6b6443470560d8ab692501dcec00b20dc02b (patch) | |
tree | 479e51b5873cfa549ada03f39d5f41cba52829c5 /gcc/symtab.c | |
parent | 936190c629009fbf4f328963ddf3d54887099db6 (diff) | |
download | gcc-97ae6b6443470560d8ab692501dcec00b20dc02b.zip gcc-97ae6b6443470560d8ab692501dcec00b20dc02b.tar.gz gcc-97ae6b6443470560d8ab692501dcec00b20dc02b.tar.bz2 |
* symtab.c (symtab_nonoverwritable_alias): Copy READONLY flag for variables.
From-SVN: r210919
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index 301f7e3..8abb7a1 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1163,9 +1163,13 @@ symtab_nonoverwritable_alias (symtab_node *node) (new_decl, node->decl); } else - new_node = varpool_create_variable_alias (new_decl, node->decl); + { + TREE_READONLY (new_decl) = TREE_READONLY (node->decl); + new_node = varpool_create_variable_alias (new_decl, node->decl); + } symtab_resolve_alias (new_node, node); - gcc_assert (decl_binds_to_current_def_p (new_decl)); + gcc_assert (decl_binds_to_current_def_p (new_decl) + && targetm.binds_local_p (new_decl)); return new_node; } |