aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-07-05 16:42:20 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-07-05 16:42:20 +0200
commitf2896bc9618bdc052563ee59d479b425a8442943 (patch)
tree7dc32d4b6c0e36ca6c9f3402d02e8fc90196cb84 /gcc/gimplify.c
parentcfe6dea201b66d256b3f36d22f938fd3daf0bed9 (diff)
downloadgcc-f2896bc9618bdc052563ee59d479b425a8442943.zip
gcc-f2896bc9618bdc052563ee59d479b425a8442943.tar.gz
gcc-f2896bc9618bdc052563ee59d479b425a8442943.tar.bz2
re PR c++/44808 (ICE: tree check: expected var_decl, have result_decl in gimplify_modify_expr)
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. From-SVN: r161838
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 5559f0e..4440af5 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))