diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-23 00:27:44 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-23 00:27:44 +0000 |
commit | 9bd14e3f2a480f6319e408798031fdd90a69b3a7 (patch) | |
tree | 6a329a1462ce5410f79cc96e19ef32901b223c94 /gcc/tree-flow-inline.h | |
parent | 8539a60c30e19eed889618920e88362267da23c0 (diff) | |
download | gcc-9bd14e3f2a480f6319e408798031fdd90a69b3a7.tar.gz |
* tree-flow-inline.h (var_ann): External variable annotations are
unshared too.
(tree_common_ann): Handle correctly unshared variables annotations.
* tree-dfa.c (create_var_ann): External variable annotations are
unshared too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120164 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index d87adc39112..0695c656293 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -203,7 +203,7 @@ var_ann (tree t) gcc_assert (t); gcc_assert (DECL_P (t)); gcc_assert (TREE_CODE (t) != FUNCTION_DECL); - if (TREE_STATIC (t)) + if (!MTAG_P (t) && (TREE_STATIC (t) || DECL_EXTERNAL (t))) { struct static_var_ann_d *sann = ((struct static_var_ann_d *) @@ -952,6 +952,9 @@ clear_call_clobbered (tree var) static inline tree_ann_common_t tree_common_ann (tree t) { + /* Watch out static variables with unshared annotations. */ + if (DECL_P (t) && TREE_CODE (t) == VAR_DECL) + return &var_ann (t)->common; return &t->base.ann->common; } |