+2014-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2014-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/64269
+ * tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
+ len2 or diff are too large.
+
2014-12-11 Eric Botcazou <ebotcazou@adacore.com>
* doc/md.texi (Insn Lengths): Fix description of (pc).
+2014-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2014-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/64269
+ * gcc.c-torture/compile/pr64269.c: New test.
+
2014-12-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
--- /dev/null
+/* PR tree-optimization/64269 */
+
+void
+foo (char *p)
+{
+ __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
+ *p = 0;
+ __builtin_memset (p + 1, 0, s);
+}
use_operand_p use_p;
if (!host_integerp (val2, 0)
- || !host_integerp (len2, 1))
+ || !host_integerp (len2, 1)
+ || compare_tree_int (len2, 1024) == 1)
break;
if (is_gimple_call (stmt1))
{
is not constant, or is bigger than memcpy length, bail out. */
if (diff == NULL
|| !host_integerp (diff, 1)
- || tree_int_cst_lt (len1, diff))
+ || tree_int_cst_lt (len1, diff)
+ || compare_tree_int (diff, 1024) == 1)
break;
/* Use maximum of difference plus memset length and memcpy length