summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 14:42:20 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 14:42:20 +0000
commit9dcc4d7a4f275af013140ff7221b9c76c66cd843 (patch)
tree7dc32d4b6c0e36ca6c9f3402d02e8fc90196cb84 /gcc/gimplify.c
parentbeec9a6ace9f4f45bffb4025f013812584ab4f21 (diff)
downloadgcc-9dcc4d7a4f275af013140ff7221b9c76c66cd843.tar.gz
PR c++/44808
* 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
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 5559f0e3698..4440af50b7f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4559,7 +4559,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
/* 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))