Commit f2896bc9 by Jakub Jelinek Committed by Jakub Jelinek

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
parent cfe6dea2
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.
......
......@@ -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))
......
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
......
// PR c++/44808
// { dg-do compile }
struct S
{
void *a, *b;
int c;
};
S
foo ()
{
S x;
S y = x;
return x;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment