* tree-switch-conversion.c (build_one_array): Make it readonly.

From-SVN: r160106
This commit is contained in:
Jan Hubicka 2010-06-01 16:15:42 +02:00 committed by Jan Hubicka
parent 7bab65434c
commit 2e3b48853d
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2010-06-01 Jan Hubicka <jh@suse.cz>
* tree-switch-conversion.c (build_one_array): Make it readonly.
2010-06-01 Richard Guenther <rguenther@suse.de>
* optabs.c (init_optabs): Guard all accesses to reinit.

View File

@ -526,6 +526,7 @@ build_one_array (gimple swtch, int num, tree arr_index_type, gimple phi,
DECL_NAME (decl) = create_tmp_var_name ("CSWTCH");
DECL_ARTIFICIAL (decl) = 1;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
add_referenced_var (decl);
varpool_mark_needed_node (varpool_node (decl));
varpool_finalize_decl (decl);