Commit dc01fed1 by Jakub Jelinek Committed by Jakub Jelinek

tree-chrec.c (chrec_convert_1): Only fold (T2)(t +- x) to (T2)t +- (T2)x if only…

tree-chrec.c (chrec_convert_1): Only fold (T2)(t +- x) to (T2)t +- (T2)x if only integer types are involved.

	* tree-chrec.c (chrec_convert_1): Only fold (T2)(t +- x) to
	(T2)t +- (T2)x if only integer types are involved.

	* gcc.c-torture/compile/20091215-1.c: New test.

From-SVN: r155288
parent 9245e113
2009-12-16 Jakub Jelinek <jakub@redhat.com>
* tree-chrec.c (chrec_convert_1): Only fold (T2)(t +- x) to
(T2)t +- (T2)x if only integer types are involved.
2009-12-16 Ben Elliston <bje@au.ibm.com>
* tree-data-ref.h (dot_rdg): Remove prototype.
2009-12-16 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20091215-1.c: New test.
* gcc.dg/debug/tls-1.c: New test.
2009-12-15 Jason Merrill <jason@redhat.com>
......
void bar ();
void
foo (void *x, short y)
{
bar (x, y + 1);
}
void
bar (x, y)
void *x;
char *y;
{
baz (y);
}
......@@ -1293,6 +1293,8 @@ keep_cast:
if (use_overflow_semantics
&& (TREE_CODE (chrec) == PLUS_EXPR
|| TREE_CODE (chrec) == MINUS_EXPR)
&& TREE_CODE (type) == INTEGER_TYPE
&& TREE_CODE (ct) == INTEGER_TYPE
&& TYPE_PRECISION (type) > TYPE_PRECISION (ct)
&& TYPE_OVERFLOW_UNDEFINED (ct))
res = fold_build2 (TREE_CODE (chrec), type,
......
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