diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-30 11:13:05 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-30 11:13:05 +0000 |
commit | 649fa1dcb75c430763e8823e39109ca4e2f71811 (patch) | |
tree | 3cdbc81f740cf52e3d8329af4dd9a113b4d582ad /gcc/tree-ssa-live.c | |
parent | 19c8675bf720508b3d53a66f0b671817c4ebaf59 (diff) | |
download | gcc-649fa1dcb75c430763e8823e39109ca4e2f71811.tar.gz |
2010-08-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45449
* tree-ssa-live.c (remove_unused_locals): Also remove address-taken
variables.
* gcc.dg/pr45449.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index 1eb68221495..821be7f2a8e 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -813,18 +813,13 @@ remove_unused_locals (void) BITMAP_FREE (global_unused_vars); } - /* Remove unused variables from REFERENCED_VARs. As a special - exception keep the variables that are believed to be aliased. - Those can't be easily removed from the alias sets and operand - caches. They will be removed shortly after the next may_alias - pass is performed. */ + /* Remove unused variables from REFERENCED_VARs. */ FOR_EACH_REFERENCED_VAR (t, rvi) if (!is_global_var (t) && TREE_CODE (t) != PARM_DECL && TREE_CODE (t) != RESULT_DECL && !(ann = var_ann (t))->used - && !ann->is_heapvar - && !TREE_ADDRESSABLE (t)) + && !ann->is_heapvar) remove_referenced_var (t); remove_unused_scope_block_p (DECL_INITIAL (current_function_decl)); if (dump_file && (dump_flags & TDF_DETAILS)) |