--- gcc/gimplify.c.jj	2010-07-05 12:37:02.000000000 +0200
+++ gcc/gimplify.c	2010-07-05 12:51:50.000000000 +0200
@@ -4559,7 +4559,7 @@ gimplify_modify_expr (tree *expr_p, gimp
   /* Try to alleviate the effects of the gimplification creating artificial
      temporaries (see for example is_gimple_reg_rhs) on the debug info.  */
   if (!gimplify_ctxp->into_ssa
-      && DECL_P (*from_p)
+      && TREE_CODE (*from_p) == VAR_DECL
       && DECL_IGNORED_P (*from_p)
       && DECL_P (*to_p)
       && !DECL_IGNORED_P (*to_p))
--- gcc/testsuite/g++.dg/opt/nrv16.C.jj	2010-07-05 13:01:44.000000000 +0200
+++ gcc/testsuite/g++.dg/opt/nrv16.C	2010-07-05 13:00:31.000000000 +0200
@@ -0,0 +1,16 @@
+// PR c++/44808
+// { dg-do compile }
+
+struct S
+{
+  void *a, *b;
+  int c;
+};
+
+S
+foo ()
+{
+  S x;
+  S y = x;
+  return x;
+}
