diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2011-01-19 22:00:00 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2011-01-19 22:00:00 +0000 |
commit | 37d6a488a470eb9447ac51f434621ad979e5b4f3 (patch) | |
tree | d3a216768b1daa8410f7f06a5ad2345b0f103ae8 | |
parent | 689f2c8206c0dae466e89ee3268179e8b1a6ddee (diff) | |
download | gcc-37d6a488a470eb9447ac51f434621ad979e5b4f3.zip gcc-37d6a488a470eb9447ac51f434621ad979e5b4f3.tar.gz gcc-37d6a488a470eb9447ac51f434621ad979e5b4f3.tar.bz2 |
re PR debug/47079 (FAIL: gcc.dg/guality/nrv-1.c)
PR debug/47079
PR debug/46724
* function.c (instantiate_expr): Instantiate incoming rtl of
implicit arguments, and recurse on VALUE_EXPRs.
(instantiate_decls): Instantiate rtl and VALUE_EXPR of result.
* var-tracking.c (adjust_mems): Reject virtual_incoming_args_rtx.
From-SVN: r169034
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/function.c | 29 | ||||
-rw-r--r-- | gcc/var-tracking.c | 1 |
3 files changed, 37 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e5d282..af91c9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2011-01-19 Alexandre Oliva <aoliva@redhat.com> + PR debug/47079 + PR debug/46724 + * function.c (instantiate_expr): Instantiate incoming rtl of + implicit arguments, and recurse on VALUE_EXPRs. + (instantiate_decls): Instantiate rtl and VALUE_EXPR of result. + * var-tracking.c (adjust_mems): Reject virtual_incoming_args_rtx. + +2011-01-19 Alexandre Oliva <aoliva@redhat.com> + * c-parser.c (c_parser_for_statement): Initialize collection_expression. diff --git a/gcc/function.c b/gcc/function.c index 73e59f9..3f721fb 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1784,8 +1784,21 @@ instantiate_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) if (! EXPR_P (t)) { *walk_subtrees = 0; - if (DECL_P (t) && DECL_RTL_SET_P (t)) - instantiate_decl_rtl (DECL_RTL (t)); + if (DECL_P (t)) + { + if (DECL_RTL_SET_P (t)) + instantiate_decl_rtl (DECL_RTL (t)); + if (TREE_CODE (t) == PARM_DECL && DECL_NAMELESS (t) + && DECL_INCOMING_RTL (t)) + instantiate_decl_rtl (DECL_INCOMING_RTL (t)); + if ((TREE_CODE (t) == VAR_DECL + || TREE_CODE (t) == RESULT_DECL) + && DECL_HAS_VALUE_EXPR_P (t)) + { + tree v = DECL_VALUE_EXPR (t); + walk_tree (&v, instantiate_expr, NULL, NULL); + } + } } return NULL; } @@ -1835,6 +1848,18 @@ instantiate_decls (tree fndecl) } } + if ((decl = DECL_RESULT (fndecl)) + && TREE_CODE (decl) == RESULT_DECL) + { + if (DECL_RTL_SET_P (decl)) + instantiate_decl_rtl (DECL_RTL (decl)); + if (DECL_HAS_VALUE_EXPR_P (decl)) + { + tree v = DECL_VALUE_EXPR (decl); + walk_tree (&v, instantiate_expr, NULL, NULL); + } + } + /* Now process all variables defined in the function or its subblocks. */ instantiate_decls_1 (DECL_INITIAL (fndecl)); diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 58dce1b..e0477d4 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -805,6 +805,7 @@ adjust_mems (rtx loc, const_rtx old_rtx, void *data) && hard_frame_pointer_adjustment != -1 && cfa_base_rtx) return compute_cfa_pointer (hard_frame_pointer_adjustment); + gcc_checking_assert (loc != virtual_incoming_args_rtx); return loc; case MEM: mem = loc; |