* gimplify.c (gimplify_modify_expr): Only SET_DECL_DEBUG_EXPR if
*from_p is VAR_DECL.
* g++.dg/opt/nrv16.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161838
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-07-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/44808
+ * gimplify.c (gimplify_modify_expr): Only SET_DECL_DEBUG_EXPR if
+ *from_p is VAR_DECL.
+
2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
* tree.h (build_call_list): Remove.
/* 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))
+2010-07-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/44808
+ * g++.dg/opt/nrv16.C: New test.
+
2010-07-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44784
--- /dev/null
+// PR c++/44808
+// { dg-do compile }
+
+struct S
+{
+ void *a, *b;
+ int c;
+};
+
+S
+foo ()
+{
+ S x;
+ S y = x;
+ return x;
+}