2006-01-30 Richard Guenther <rguenther@suse.de>
PR c++/23372
* gimplify.c (gimplify_target_expr): Handle easy cases
without creating a temporary.
* gcc.dg/pr23372-1.C: New testcase.
From-SVN: r110396
+2006-01-30 Richard Guenther <rguenther@suse.de>
+
+ PR c++/23372
+ * gimplify.c (gimplify_target_expr): Handle easy cases
+ without creating a temporary.
+
2006-01-30 Nathan Sidwell <nathan@codesourcery.com>
* vec.h (safe_grow): Remove duplicated line.
if (init)
{
+ /* Try to avoid the temporary if possible. */
+ if (TREE_CODE (init) == INDIRECT_REF
+ && !TREE_SIDE_EFFECTS (init)
+ && !TARGET_EXPR_CLEANUP (targ))
+ {
+ *expr_p = init;
+ return GS_OK;
+ }
+
/* TARGET_EXPR temps aren't part of the enclosing block, so add it
to the temps list. */
gimple_add_tmp_var (temp);
+2006-01-30 Richard Guenther <rguenther@suse.de>
+
+ PR c++/23372
+ * gcc.dg/pr23372-1.C: New testcase.
+
2006-01-29 Diego Novillo <dnovillo@redhat.com>
* gcc.dg/gomp/pr25874.c: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+struct A {
+ int a[1000];
+};
+void f(struct A);
+void g(struct A *a) { f(*a); }
+
+/* { dg-final { scan-assembler-times "memcpy" 1 } } */