2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
* builtins.c (expand_builtin_memmove_args): Strip nops that don't
change the type before looking for a COMPOUND_EXPR.
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
* gcc.c-torture/compile/bcopy-1.c: New testcase.
From-SVN: r124975
+2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR middle-end/31095
+ * builtins.c (expand_builtin_memmove_args): Strip nops that don't
+ change the type before looking for a COMPOUND_EXPR.
+
2007-05-22 Ian Lance Taylor <iant@google.com>
* lower-subreg.c (decompose_multiword_subregs): If we change an
if (result)
{
+ STRIP_TYPE_NOPS (result);
while (TREE_CODE (result) == COMPOUND_EXPR)
{
expand_expr (TREE_OPERAND (result, 0), const0_rtx, VOIDmode,
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
+ PR middle-end/31095
+ * gcc.c-torture/compile/bcopy-1.c: New testcase.
+
+2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
PR middle-end/31606
* gcc.c-torture/20070522-1.c: New testcase.
--- /dev/null
+/* PR middle-end/31095, expand_builtin_memmove_args forgot to take into
+ account that tree folding of builtins can add an extra NOP_EXPR. */
+
+struct timeval
+{
+ int tv_sec;
+ int tv_usec;
+};
+void
+capture_next_packet (void)
+{
+ struct timeval past, now, then;
+ __builtin_bcopy (&then, &past, sizeof (then));
+}