aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-09-04 18:02:38 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-09-04 16:02:38 +0000
commit5f7ae6b656d4468b1f2ebf3f773e494c7d147624 (patch)
tree34c358bbc15941d02b800987838c29b526be48e7 /gcc/tree-switch-conversion.c
parent8b2b54f9d6dc34cafebf59ecb154ac52a354ecc1 (diff)
downloadgcc-5f7ae6b656d4468b1f2ebf3f773e494c7d147624.zip
gcc-5f7ae6b656d4468b1f2ebf3f773e494c7d147624.tar.gz
gcc-5f7ae6b656d4468b1f2ebf3f773e494c7d147624.tar.bz2
foldconst-1.c: New testcase.
* gcc.dg/tree-ssa/foldconst-1.c: New testcase. * tree-switch-conversion.c (build_one_array): Set constructor to be static. * varpool.c (varpool_finalize_decl): Compute const_value_known. From-SVN: r163860
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 7072af8..05c0a65 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -518,6 +518,7 @@ build_one_array (gimple swtch, int num, tree arr_index_type, gimple phi,
array_type = build_array_type (value_type, arr_index_type);
ctor = build_constructor (array_type, info.constructors[num]);
TREE_CONSTANT (ctor) = true;
+ TREE_STATIC (ctor) = true;
decl = build_decl (loc, VAR_DECL, NULL_TREE, array_type);
TREE_STATIC (decl) = 1;