From 7b050b7b412119d8d958acbc3da8d97e8235ff9a Mon Sep 17 00:00:00 2001 From: drow Date: Thu, 26 Jul 2007 11:52:19 +0000 Subject: [PATCH] * 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 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 7 +++---- gcc/tree-ssa-ccp.c | 7 +++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aedc111..37ece5c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-07-26 Daniel Jacobowitz + + * fold-const.c (fold_read_from_constant_string): Use + build_int_cst_type. + * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. + 2007-07-26 Nick Clifton * tree-ssa-operands.h: Change copyright header to refer to version diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5d40406..106aa4d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -14062,10 +14062,9 @@ fold_read_from_constant_string (tree exp) && (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_TYPE (string)))) == MODE_INT) && (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (string)))) == 1)) - return fold_convert (TREE_TYPE (exp), - build_int_cst (NULL_TREE, - (TREE_STRING_POINTER (string) - [TREE_INT_CST_LOW (index)]))); + return build_int_cst_type (TREE_TYPE (exp), + (TREE_STRING_POINTER (string) + [TREE_INT_CST_LOW (index)])); } return NULL; } 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; } -- 2.7.4