(T2)t +- (T2)x if only integer types are involved.
* gcc.c-torture/compile/
20091215-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155288
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
--- /dev/null
+void bar ();
+
+void
+foo (void *x, short y)
+{
+ bar (x, y + 1);
+}
+
+void
+bar (x, y)
+ void *x;
+ char *y;
+{
+ baz (y);
+}
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,