Commit 7d0a07d0 by Daniel Jacobowitz Committed by Daniel Jacobowitz

tree-ssa-ccp.c (fold_const_aggregate_ref): Use fold_convert.

	* tree-ssa-ccp.c (fold_const_aggregate_ref): Use fold_convert.

	* gcc.c-torture/execute/20070724-1.c: New.

From-SVN: r126888
parent 30f9cd05
2007-07-24 Daniel Jacobowitz <dan@codesourcery.com>
* tree-ssa-ccp.c (fold_const_aggregate_ref): Use fold_convert.
2007-07-24 Jan Hubicka <jh@suse.cz> 2007-07-24 Jan Hubicka <jh@suse.cz>
* caller-save.c: Include ggc.h, gt-caller-save.h * caller-save.c: Include ggc.h, gt-caller-save.h
......
2007-07-24 Daniel Jacobowitz <dan@codesourcery.com>
* gcc.c-torture/execute/20070724-1.c: New.
2007-07-24 Paul Thomas <pault@gcc.gnu.org> 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205 PR fortran/31205
void abort (void);
static unsigned char magic[] = "\235";
static unsigned char value = '\235';
int main()
{
if (value != magic[0])
abort ();
return 0;
}
...@@ -1053,8 +1053,10 @@ fold_const_aggregate_ref (tree t) ...@@ -1053,8 +1053,10 @@ fold_const_aggregate_ref (tree t)
== MODE_INT) == MODE_INT)
&& GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor)))) == 1 && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor)))) == 1
&& compare_tree_int (idx, TREE_STRING_LENGTH (ctor)) < 0) && compare_tree_int (idx, TREE_STRING_LENGTH (ctor)) < 0)
return build_int_cst (TREE_TYPE (t), (TREE_STRING_POINTER (ctor) return fold_convert (TREE_TYPE (t),
[TREE_INT_CST_LOW (idx)])); build_int_cst (NULL,
(TREE_STRING_POINTER (ctor)
[TREE_INT_CST_LOW (idx)])));
return NULL_TREE; return NULL_TREE;
} }
......
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