Commit 12fea1f9 by Ulrich Weigand Committed by Ulrich Weigand

fold-const.c (fold_read_from_constant_string): Convert result to requested type.

	* fold-const.c (fold_read_from_constant_string): Convert result to
	requested type.

From-SVN: r82120
parent c5042c5c
2004-05-21 Ulrich Weigand <uweigand@de.ibm.com>
* fold-const.c (fold_read_from_constant_string): Convert result to
requested type.
2004-05-21 Richard Henderson <rth@redhat.com>
* gimplify.c (mostly_copy_tree_r): Don't attempt to copy decls.
......
......@@ -9692,8 +9692,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 build_int_2 ((TREE_STRING_POINTER (string)
[TREE_INT_CST_LOW (index)]), 0);
return fold_convert (TREE_TYPE (exp),
build_int_2 ((TREE_STRING_POINTER (string)
[TREE_INT_CST_LOW (index)]), 0));
}
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment