diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-04 18:02:38 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-04 16:02:38 +0000 |
commit | 5f7ae6b656d4468b1f2ebf3f773e494c7d147624 (patch) | |
tree | 34c358bbc15941d02b800987838c29b526be48e7 /gcc/tree-switch-conversion.c | |
parent | 8b2b54f9d6dc34cafebf59ecb154ac52a354ecc1 (diff) | |
download | gcc-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.c | 1 |
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; |