diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-21 13:14:23 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-21 13:14:23 +0000 |
commit | c8a9710d42bcc14cea1e626582cb36a1f128c22f (patch) | |
tree | b8ca0c2a0c74b596d5ba5799f42443e85678ca1b | |
parent | cb39b849f167c70c1f86d4356f02d1285d49ee13 (diff) | |
download | ppe42-gcc-c8a9710d42bcc14cea1e626582cb36a1f128c22f.tar.gz ppe42-gcc-c8a9710d42bcc14cea1e626582cb36a1f128c22f.zip |
2014-02-21 Richard Biener <rguenther@suse.de>
PR middle-end/60291
* tree-ssa-live.c (mark_all_vars_used_1): Do not walk
DECL_INITIAL for globals not in the current function context.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207991 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29ed8c833c4..2acc2dfd99f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-02-21 Richard Biener <rguenther@suse.de> + + PR middle-end/60291 + * tree-ssa-live.c (mark_all_vars_used_1): Do not walk + DECL_INITIAL for globals not in the current function context. + 2014-02-21 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/56490 diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index 13e4fb0cfa4..3cd3613d732 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -435,7 +435,8 @@ mark_all_vars_used_1 (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) { /* When a global var becomes used for the first time also walk its initializer (non global ones don't have any). */ - if (set_is_used (t) && is_global_var (t)) + if (set_is_used (t) && is_global_var (t) + && DECL_CONTEXT (t) == current_function_decl) mark_all_vars_used (&DECL_INITIAL (t)); } /* remove_unused_scope_block_p requires information about labels |