diff options
author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-26 11:52:19 +0000 |
---|---|---|
committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-26 11:52:19 +0000 |
commit | 7b050b7b412119d8d958acbc3da8d97e8235ff9a (patch) | |
tree | d53a5fda9fbcebe0370a3e0a07b56791df0d32b7 /gcc/tree-ssa-ccp.c | |
parent | f03e0ae4c960dd170347ebac8fdc174607bc3a28 (diff) | |
download | gcc-7b050b7b412119d8d958acbc3da8d97e8235ff9a.tar.gz |
* fold-const.c (fold_read_from_constant_string): Use
build_int_cst_type.
* tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126952 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 7dbbf28ea26..5d4d3d859ec 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; } |