diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-18 09:22:41 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-18 09:22:41 +0000 |
commit | fd2b4bf0e1777a8695422b0cb3d314c4eb3a9006 (patch) | |
tree | e002a97f6a3a48c62d9a153ebadda0baf1093ecc /gcc/tree-ssa.c | |
parent | f61bcceeba6575d800e9f08cd9dd6112f790831a (diff) | |
download | gcc-fd2b4bf0e1777a8695422b0cb3d314c4eb3a9006.tar.gz |
PR tree-optimization/49000
* tree-ssa.c (execute_update_addresses_taken): Call
maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't
be rewritten and decl has been marked for renaming, reset
the debug stmt.
* gcc.dg/pr49000.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index f596fcd870c..ba5a20b6e47 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -2230,6 +2230,17 @@ execute_update_addresses_taken (void) } } + else if (gimple_debug_bind_p (stmt) + && gimple_debug_bind_has_value_p (stmt)) + { + tree *valuep = gimple_debug_bind_get_value_ptr (stmt); + tree decl; + maybe_rewrite_mem_ref_base (valuep); + decl = non_rewritable_mem_ref_base (*valuep); + if (decl && symbol_marked_for_renaming (decl)) + gimple_debug_bind_reset_value (stmt); + } + if (gimple_references_memory_p (stmt) || is_gimple_debug (stmt)) update_stmt (stmt); |