summaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-01 14:15:42 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-01 14:15:42 +0000
commite7baf91d0c027202dac234bbda3ac1039b1b969e (patch)
tree2b9cbdfcba4849d9837591d981001aefd16bbc60 /gcc/tree-switch-conversion.c
parent6dee6ab1ca31293fbb6b0769bba4618debebedd5 (diff)
downloadgcc-e7baf91d0c027202dac234bbda3ac1039b1b969e.tar.gz
* tree-switch-conversion.c (build_one_array): Make it readonly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r--gcc/tree-switch-conversion.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 0ff937f8030..cf3202ca905 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -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);