aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2007-07-26 11:52:19 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2007-07-26 11:52:19 +0000
commit0c4d4efbde93c9d91498cfa4aea427c31f9426ef (patch)
treed53a5fda9fbcebe0370a3e0a07b56791df0d32b7 /gcc/tree-ssa-ccp.c
parent7e98624c5eefcd77b90ad1ebbbc06ab17b005a32 (diff)
downloadgcc-0c4d4efbde93c9d91498cfa4aea427c31f9426ef.zip
gcc-0c4d4efbde93c9d91498cfa4aea427c31f9426ef.tar.gz
gcc-0c4d4efbde93c9d91498cfa4aea427c31f9426ef.tar.bz2
fold-const.c (fold_read_from_constant_string): Use build_int_cst_type.
* fold-const.c (fold_read_from_constant_string): Use build_int_cst_type. * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. From-SVN: r126952
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 7dbbf28..5d4d3d8 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1052,10 +1052,9 @@ fold_const_aggregate_ref (tree t)
== MODE_INT)
&& GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor)))) == 1
&& compare_tree_int (idx, TREE_STRING_LENGTH (ctor)) < 0)
- return fold_convert (TREE_TYPE (t),
- build_int_cst (NULL,
- (TREE_STRING_POINTER (ctor)
- [TREE_INT_CST_LOW (idx)])));
+ return build_int_cst_type (TREE_TYPE (t),
+ (TREE_STRING_POINTER (ctor)
+ [TREE_INT_CST_LOW (idx)]));
return NULL_TREE;
}